summaryrefslogtreecommitdiffstats
path: root/libk9copy/k9titleencopt.cpp
blob: 451eea2e0dd7b04ecc75014e7cc9d5d5348cb5a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//
// C++ Implementation: k9titleencopt
//
// Description: 
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "k9common.h"
#include "k9titleencopt.h"
#include "k9config.h"
#include "k9dvdtitle.h"

k9TitleEncOpt::k9TitleEncOpt(k9DVDTitle *parent)
 : TQObject(parent, "")
{
    connect (parent,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(load()));
    load();
}


k9TitleEncOpt::~k9TitleEncOpt()
{
}


void k9TitleEncOpt::load() {
    //KSimpleConfig settings("K9Copy");
    k9Config config;
    
    int size_mb=(int)getTitle()->gettotalsize_mb();
    
    m_maxSize=config.getPrefMp4Size();
    if(m_maxSize  > size_mb)
       m_maxSize=size_mb ;
       
    m_numParts=config.getPrefMp4NumberCD();
    
    m_width=config.getPrefMp4Width();
    m_height=config.getPrefMp4Height();

    m_keepAspectRatio=config.getPrefMp4AspectRatio();

    m_2Passes=config.getPrefMp42Passes();

    m_audioBr=config.getPrefMp4AudioBitrate();

    m_codec=config.getPrefMp4Codec();

    m_audioCodec=config.getPrefMp4AudioCodec ();

    m_audioGain=config.getPrefMp4AudioGain();

    m_videoBr=config.getPrefMp4VideoBitrate();

    m_useCache=config.getPrefUseCellCache();

}

int k9TitleEncOpt::getMaxSize() {
   return m_maxSize;
}

void k9TitleEncOpt::setMaxSize(int _value) {
   m_maxSize=_value;
}


int k9TitleEncOpt::getNumParts() {
   return m_numParts;
}

void k9TitleEncOpt::setNumParts(int _value) {
   m_numParts=_value;
}

int k9TitleEncOpt::getAudioGain() {
   return m_audioGain;
}

void k9TitleEncOpt::setAudioGain(int _value) {
   m_audioGain=_value;
}

const TQString & k9TitleEncOpt::getWidth() {
   return m_width;
}

void k9TitleEncOpt::setWidth(TQString _value) {
   m_width=_value;
}


const TQString & k9TitleEncOpt::getHeight() {
   return m_height;
}

void k9TitleEncOpt::setHeight(TQString _value) {
   m_height=_value;
}

const TQString & k9TitleEncOpt::getAudioBr() {
   return m_audioBr;
}
void k9TitleEncOpt::setAudioBr(TQString _value) {
    m_audioBr=_value;
}

const TQString & k9TitleEncOpt::getVideoBr() {
   return m_videoBr;
}
void k9TitleEncOpt::setVideoBr(TQString _value) {
    m_videoBr=_value;
}

bool k9TitleEncOpt::getKeepAspectRatio() {
   return m_keepAspectRatio;
}
void k9TitleEncOpt::setKeepAspectRatio(bool _value) {
   m_keepAspectRatio=_value;
}

bool k9TitleEncOpt::get2Passes() {
   return m_2Passes;
}
void k9TitleEncOpt::set2Passes(bool _value) {
   m_2Passes=_value;
}

int k9TitleEncOpt::getCodec() {
   return m_codec;
}
void k9TitleEncOpt::setCodec(int _value) {
   m_codec=_value;
}

int k9TitleEncOpt::getAudioCodec() {
   return m_audioCodec;
}
void k9TitleEncOpt::setAudioCodec(int _value) {
   m_audioCodec=_value;
}

bool k9TitleEncOpt::getUseCache()  {
    k9Config config;
    m_useCache=config.getPrefUseCellCache();
    return m_useCache;
}

void k9TitleEncOpt::setUseCache(bool _value) {
    m_useCache=_value;
}



#include "k9titleencopt.moc"