1 diff -Naur gnac-0.2.4.1.orig/configure.ac gnac-0.2.4.1/configure.ac
2 --- gnac-0.2.4.1.orig/configure.ac 2012-04-22 14:09:01.000000000 +0200
3 +++ gnac-0.2.4.1/configure.ac 2015-01-09 23:55:03.296384170 +0100
5 dnl Find the GStreamer libraries
6 GSTREAMER_REQUIRED_VERSION=0.10.31
7 PKG_CHECK_MODULES(GSTREAMER, [
8 - gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
9 - gstreamer-base-0.10 >= $GSTREAMER_REQUIRED_VERSION
10 - gstreamer-pbutils-0.10 >= $GSTREAMER_REQUIRED_VERSION
11 - gstreamer-plugins-base-0.10 >= $GSTREAMER_REQUIRED_VERSION
12 - gstreamer-tag-0.10 >= $GSTREAMER_REQUIRED_VERSION
13 + gstreamer-1.0 >= $GSTREAMER_REQUIRED_VERSION
14 + gstreamer-base-1.0 >= $GSTREAMER_REQUIRED_VERSION
15 + gstreamer-pbutils-1.0 >= $GSTREAMER_REQUIRED_VERSION
16 + gstreamer-plugins-base-1.0 >= $GSTREAMER_REQUIRED_VERSION
17 + gstreamer-tag-1.0 >= $GSTREAMER_REQUIRED_VERSION
19 AC_SUBST(GSTREAMER_CFLAGS)
20 AC_SUBST(GSTREAMER_LIBS)
22 dnl Find the GStreamer elements we use, and warn if they are not present
23 -AM_GST_ELEMENT_CHECK(faac, , AC_MSG_WARN([The 'faac' element was not found. This will cause encoding to AAC to fail.]))
24 -AM_GST_ELEMENT_CHECK(flacenc, , AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
25 -AM_GST_ELEMENT_CHECK(lame, , AC_MSG_WARN([The 'lame' element was not found. This will cause encoding to MP3 to fail.]))
26 -AM_GST_ELEMENT_CHECK(wavenc, , AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to WAV to fail.]))
27 -AM_GST_ELEMENT_CHECK(wavpackenc, , AC_MSG_WARN([The 'wavpackenc' element was not found. This will cause encoding to WAVPACK to fail.]))
28 +GST_ELEMENT_CHECK(faac, 1.0, , AC_MSG_WARN([The 'faac' element was not found. This will cause encoding to AAC to fail.]))
29 +GST_ELEMENT_CHECK(flacenc, 1.0, , AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
30 +GST_ELEMENT_CHECK(lamemp3enc, 1.0, , AC_MSG_WARN([The 'lamemp3enc' element was not found. This will cause encoding to MP3 to fail.]))
31 +GST_ELEMENT_CHECK(wavenc, 1.0, , AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to WAV to fail.]))
32 +GST_ELEMENT_CHECK(wavpackenc, 1.0, , AC_MSG_WARN([The 'wavpackenc' element was not found. This will cause encoding to WAVPACK to fail.]))
34 dnl Optionnaly enable G* deprecations
35 AC_MSG_CHECKING([Wether to enable deprecation warnings])
36 diff -Naur gnac-0.2.4.1.orig/data/profiles/aac.xml.in gnac-0.2.4.1/data/profiles/aac.xml.in
37 --- gnac-0.2.4.1.orig/data/profiles/aac.xml.in 2012-01-26 01:28:46.000000000 +0100
38 +++ gnac-0.2.4.1/data/profiles/aac.xml.in 2015-01-09 23:49:31.329712534 +0100
41 <process id="gstreamer-audio">faac</process>
42 <process id="multiplexer">
43 - <value value="ffmux_mp4">...</value>
45 + <value value="mp4mux">...</value>
47 <variable id="bitrate" type="combo">
49 <variable-name>bitrate</variable-name>
51 <value value="320000">320 Kbps</value>
54 - <variable id="profile" type="combo">
55 - <name>Profile</name>
56 - <_description>AAC takes a modular approach to encoding. There are four default profiles using different tools: (LC) -> the simplest and most widely used and supported; (MAIN) -> like the LC profile, with the addition of backwards prediction; (SRS) -> a.k.a. Scalable Sample Rate (MPEG-4 AAC-SSR); (LTP) -> an improvement of the MAIN profile using a forward predictor with lower computational complexity.</_description>
57 - <variable-name>profile</variable-name>
58 - <default-value>1</default-value>
60 - <value value="1">Main (MAIN)</value>
61 - <value value="2">Low complexity (LC)</value>
62 - <value value="3">Scalable sampling rate (SSR)</value>
63 - <value value="4">Long term prediction (LTP)</value>
66 - <variable id="tns" type="check">
67 + <variable id="tns" type="check">
68 <name>Temporal noise shaping</name>
69 <_description>Conventional transform coding schemes often encounter problems with signals that vary heavily over time, especially speech signals. Temporal noise shaping can be viewed as a postprocessing step which goal is to overcome this limitation.</_description>
70 <variable-name>tns</variable-name>
71 <default-value>false</default-value>
73 - <variable id="outputformat" type="combo">
74 - <name>Output format</name>
75 - <variable-name>outputformat</variable-name>
76 - <default-value>1</default-value>
78 - <_value value="1">ADTS headers</_value>
79 - <_value value="0">Raw AAC</_value>
85 diff -Naur gnac-0.2.4.1.orig/data/profiles/base.xml.in gnac-0.2.4.1/data/profiles/base.xml.in
86 --- gnac-0.2.4.1.orig/data/profiles/base.xml.in 2012-01-26 01:28:46.000000000 +0100
87 +++ gnac-0.2.4.1/data/profiles/base.xml.in 2015-01-09 23:49:31.329712534 +0100
92 - <process id="gstreamer-audio">audio/x-raw-int</process>
93 + <process id="gstreamer-audio">audio/x-raw</process>
94 <process id="audioconvert">audioconvert</process>
97 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_AAC.xml.in gnac-0.2.4.1/data/profiles/default/CD_Quality,_AAC.xml.in
98 --- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_AAC.xml.in 2012-01-25 17:27:37.000000000 +0100
99 +++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_AAC.xml.in 2015-01-10 01:03:29.951986568 +0100
101 <_description>Used for converting to CD-quality audio, but with the lossy AAC codec. Use this for preparing files for copying to devices that only support the AAC codec. Note that using this format may be illegal in your jurisdiction; contact your lawyer for advice.</_description>
102 <channels>2</channels>
103 <sample-rate>44100</sample-rate>
104 - <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! faac bitrate=128000 outputformat=1</pipeline>
105 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! faac bitrate=128000 ! audio/mpeg, mpegversion=4, stream-format=adts ! aacparse</pipeline>
108 <bitrate>128000</bitrate>
109 - <outputformat>1</outputformat>
110 - <profile>1</profile>
114 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossless.xml.in gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossless.xml.in
115 --- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossless.xml.in 2012-01-25 17:27:37.000000000 +0100
116 +++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossless.xml.in 2015-01-09 23:49:31.329712534 +0100
118 <_description>Used for converting to CD-quality audio, but with a lossless compression codec. Use this if you later want to edit the file or burn it to CD.</_description>
119 <channels>2</channels>
120 <sample-rate>44100</sample-rate>
121 - <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! flacenc name=enc quality=5</pipeline>
122 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! flacenc name=enc quality=5</pipeline>
126 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossy.xml.in gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossy.xml.in
127 --- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossy.xml.in 2012-01-25 17:27:37.000000000 +0100
128 +++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossy.xml.in 2015-01-09 23:49:31.333045887 +0100
130 <_description>Used for converting to CD-quality audio, but with a lossy compression codec. Use this for CD extraction and radio recordings.</_description>
131 <channels>2</channels>
132 <sample-rate>44100</sample-rate>
133 - <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! vorbisenc name=enc quality=0.5 ! oggmux</pipeline>
134 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! vorbisenc name=enc quality=0.5 ! oggmux</pipeline>
137 <quality>0.5</quality>
138 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_MP3.xml.in gnac-0.2.4.1/data/profiles/default/CD_Quality,_MP3.xml.in
139 --- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_MP3.xml.in 2012-01-25 17:27:37.000000000 +0100
140 +++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_MP3.xml.in 2015-01-09 23:49:31.333045887 +0100
142 <_description>Used for converting to CD-quality audio, but with the lossy MP3 codec. Use this for preparing files for copying to devices that only support the MP3 codec. Note that using this format may be illegal in your jurisdiction; contact your lawyer for advice.</_description>
143 <channels>2</channels>
144 <sample-rate>44100</sample-rate>
145 - <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! lame name=enc mode=4 vbr=4 vbr-quality=6 ! xingmux ! id3v2mux</pipeline>
146 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! lamemp3enc name=enc target=quality quality=4 ! xingmux ! id3v2mux</pipeline>
149 - <encoding-mode>4</encoding-mode>
150 + <target>quality</target>
152 - <quality>6</quality>
153 - <compression-ratio/>
160 + <quality>4</quality>
164 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossless.xml.in gnac-0.2.4.1/data/profiles/default/Voice,_Lossless.xml.in
165 --- gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossless.xml.in 2012-01-25 17:27:37.000000000 +0100
166 +++ gnac-0.2.4.1/data/profiles/default/Voice,_Lossless.xml.in 2015-01-09 23:49:31.333045887 +0100
168 <_description>Used for converting to lossless voice-quality audio. Use this for recording and editing speech.</_description>
169 <channels>2</channels>
170 <sample-rate>44100</sample-rate>
171 - <pipeline>audioconvert ! audio/x-raw-int, rate=44100, channels=2 ! audioconvert ! wavenc name=enc</pipeline>
172 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! wavenc name=enc</pipeline>
176 diff -Naur gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossy.xml.in gnac-0.2.4.1/data/profiles/default/Voice,_Lossy.xml.in
177 --- gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossy.xml.in 2012-01-25 17:27:37.000000000 +0100
178 +++ gnac-0.2.4.1/data/profiles/default/Voice,_Lossy.xml.in 2015-01-09 23:49:31.333045887 +0100
180 <_description>Used for converting to lossy voice-quality audio. Use this for recording speech that doesn't need to be edited.</_description>
181 <channels>2</channels>
182 <sample-rate>44100</sample-rate>
183 - <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! speexenc name=enc quality=8 vad=false mode=0 ! oggmux</pipeline>
184 + <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! speexenc name=enc quality=8 vad=false mode=0 ! oggmux</pipeline>
188 diff -Naur gnac-0.2.4.1.orig/data/profiles/mp3-lame.xml.in gnac-0.2.4.1/data/profiles/mp3-lame.xml.in
189 --- gnac-0.2.4.1.orig/data/profiles/mp3-lame.xml.in 2012-01-26 01:28:46.000000000 +0100
190 +++ gnac-0.2.4.1/data/profiles/mp3-lame.xml.in 2015-01-09 23:49:31.333045887 +0100
192 <mimetype>application/x-id3</mimetype>
193 <mimetype>audio/x-mp3</mimetype>
195 - <process id="gstreamer-audio">lame name=enc</process>
196 + <process id="gstreamer-audio">lamemp3enc name=enc</process>
197 <process id="multiplexer">
198 <value value="xingmux">Add Xing header</value>
199 <value value="id3v2mux">Add id3v2 header</value>
201 - <variable id="preset" type="combo">
202 - <name>Preset</name>
203 - <variable-name>preset</variable-name>
204 - <default-value>1006</default-value>
206 - <_value value="1006">Medium</_value>
207 - <_value value="1001">Standard</_value>
208 - <_value value="1002">Extreme</_value>
209 - <_value value="1003">Insane</_value>
212 - <variable id="encoding-mode" type="combo">
213 - <name>Bitrate mode</name>
214 - <variable-name>vbr</variable-name>
215 - <default-value>0</default-value>
216 + <variable id="target" type="combo">
217 + <name>Target</name>
218 + <variable-name>target</variable-name>
219 + <default-value>quality</default-value>
221 - <_value value="0">Constant bitrate (CBR)</_value>
222 - <_value value="3">Average bitrate (ABR)</_value>
223 - <_value value="4">Variable bitrate (VBR)</_value>
224 - <_value value="5">Presets</_value>
225 - <_value value="6">Compression ratio</_value>
226 + <_value value="quality">Quality</_value>
227 + <_value value="bitrate">Bitrate</_value>
230 <variable id="quality" type="slider">
231 <name>VBR quality</name>
232 - <variable-name>vbr-quality</variable-name>
233 + <variable-name>quality</variable-name>
234 <min-value>0.0</min-value>
235 - <max-value>9.0</max-value>
236 + <max-value>10.0</max-value>
237 <step-value>1.0</step-value>
238 - <default-value>3.0</default-value>
240 - <variable id="compression-ratio" type="slider">
241 - <name>Compression ratio</name>
242 - <_description>Let lame choose bitrate to achieve selected compression ratio.</_description>
243 - <variable-name>compression-ratio</variable-name>
244 - <min-value>0.0</min-value>
245 - <max-value>200</max-value>
246 - <step-value>1.0</step-value>
247 - <default-value>0.0</default-value>
249 - <variable id="mean-bitrate" type="slider">
250 - <name>VBR mean bitrate</name>
251 - <variable-name>vbr-mean-bitrate</variable-name>
252 - <min-value>0.0</min-value>
253 - <max-value>330.0</max-value>
254 - <step-value>1.0</step-value>
255 - <default-value>192</default-value>
256 + <default-value>4.0</default-value>
258 <variable id="bitrate" type="combo">
261 <value value="320">320 Kbps</value>
264 - <variable id="min-bitrate" type="combo">
265 - <name>VBR minimum bitrate</name>
266 - <variable-name>vbr-min-bitrate</variable-name>
267 - <default-value>128</default-value>
269 - <value value="8">8 Kbps</value>
270 - <value value="16">16 Kbps</value>
271 - <value value="24">24 Kbps</value>
272 - <value value="32">32 Kbps</value>
273 - <value value="40">40 Kbps</value>
274 - <value value="48">48 Kbps</value>
275 - <value value="56">56 Kbps</value>
276 - <value value="64">64 Kbps</value>
277 - <value value="80">80 Kbps</value>
278 - <value value="96">96 Kbps</value>
279 - <value value="112">112 Kbps</value>
280 - <value value="128">128 Kbps</value>
281 - <value value="160">160 Kbps</value>
282 - <value value="192">192 Kbps</value>
283 - <value value="224">224 Kbps</value>
284 - <value value="256">256 Kbps</value>
285 - <value value="320">320 Kbps</value>
288 - <variable id="max-bitrate" type="combo">
289 - <name>VBR maximum bitrate</name>
290 - <variable-name>vbr-max-bitrate</variable-name>
291 - <default-value>128</default-value>
293 - <value value="8">8 Kbps</value>
294 - <value value="16">16 Kbps</value>
295 - <value value="24">24 Kbps</value>
296 - <value value="32">32 Kbps</value>
297 - <value value="40">40 Kbps</value>
298 - <value value="48">48 Kbps</value>
299 - <value value="56">56 Kbps</value>
300 - <value value="64">64 Kbps</value>
301 - <value value="80">80 Kbps</value>
302 - <value value="96">96 Kbps</value>
303 - <value value="112">112 Kbps</value>
304 - <value value="128">128 Kbps</value>
305 - <value value="160">160 Kbps</value>
306 - <value value="192">192 Kbps</value>
307 - <value value="224">224 Kbps</value>
308 - <value value="256">256 Kbps</value>
309 - <value value="320">320 Kbps</value>
312 - <variable id="mode" type="combo">
313 + <variable id="mono" type="combo">
315 - <variable-name>mode</variable-name>
316 - <default-value>4</default-value>
317 + <variable-name>mono</variable-name>
318 + <default-value>0</default-value>
320 - <_value value="0">Stereo</_value>
321 - <_value value="1">Joint Stereo</_value>
322 - <_value value="2">Dual Channel</_value>
323 - <_value value="3">Mono</_value>
324 - <_value value="4">Auto</_value>
325 + <_value value="0">Auto</_value>
326 + <_value value="1">Mono</_value>
330 diff -Naur gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-aac.xml gnac-0.2.4.1/data/profiles/ui/gnac-profiles-aac.xml
331 --- gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-aac.xml 2012-04-22 14:09:01.000000000 +0200
332 +++ gnac-0.2.4.1/data/profiles/ui/gnac-profiles-aac.xml 2015-01-09 23:49:31.333045887 +0100
334 <?xml version="1.0" encoding="UTF-8"?>
335 +<!-- Generated with glade 3.18.3 -->
337 - <!-- interface-requires gtk+ 3.0 -->
338 + <requires lib="gtk+" version="3.0"/>
339 <object class="GtkAlignment" id="properties-alignment">
340 <property name="visible">True</property>
341 <property name="can_focus">False</property>
343 <property name="row_spacing">5</property>
344 <property name="column_spacing">10</property>
346 - <object class="GtkLabel" id="label-outputformat">
347 - <property name="visible">True</property>
348 - <property name="can_focus">False</property>
349 - <property name="xalign">0</property>
350 - <property name="label" translatable="yes">Output format</property>
353 - <property name="left_attach">0</property>
354 - <property name="top_attach">3</property>
355 - <property name="width">1</property>
356 - <property name="height">1</property>
360 - <object class="GtkHBox" id="hbox-outputformat">
361 - <property name="visible">True</property>
362 - <property name="can_focus">False</property>
364 - <object class="GtkComboBoxText" id="combo-outputformat">
365 - <property name="visible">True</property>
366 - <property name="can_focus">False</property>
367 - <signal name="changed" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
370 - <property name="expand">False</property>
371 - <property name="fill">False</property>
372 - <property name="pack_type">end</property>
373 - <property name="position">0</property>
378 - <property name="left_attach">1</property>
379 - <property name="top_attach">3</property>
380 - <property name="width">1</property>
381 - <property name="height">1</property>
385 - <object class="GtkLabel" id="label-profile">
386 - <property name="visible">True</property>
387 - <property name="can_focus">False</property>
388 - <property name="xalign">0</property>
389 - <property name="label" translatable="yes">Profile</property>
392 - <property name="left_attach">0</property>
393 - <property name="top_attach">1</property>
394 - <property name="width">1</property>
395 - <property name="height">1</property>
399 - <object class="GtkHBox" id="hbox-profile">
400 - <property name="visible">True</property>
401 - <property name="can_focus">False</property>
403 - <object class="GtkComboBoxText" id="combo-profile">
404 - <property name="visible">True</property>
405 - <property name="can_focus">False</property>
406 - <signal name="changed" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
409 - <property name="expand">False</property>
410 - <property name="fill">False</property>
411 - <property name="pack_type">end</property>
412 - <property name="position">0</property>
417 - <property name="left_attach">1</property>
418 - <property name="top_attach">1</property>
419 - <property name="width">1</property>
420 - <property name="height">1</property>
424 <object class="GtkCheckButton" id="checkbutton-tns">
425 <property name="label" translatable="yes">Temporal noise shaping</property>
426 <property name="use_action_appearance">False</property>
428 <property name="can_focus">True</property>
429 <property name="receives_default">False</property>
430 <property name="hexpand">True</property>
431 - <property name="use_action_appearance">False</property>
432 <property name="xalign">0</property>
433 <property name="draw_indicator">True</property>
434 <signal name="toggled" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
437 <property name="left_attach">0</property>
438 - <property name="top_attach">2</property>
439 + <property name="top_attach">1</property>
440 <property name="width">2</property>
441 - <property name="height">1</property>
446 <property name="left_attach">0</property>
447 <property name="top_attach">1</property>
448 <property name="width">2</property>
449 - <property name="height">1</property>
455 <property name="left_attach">1</property>
456 <property name="top_attach">0</property>
457 - <property name="width">1</property>
458 - <property name="height">1</property>
464 <property name="left_attach">0</property>
465 <property name="top_attach">0</property>
466 - <property name="width">1</property>
467 - <property name="height">1</property>
471 diff -Naur gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-lame.xml gnac-0.2.4.1/data/profiles/ui/gnac-profiles-lame.xml
472 --- gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-lame.xml 2012-04-22 14:09:01.000000000 +0200
473 +++ gnac-0.2.4.1/data/profiles/ui/gnac-profiles-lame.xml 2015-01-09 23:49:31.336379238 +0100
475 <?xml version="1.0" encoding="UTF-8"?>
476 +<!-- Generated with glade 3.18.3 -->
478 - <!-- interface-requires gtk+ 3.0 -->
479 + <requires lib="gtk+" version="3.0"/>
480 <object class="GtkAdjustment" id="adjustment1">
481 <property name="upper">100</property>
482 <property name="step_increment">1</property>
484 <object class="GtkAdjustment" id="adjustment2">
485 <property name="step_increment">1</property>
487 - <object class="GtkAdjustment" id="adjustment3">
488 - <property name="step_increment">1</property>
490 <object class="GtkAlignment" id="properties-alignment">
491 <property name="visible">True</property>
492 <property name="can_focus">False</property>
494 <property name="visible">True</property>
495 <property name="can_focus">False</property>
497 - <object class="GtkComboBoxText" id="combo-mode">
498 + <object class="GtkComboBoxText" id="combo-mono">
499 <property name="visible">True</property>
500 <property name="can_focus">False</property>
501 <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
504 <property name="left_attach">1</property>
505 <property name="top_attach">1</property>
506 - <property name="width">1</property>
507 - <property name="height">1</property>
513 <property name="left_attach">0</property>
514 <property name="top_attach">1</property>
515 - <property name="width">1</property>
516 - <property name="height">1</property>
520 - <object class="GtkCheckButton" id="checkbutton-mean-bitrate">
521 - <property name="label" translatable="yes">Mean bitrate</property>
522 - <property name="use_action_appearance">False</property>
523 - <property name="visible">True</property>
524 - <property name="can_focus">True</property>
525 - <property name="receives_default">False</property>
526 - <property name="use_action_appearance">False</property>
527 - <property name="xalign">0</property>
528 - <property name="draw_indicator">True</property>
529 - <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="slider-mean-vbr" swapped="yes"/>
532 - <property name="left_attach">0</property>
533 - <property name="top_attach">2</property>
534 - <property name="width">1</property>
535 - <property name="height">1</property>
539 - <object class="GtkCheckButton" id="checkbutton-min-bitrate">
540 - <property name="label" translatable="yes">Min bitrate</property>
541 - <property name="use_action_appearance">False</property>
542 - <property name="visible">True</property>
543 - <property name="can_focus">True</property>
544 - <property name="receives_default">False</property>
545 - <property name="use_action_appearance">False</property>
546 - <property name="xalign">0</property>
547 - <property name="draw_indicator">True</property>
548 - <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="combo-min-vbr" swapped="yes"/>
551 - <property name="left_attach">0</property>
552 - <property name="top_attach">3</property>
553 - <property name="width">1</property>
554 - <property name="height">1</property>
558 - <object class="GtkCheckButton" id="checkbutton-max-bitrate">
559 - <property name="label" translatable="yes">Max bitrate</property>
560 - <property name="use_action_appearance">False</property>
561 - <property name="visible">True</property>
562 - <property name="can_focus">True</property>
563 - <property name="receives_default">False</property>
564 - <property name="use_action_appearance">False</property>
565 - <property name="xalign">0</property>
566 - <property name="draw_indicator">True</property>
567 - <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="combo-max-vbr" swapped="yes"/>
570 - <property name="left_attach">0</property>
571 - <property name="top_attach">4</property>
572 - <property name="width">1</property>
573 - <property name="height">1</property>
577 - <object class="GtkHScale" id="slider-mean-vbr">
578 - <property name="visible">True</property>
579 - <property name="sensitive">False</property>
580 - <property name="can_focus">True</property>
581 - <property name="adjustment">adjustment1</property>
582 - <property name="digits">0</property>
583 - <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
586 - <property name="left_attach">1</property>
587 - <property name="top_attach">2</property>
588 - <property name="width">1</property>
589 - <property name="height">1</property>
593 - <object class="GtkHBox" id="hbox5">
594 - <property name="visible">True</property>
595 - <property name="can_focus">False</property>
597 - <object class="GtkComboBoxText" id="combo-min-vbr">
598 - <property name="visible">True</property>
599 - <property name="sensitive">False</property>
600 - <property name="can_focus">False</property>
601 - <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
604 - <property name="expand">False</property>
605 - <property name="fill">False</property>
606 - <property name="pack_type">end</property>
607 - <property name="position">0</property>
612 - <property name="left_attach">1</property>
613 - <property name="top_attach">3</property>
614 - <property name="width">1</property>
615 - <property name="height">1</property>
619 - <object class="GtkHBox" id="hbox6">
620 - <property name="visible">True</property>
621 - <property name="can_focus">False</property>
623 - <object class="GtkComboBoxText" id="combo-max-vbr">
624 - <property name="visible">True</property>
625 - <property name="sensitive">False</property>
626 - <property name="can_focus">False</property>
627 - <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
630 - <property name="expand">False</property>
631 - <property name="fill">False</property>
632 - <property name="pack_type">end</property>
633 - <property name="position">0</property>
638 - <property name="left_attach">1</property>
639 - <property name="top_attach">4</property>
640 - <property name="width">1</property>
641 - <property name="height">1</property>
648 <property name="left_attach">0</property>
649 - <property name="top_attach">6</property>
650 + <property name="top_attach">3</property>
651 <property name="width">2</property>
652 - <property name="height">1</property>
656 @@ -233,10 +101,10 @@
657 <property name="visible">True</property>
658 <property name="can_focus">False</property>
660 - <object class="GtkComboBoxText" id="combo-encoding-mode">
661 + <object class="GtkComboBoxText" id="combo-target">
662 <property name="visible">True</property>
663 <property name="can_focus">False</property>
664 - <signal name="changed" handler="gnac_profiles_lame_on_encoding_mode_changed" swapped="no"/>
665 + <signal name="changed" handler="gnac_profiles_lame_on_target_changed" swapped="no"/>
668 <property name="expand">False</property>
671 <property name="left_attach">1</property>
672 <property name="top_attach">0</property>
673 - <property name="width">1</property>
674 - <property name="height">1</property>
680 <property name="left_attach">1</property>
681 <property name="top_attach">1</property>
682 - <property name="width">1</property>
683 - <property name="height">1</property>
687 - <object class="GtkHBox" id="hbox-preset">
688 - <property name="visible">True</property>
689 - <property name="can_focus">False</property>
691 - <object class="GtkComboBoxText" id="combo-preset">
692 - <property name="visible">True</property>
693 - <property name="can_focus">False</property>
694 - <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
697 - <property name="expand">False</property>
698 - <property name="fill">False</property>
699 - <property name="pack_type">end</property>
700 - <property name="position">0</property>
705 - <property name="left_attach">1</property>
706 - <property name="top_attach">3</property>
707 - <property name="width">1</property>
708 - <property name="height">1</property>
712 - <object class="GtkLabel" id="label-preset">
713 - <property name="visible">True</property>
714 - <property name="can_focus">False</property>
715 - <property name="xalign">0</property>
716 - <property name="label" translatable="yes">Preset</property>
719 - <property name="left_attach">0</property>
720 - <property name="top_attach">3</property>
721 - <property name="width">1</property>
722 - <property name="height">1</property>
728 <property name="left_attach">0</property>
729 <property name="top_attach">2</property>
730 - <property name="width">1</property>
731 - <property name="height">1</property>
735 @@ -336,13 +159,11 @@
736 <property name="visible">True</property>
737 <property name="can_focus">False</property>
738 <property name="xalign">0</property>
739 - <property name="label" translatable="yes">Constant bitrate (CBR)</property>
740 + <property name="label" translatable="yes">Bitrate</property>
743 <property name="left_attach">0</property>
744 <property name="top_attach">1</property>
745 - <property name="width">1</property>
746 - <property name="height">1</property>
750 @@ -350,13 +171,11 @@
751 <property name="visible">True</property>
752 <property name="can_focus">False</property>
753 <property name="xalign">0</property>
754 - <property name="label" translatable="yes">Encoding mode</property>
755 + <property name="label" translatable="yes">Target</property>
758 <property name="left_attach">0</property>
759 <property name="top_attach">0</property>
760 - <property name="width">1</property>
761 - <property name="height">1</property>
765 @@ -414,69 +233,12 @@
767 <property name="left_attach">1</property>
768 <property name="top_attach">2</property>
769 - <property name="width">1</property>
770 - <property name="height">1</property>
774 - <object class="GtkLabel" id="label-mean-bitrate">
775 - <property name="visible">True</property>
776 - <property name="can_focus">False</property>
777 - <property name="xalign">0</property>
778 - <property name="label" translatable="yes">Average bitrate (ABR)</property>
781 - <property name="left_attach">0</property>
782 - <property name="top_attach">4</property>
783 - <property name="width">1</property>
784 - <property name="height">1</property>
788 - <object class="GtkHScale" id="slider-mean-abr">
789 - <property name="visible">True</property>
790 - <property name="can_focus">True</property>
791 - <property name="adjustment">adjustment1</property>
792 - <property name="digits">0</property>
793 - <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
796 - <property name="left_attach">1</property>
797 - <property name="top_attach">4</property>
798 - <property name="width">1</property>
799 - <property name="height">1</property>
803 - <object class="GtkLabel" id="label-compression-ratio">
804 - <property name="visible">True</property>
805 - <property name="can_focus">False</property>
806 - <property name="xalign">0</property>
807 - <property name="label" translatable="yes">Compression ratio</property>
810 - <property name="left_attach">0</property>
811 - <property name="top_attach">5</property>
812 - <property name="width">1</property>
813 - <property name="height">1</property>
817 - <object class="GtkHScale" id="slider-compression-ratio">
818 - <property name="visible">True</property>
819 - <property name="can_focus">True</property>
820 - <property name="adjustment">adjustment3</property>
821 - <property name="digits">0</property>
822 - <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
825 - <property name="left_attach">1</property>
826 - <property name="top_attach">5</property>
827 - <property name="width">1</property>
828 - <property name="height">1</property>
834 + <object class="GtkAdjustment" id="adjustment3">
835 + <property name="step_increment">1</property>
838 diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-converter.c gnac-0.2.4.1/libgnac/libgnac-converter.c
839 --- gnac-0.2.4.1.orig/libgnac/libgnac-converter.c 2012-03-22 16:50:45.000000000 +0100
840 +++ gnac-0.2.4.1/libgnac/libgnac-converter.c 2015-01-09 23:49:31.336379238 +0100
841 @@ -1000,13 +1000,13 @@
843 static GstFormat format = GST_FORMAT_TIME;
845 - if (gst_element_query_position(item->pipeline, &format, &pos)) {
846 + if (gst_element_query_position(item->pipeline, format, &pos)) {
847 if (pos != item->pos) {
849 gfloat result = 0.0f;
850 guint64 time_left = 0;
852 - if (gst_element_query_duration(item->pipeline, &format, &len)) {
853 + if (gst_element_query_duration(item->pipeline, format, &len)) {
854 gfloat processed = priv->elapsed_duration + ((pos - len) / GST_SECOND);
855 result = CLAMP(processed / priv->total_duration, 0.0f, 1.0f);
856 /* XXX this is a workaround to prevent the remaining time
857 diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-error.c gnac-0.2.4.1/libgnac/libgnac-error.c
858 --- gnac-0.2.4.1.orig/libgnac/libgnac-error.c 2012-01-26 01:28:46.000000000 +0100
859 +++ gnac-0.2.4.1/libgnac/libgnac-error.c 2015-01-09 23:49:31.336379238 +0100
861 gst_message_unref(msg);
864 - gchar *details[] = { detail, NULL };
865 + const gchar *details[] = { detail, NULL };
866 GstInstallPluginsReturn ret = gst_install_plugins_async(details, NULL,
867 libgnac_converter_missing_plugin_result_cb, item->parent);
869 diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-gst.c gnac-0.2.4.1/libgnac/libgnac-gst.c
870 --- gnac-0.2.4.1.orig/libgnac/libgnac-gst.c 2012-02-28 12:26:06.000000000 +0100
871 +++ gnac-0.2.4.1/libgnac/libgnac-gst.c 2015-01-09 23:49:31.336379238 +0100
875 GstElement *decodebin = libgnac_gstu_make_pipeline_element(item->pipeline,
876 - "decodebin2", NULL, &err);
877 + "decodebin", NULL, &err);
879 g_propagate_error(error, err);
884 LibgnacMediaItem *item = (LibgnacMediaItem *) data;
885 - GstCaps *caps = gst_pad_get_caps(pad);
886 + GstCaps *caps = gst_pad_query_caps(pad, NULL);
888 if (gst_caps_is_empty(caps) || gst_caps_is_any(caps)) {
889 libgnac_debug("Got a bad caps: %s", gst_caps_to_string(caps));
890 diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-metadata.c gnac-0.2.4.1/libgnac/libgnac-metadata.c
891 --- gnac-0.2.4.1.orig/libgnac/libgnac-metadata.c 2012-03-27 15:51:09.000000000 +0200
892 +++ gnac-0.2.4.1/libgnac/libgnac-metadata.c 2015-01-10 00:34:27.564874078 +0100
893 @@ -209,11 +209,14 @@
894 GstBuffer *buffer = gst_value_get_buffer(val);
895 g_return_if_fail(buffer);
897 + GstSample *sample = gst_value_get_sample(val);
898 + g_return_if_fail(sample);
900 gint image_type = GST_TAG_IMAGE_TYPE_NONE;
902 /* GST_TAG_PREVIEW_IMAGE does not have an "image-type" field */
903 if (g_str_equal(tag_name, GST_TAG_IMAGE)) {
904 - GstCaps *caps = GST_BUFFER_CAPS(buffer);
905 + GstCaps *caps = gst_sample_get_caps(sample);
906 g_return_if_fail(caps);
908 GstStructure *structure = gst_caps_get_structure(caps, 0);
911 GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
912 GError *error = NULL;
913 - guint8 *data = GST_BUFFER_DATA(buffer);
914 - guint size = GST_BUFFER_SIZE(buffer);
915 + GstMapInfo *info = NULL;
916 + gst_buffer_map(buffer, info, GST_MAP_READ);
917 + guint8 *data = info->data;
918 + guint size = info->size;
919 + gst_buffer_unmap(buffer, info);
921 if (!gdk_pixbuf_loader_write(loader, data, size, &error)) {
922 libgnac_debug("Error writing data to pixbuf: %s", error->message);
925 if (g_str_equal(tag_name, GST_TAG_DATE))
927 - g_return_if_fail(GST_VALUE_HOLDS_DATE(newval));
928 - const GDate *date = gst_value_get_date(newval);
929 + g_return_if_fail(G_VALUE_HOLDS(newval,G_TYPE_DATE));
930 + const GDate *date = g_value_get_boxed(newval);
932 GDateYear year = g_date_get_year(date);
933 g_value_unset(newval);
934 diff -Naur gnac-0.2.4.1.orig/src/gnac-options.c gnac-0.2.4.1/src/gnac-options.c
935 --- gnac-0.2.4.1.orig/src/gnac-options.c 2012-02-28 12:26:06.000000000 +0100
936 +++ gnac-0.2.4.1/src/gnac-options.c 2015-01-09 23:49:31.339712589 +0100
942 #include <glib/gi18n.h>
945 diff -Naur gnac-0.2.4.1.orig/src/Makefile.am gnac-0.2.4.1/src/Makefile.am
946 --- gnac-0.2.4.1.orig/src/Makefile.am 2012-03-01 00:35:14.000000000 +0100
947 +++ gnac-0.2.4.1/src/Makefile.am 2015-01-09 23:49:31.339712589 +0100
950 $(GSTREAMER_CFLAGS) \
957 $(top_builddir)/libgnac/libgnac.la \
964 diff -Naur gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-aac.c gnac-0.2.4.1/src/profiles/formats/gnac-profiles-aac.c
965 --- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-aac.c 2012-02-28 12:26:06.000000000 +0100
966 +++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-aac.c 2015-01-10 01:03:33.835412850 +0100
968 AudioProfileGeneric *generic;
971 - gchar *outputformat;
977 gnac_profiles_aac_init(void)
980 - GtkWidget *widget2;
982 gnac_profiles_default_init(&aac_bfi);
985 gnac_profiles_utils_init_widget(&aac_bfi, "combo-bitrate",
986 "//variable[@id='bitrate']");
989 - widget = gnac_profiles_utils_init_widget(&aac_bfi, "combo-profile",
990 - "//variable[@id='profile']");
991 - widget2 = gnac_profiles_utils_get_widget(&aac_bfi, "label-profile"),
992 - gnac_profiles_utils_add_description_tooltip(&aac_bfi,
993 - "//variable[@id='profile']/description", widget, widget2, NULL);
996 widget = gnac_profiles_utils_init_widget(&aac_bfi, "checkbutton-tns",
997 "//variable[@id='tns']");
998 gnac_profiles_utils_add_description_tooltip(&aac_bfi,
999 "//variable[@id='tns']/description", widget, NULL);
1002 - gnac_profiles_utils_init_widget(&aac_bfi, "combo-outputformat",
1003 - "//variable[@id='outputformat']");
1005 gnac_profiles_xml_engine_free_doc_xpath(aac_bfi.doc);
1010 gchar *pipeline = gnac_profiles_default_generate_pipeline(&aac_bfi);
1011 pipeline = gnac_profiles_utils_add_properties(pipeline, &aac_bfi,
1012 - "combo-bitrate", "combo-outputformat",
1013 - "combo-profile", "checkbutton-tns", NULL);
1014 + "combo-bitrate", "checkbutton-tns", NULL);
1016 gnac_profiles_properties_update_textbuffer(pipeline);
1018 + pipeline = gnac_profiles_utils_add_pipe(pipeline, "audio/mpeg, mpegversion=4, stream-format=adts ! aacparse");
1020 g_free(aac_bfi.pipeline);
1022 aac_bfi.pipeline = pipeline;
1025 gnac_profiles_default_reset_ui(&aac_bfi);
1026 gnac_profiles_utils_reset_values(&aac_bfi,
1027 - "combo-bitrate", "combo-outputformat",
1028 - "combo-profile", "checkbutton-tns", NULL);
1029 + "combo-bitrate", "checkbutton-tns", NULL);
1034 AudioProfileAAC *profile = (AudioProfileAAC *) data;
1035 gnac_profiles_utils_set_values(&aac_bfi,
1036 "combo-bitrate", profile->bitrate,
1037 - "combo-outputformat", profile->outputformat,
1038 - "combo-profile", profile->profile,
1039 "checkbutton-tns", profile->tns,
1043 gnac_profiles_utils_free_audio_profile_generic(profile->generic);
1045 g_free(profile->bitrate);
1046 - g_free(profile->outputformat);
1047 - g_free(profile->profile);
1048 g_free(profile->tns);
1053 gnac_profiles_utils_get_values_and_set(&aac_bfi,
1054 "combo-bitrate", &profile->bitrate,
1055 - "combo-outputformat", &profile->outputformat,
1056 - "combo-profile", &profile->profile,
1057 "checkbutton-tns", &profile->tns,
1061 XMLDoc *doc = gnac_profiles_default_save_profile(profile->generic, &aac_bfi);
1062 gnac_profiles_xml_engine_add_values(doc,
1063 "bitrate", profile->bitrate,
1064 - "outputformat", profile->outputformat,
1065 - "profile", profile->profile,
1066 "tns", profile->tns,
1068 gnac_profiles_xml_engine_save_doc(doc, profile->generic->name);
1070 gnac_profiles_utils_load_saved_profile(doc,
1071 "/audio-profile/format-specific/",
1072 "bitrate", &profile->bitrate,
1073 - "outputformat", &profile->outputformat,
1074 - "profile", &profile->profile,
1075 "tns", &profile->tns,
1080 gnac_profiles_default_clean_up(&aac_bfi);
1081 gnac_profiles_utils_free_values(&aac_bfi,
1082 - "combo-bitrate", "combo-outputformat",
1083 - "combo-profile", "checkbutton-tns", NULL);
1084 + "combo-bitrate", "checkbutton-tns", NULL);
1085 gnac_profiles_utils_free_basic_format_info(&aac_bfi);
1088 diff -Naur gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.c gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.c
1089 --- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.c 2012-02-28 12:26:06.000000000 +0100
1090 +++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.c 2015-01-09 23:49:31.339712589 +0100
1093 AudioProfileGeneric *generic;
1095 - gchar *encoding_mode;
1098 - gdouble compression_ratio;
1102 - gdouble mean_bitrate;
1103 - gchar *min_bitrate;
1104 - gchar *max_bitrate;
1121 BasicFormatInfo lame_bfi = {
1122 PKGDATADIR "/profiles/gnac-profiles-lame.xml",
1127 -gnac_profiles_lame_on_encoding_mode_changed(GtkComboBox *widget,
1128 +gnac_profiles_lame_on_target_changed(GtkComboBox *widget,
1131 gnac_profiles_lame_vbr_on_changed(widget);
1133 gnac_profiles_lame_init(void)
1136 - GtkWidget *widget2;
1138 gnac_profiles_default_init(&lame_bfi);
1140 @@ -102,42 +92,13 @@
1141 gnac_profiles_utils_init_widget(&lame_bfi, "slider-vbr-quality",
1142 "//variable[@id='quality']");
1144 - // Compression ratio
1145 - widget = gnac_profiles_utils_init_widget(&lame_bfi,
1146 - "slider-compression-ratio", "//variable[@id='compression-ratio']");
1147 - widget2 = gnac_profiles_utils_get_widget(&lame_bfi,
1148 - "label-compression-ratio");
1149 - gnac_profiles_utils_add_description_tooltip(&lame_bfi,
1150 - "//variable[@id='compression-ratio']/description",
1151 - widget, widget2, NULL);
1154 - gnac_profiles_utils_init_widget(&lame_bfi, "combo-preset",
1155 - "//variable[@id='preset']");
1158 - gnac_profiles_utils_init_widget(&lame_bfi, "slider-mean-abr",
1159 - "//variable[@id='mean-bitrate']");
1162 - gnac_profiles_utils_init_widget(&lame_bfi, "combo-mode",
1163 - "//variable[@id='mode']");
1166 - gnac_profiles_utils_init_widget(&lame_bfi, "slider-mean-vbr",
1167 - "//variable[@id='mean-bitrate']");
1168 + gnac_profiles_utils_init_widget(&lame_bfi, "combo-mono",
1169 + "//variable[@id='mono']");
1172 - gnac_profiles_utils_init_widget(&lame_bfi, "combo-min-vbr",
1173 - "//variable[@id='min-bitrate']");
1176 - gnac_profiles_utils_init_widget(&lame_bfi, "combo-max-vbr",
1177 - "//variable[@id='max-bitrate']");
1180 - widget = gnac_profiles_utils_init_widget(&lame_bfi, "combo-encoding-mode",
1181 - "//variable[@id='encoding-mode']");
1183 + widget = gnac_profiles_utils_init_widget(&lame_bfi, "combo-target",
1184 + "//variable[@id='target']");
1186 gnac_profiles_lame_vbr_on_changed(GTK_COMBO_BOX(widget));
1188 @@ -149,26 +110,6 @@
1192 -gnac_profiles_lame_show_abr_widgets(gboolean show)
1194 - GtkWidget *abr_widgets[] = {
1195 - gnac_profiles_utils_get_widget(&lame_bfi, "label-mean-bitrate"),
1196 - gnac_profiles_utils_get_widget(&lame_bfi, "slider-mean-abr"),
1197 - gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-min-bitrate"),
1198 - gnac_profiles_utils_get_widget(&lame_bfi, "combo-min-vbr"),
1199 - gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-max-bitrate"),
1200 - gnac_profiles_utils_get_widget(&lame_bfi, "combo-max-vbr")
1204 - for (i = 0; i < G_N_ELEMENTS(abr_widgets); i++) {
1205 - if (show) gtk_widget_show_all(abr_widgets[i]);
1206 - else gtk_widget_hide(abr_widgets[i]);
1212 gnac_profiles_lame_show_cbr_widgets(gboolean show)
1214 GtkWidget *cbr_widgets[] = {
1215 @@ -190,12 +131,6 @@
1216 GtkWidget *vbr_widgets[] = {
1217 gnac_profiles_utils_get_widget(&lame_bfi, "label-vbr"),
1218 gnac_profiles_utils_get_widget(&lame_bfi, "hbox-vbr"),
1219 - gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-mean-bitrate"),
1220 - gnac_profiles_utils_get_widget(&lame_bfi, "slider-mean-vbr"),
1221 - gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-min-bitrate"),
1222 - gnac_profiles_utils_get_widget(&lame_bfi, "combo-min-vbr"),
1223 - gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-max-bitrate"),
1224 - gnac_profiles_utils_get_widget(&lame_bfi, "combo-max-vbr")
1228 @@ -207,48 +142,12 @@
1232 -gnac_profiles_lame_show_presets_widgets(gboolean show)
1234 - GtkWidget *presets_widgets[] = {
1235 - gnac_profiles_utils_get_widget(&lame_bfi, "label-preset"),
1236 - gnac_profiles_utils_get_widget(&lame_bfi, "hbox-preset"),
1240 - for (i = 0; i < G_N_ELEMENTS(presets_widgets); i++) {
1241 - if (show) gtk_widget_show_all(presets_widgets[i]);
1242 - else gtk_widget_hide(presets_widgets[i]);
1248 -gnac_profiles_lame_show_compression_ratio_widgets(gboolean show)
1250 - GtkWidget *compression_ratio_widgets[] = {
1251 - gnac_profiles_utils_get_widget(&lame_bfi, "label-compression-ratio"),
1252 - gnac_profiles_utils_get_widget(&lame_bfi, "slider-compression-ratio"),
1256 - for (i = 0; i < G_N_ELEMENTS(compression_ratio_widgets); i++) {
1257 - if (show) gtk_widget_show_all(compression_ratio_widgets[i]);
1258 - else gtk_widget_hide(compression_ratio_widgets[i]);
1264 gnac_profiles_lame_vbr_on_changed(GtkComboBox *widget)
1266 - EncodingMode encoding_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
1267 + Target target = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
1269 - gnac_profiles_lame_show_abr_widgets(encoding_mode == AVERAGE_BITRATE);
1270 - gnac_profiles_lame_show_cbr_widgets(encoding_mode == CONSTANT_BITRATE);
1271 - gnac_profiles_lame_show_vbr_widgets(encoding_mode == VARIABLE_BITRATE);
1272 - gnac_profiles_lame_show_presets_widgets(encoding_mode == PRESETS);
1273 - gnac_profiles_lame_show_compression_ratio_widgets(
1274 - encoding_mode == COMPRESSION_RATIO);
1275 + gnac_profiles_lame_show_cbr_widgets(target == BITRATE);
1276 + gnac_profiles_lame_show_vbr_widgets(target == QUALITY);
1280 @@ -257,54 +156,25 @@
1282 gchar *pipeline = gnac_profiles_default_generate_pipeline(&lame_bfi);
1283 GtkWidget *widget = gnac_profiles_utils_get_widget(&lame_bfi,
1284 - "combo-encoding-mode");
1285 - EncodingMode encoding_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
1287 + Target target = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
1290 pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
1291 - "combo-mode", NULL);
1292 + "combo-mono", NULL);
1294 - switch (encoding_mode)
1297 - case CONSTANT_BITRATE:
1299 pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
1300 - "combo-encoding-mode", "combo-bitrate", NULL);
1301 + "combo-target", "combo-bitrate", NULL);
1304 - case AVERAGE_BITRATE:
1306 pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
1307 - "combo-encoding-mode", NULL);
1308 - pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
1309 - "%.0f", "slider-mean-abr", NULL);
1310 - pipeline = gnac_profiles_utils_add_properties_checked_combo(pipeline,
1312 - "combo-min-vbr", "checkbutton-min-bitrate",
1313 - "combo-max-vbr", "checkbutton-max-bitrate",
1317 - case VARIABLE_BITRATE:
1318 - pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
1319 - "combo-encoding-mode", NULL);
1320 + "combo-target", NULL);
1321 pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
1322 "%.0f", "slider-vbr-quality", NULL);
1323 - pipeline = gnac_profiles_utils_add_properties_checked_slider(pipeline,
1324 - &lame_bfi, "slider-mean-vbr", "checkbutton-mean-bitrate", NULL);
1325 - pipeline = gnac_profiles_utils_add_properties_checked_combo(pipeline,
1327 - "combo-min-vbr", "checkbutton-min-bitrate",
1328 - "combo-max-vbr", "checkbutton-max-bitrate",
1333 - pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
1334 - "combo-preset", NULL);
1337 - case COMPRESSION_RATIO:
1338 - pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
1339 - "%.0f", "slider-compression-ratio", NULL);
1343 @@ -321,26 +191,12 @@
1348 -gnac_profiles_lame_advanced_bitrate_on_toggle(GtkWidget *widget,
1349 - GtkToggleButton *togglebutton)
1351 - gnac_profiles_utils_on_toggle_optionnal_property(togglebutton, widget);
1352 - gnac_profiles_lame_generate_pipeline();
1357 gnac_profiles_lame_reset_ui(void)
1359 gnac_profiles_utils_reset_values(&lame_bfi,
1360 - "combo-mode", "combo-bitrate", "combo-min-vbr", "combo-max-vbr",
1361 - "combo-preset", "combo-encoding-mode", "slider-vbr-quality",
1362 - "slider-compression-ratio", "slider-mean-vbr", "slider-mean-abr",
1363 + "combo-mono", "combo-bitrate", "combo-target", "slider-vbr-quality",
1365 - gnac_profiles_utils_set_active_toggle_button(&lame_bfi, FALSE,
1366 - "checkbutton-mean-bitrate", "checkbutton-min-bitrate",
1367 - "checkbutton-max-bitrate", NULL);
1371 @@ -354,42 +210,18 @@
1373 AudioProfileLame *profile = (AudioProfileLame *) data;
1374 gnac_profiles_utils_set_values(&lame_bfi,
1375 - "combo-encoding-mode", profile->encoding_mode,
1376 - "combo-mode", profile->mode, NULL);
1377 + "combo-target", profile->target,
1378 + "combo-mono", profile->mono, NULL);
1380 if (profile->bitrate)
1382 gnac_profiles_utils_set_values(&lame_bfi,
1383 "combo-bitrate", profile->bitrate, NULL);
1385 - else if (profile->preset)
1387 - gnac_profiles_utils_set_values(&lame_bfi,
1388 - "combo-preset", profile->preset, NULL);
1390 - else if (profile->mean_abr != -1)
1392 - gnac_profiles_utils_set_values(&lame_bfi,
1393 - "slider-mean-abr", profile->mean_abr, NULL);
1394 - gnac_profiles_utils_set_values_checked(&lame_bfi,
1395 - "combo-min-vbr", "checkbutton-min-bitrate", profile->min_bitrate,
1396 - "combo-max-vbr", "checkbutton-max-bitrate", profile->max_bitrate,
1399 else if (profile->quality != -1)
1401 gnac_profiles_utils_set_values(&lame_bfi,
1402 "slider-vbr-quality", profile->quality, NULL);
1403 - gnac_profiles_utils_set_values_checked(&lame_bfi,
1404 - "combo-min-vbr", "checkbutton-min-bitrate", profile->min_bitrate,
1405 - "combo-max-vbr", "checkbutton-max-bitrate", profile->max_bitrate,
1406 - "slider-mean-vbr", "checkbutton-mean-bitrate", profile->mean_bitrate,
1409 - else if (profile->compression_ratio != -1)
1411 - gnac_profiles_utils_set_values(&lame_bfi,
1412 - "slider-compression-ratio", profile->compression_ratio, NULL);
1416 @@ -406,16 +238,10 @@
1418 AudioProfileLame *profile = g_malloc(sizeof(AudioProfileLame));
1420 - profile->encoding_mode = NULL;
1421 - profile->mode = NULL;
1422 + profile->target = NULL;
1423 + profile->mono = NULL;
1424 profile->bitrate = NULL;
1425 - profile->preset = NULL;
1426 profile->quality = -1;
1427 - profile->compression_ratio = -1;
1428 - profile->mean_bitrate = -1;
1429 - profile->mean_abr = -1;
1430 - profile->min_bitrate = NULL;
1431 - profile->max_bitrate = NULL;
1435 @@ -428,12 +254,9 @@
1437 AudioProfileLame *profile = (AudioProfileLame *) data;
1438 gnac_profiles_utils_free_audio_profile_generic(profile->generic);
1439 - g_free(profile->encoding_mode);
1440 - g_free(profile->mode);
1441 + g_free(profile->target);
1442 + g_free(profile->mono);
1443 g_free(profile->bitrate);
1444 - g_free(profile->min_bitrate);
1445 - g_free(profile->max_bitrate);
1446 - g_free(profile->preset);
1450 @@ -447,49 +270,23 @@
1451 profile->generic = generic;
1453 gnac_profiles_utils_get_values_and_set(&lame_bfi,
1454 - "combo-encoding-mode", &profile->encoding_mode,
1455 - "combo-mode", &profile->mode,
1456 + "combo-target", &profile->target,
1457 + "combo-mono", &profile->mono,
1460 GtkWidget *widget = gnac_profiles_utils_get_widget(&lame_bfi,
1461 - "combo-encoding-mode");
1464 switch (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)))
1466 - case CONSTANT_BITRATE:
1468 gnac_profiles_utils_get_values_and_set(&lame_bfi,
1469 "combo-bitrate", &profile->bitrate, NULL);
1472 - case AVERAGE_BITRATE:
1473 - gnac_profiles_utils_get_values_and_set(&lame_bfi,
1474 - "slider-mean-abr", &profile->mean_abr, NULL);
1475 - gnac_profiles_utils_get_values_checked_combo_and_set(&lame_bfi,
1476 - "combo-min-vbr", "checkbutton-min-bitrate", &profile->min_bitrate,
1477 - "combo-max-vbr", "checkbutton-max-bitrate", &profile->max_bitrate,
1481 - case VARIABLE_BITRATE:
1483 gnac_profiles_utils_get_values_and_set(&lame_bfi,
1484 "slider-vbr-quality", &profile->quality, NULL);
1485 - gnac_profiles_utils_get_values_checked_slider_and_set(&lame_bfi,
1486 - "slider-mean-vbr", "checkbutton-mean-bitrate", &profile->mean_bitrate,
1488 - gnac_profiles_utils_get_values_checked_combo_and_set(&lame_bfi,
1489 - "combo-min-vbr", "checkbutton-min-bitrate", &profile->min_bitrate,
1490 - "combo-max-vbr", "checkbutton-max-bitrate", &profile->max_bitrate,
1495 - gnac_profiles_utils_get_values_and_set(&lame_bfi,
1496 - "combo-preset", &profile->preset, NULL);
1499 - case COMPRESSION_RATIO:
1500 - gnac_profiles_utils_get_values_and_set(&lame_bfi,
1501 - "slider-compression-ratio", &profile->compression_ratio, NULL);
1505 @@ -513,49 +310,25 @@
1508 gchar *quality = NULL;
1509 - gchar *mean_bitrate = NULL;
1510 - gchar *mean_abr = NULL;
1511 - gchar *compression_ratio = NULL;
1512 AudioProfileLame *profile = (AudioProfileLame *) data;
1514 if (profile->quality != -1)
1516 quality = gnac_profiles_utils_gdouble_to_gchararray(profile->quality);
1518 - if (profile->mean_bitrate != -1) {
1519 - mean_bitrate = gnac_profiles_utils_gdouble_to_gchararray(
1520 - profile->mean_bitrate);
1523 - else if (profile->mean_abr != -1)
1525 - mean_abr = gnac_profiles_utils_gdouble_to_gchararray(profile->mean_abr);
1527 - else if (profile->compression_ratio != -1) {
1528 - compression_ratio = gnac_profiles_utils_gdouble_to_gchararray(
1529 - profile->compression_ratio);
1532 XMLDoc *doc = gnac_profiles_default_save_profile(profile->generic, &lame_bfi);
1533 gnac_profiles_xml_engine_add_values(doc,
1534 - "encoding-mode", profile->encoding_mode,
1535 + "target", profile->target,
1536 "bitrate", profile->bitrate,
1538 - "compression-ratio", compression_ratio,
1539 - "preset", profile->preset,
1540 - "mean-abr", mean_abr,
1541 - "mean-bitrate", mean_bitrate,
1542 - "min-bitrate", profile->min_bitrate,
1543 - "max-bitrate", profile->max_bitrate,
1544 - "mode", profile->mode,
1545 + "mono", profile->mono,
1548 gnac_profiles_xml_engine_save_doc(doc, profile->generic->name);
1550 gnac_profiles_xml_engine_free_doc_xpath(doc);
1552 - g_free(mean_bitrate);
1553 - g_free(compression_ratio);
1557 @@ -564,42 +337,20 @@
1558 AudioProfileGeneric *generic)
1561 - gchar *mean_bitrate;
1563 - gchar *compression_ratio;
1565 AudioProfileLame *profile = gnac_profiles_lame_audio_profile_new();
1566 profile->generic = generic;
1567 gnac_profiles_utils_load_saved_profile(doc,
1568 "/audio-profile/format-specific/",
1569 - "encoding-mode", &profile->encoding_mode,
1570 + "target", &profile->target,
1571 "bitrate", &profile->bitrate,
1572 "quality", &quality,
1573 - "compression-ratio", &compression_ratio,
1574 - "preset", &profile->preset,
1575 - "mean-abr", &mean_abr,
1576 - "mean-bitrate", &mean_bitrate,
1577 - "min-bitrate", &profile->min_bitrate,
1578 - "max-bitrate", &profile->max_bitrate,
1579 - "mode", &profile->mode,
1580 + "mono", &profile->mono,
1584 profile->quality = gnac_profiles_utils_gchararray_to_gdouble(quality);
1587 - if (mean_bitrate) {
1588 - profile->mean_bitrate = gnac_profiles_utils_gchararray_to_gdouble(
1590 - g_free(mean_bitrate);
1592 - } else if (mean_abr) {
1593 - profile->mean_abr = gnac_profiles_utils_gchararray_to_gdouble(mean_abr);
1595 - } else if (compression_ratio) {
1596 - profile->compression_ratio = gnac_profiles_utils_gchararray_to_gdouble(
1597 - compression_ratio);
1598 - g_free(compression_ratio);
1604 gnac_profiles_default_clean_up(&lame_bfi);
1605 gnac_profiles_utils_free_values(&lame_bfi,
1606 - "combo-mode", "combo-bitrate", "combo-min-vbr", "combo-max-vbr",
1607 - "combo-preset", "combo-encoding-mode", "slider-vbr-quality",
1608 - "slider-compression-ratio", "slider-mean-vbr", "slider-mean-abr",
1609 + "combo-mono", "combo-bitrate", "combo-target", "slider-vbr-quality",
1611 gnac_profiles_utils_free_basic_format_info(&lame_bfi);
1613 diff -Naur gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.h gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.h
1614 --- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.h 2012-01-26 01:28:46.000000000 +0100
1615 +++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.h 2015-01-09 23:49:31.343045941 +0100
1617 gnac_profiles_lame_generate_pipeline(void);
1620 -gnac_profiles_lame_on_encoding_mode_changed(GtkComboBox *widget,
1621 - gpointer user_data);
1622 +gnac_profiles_lame_on_target_changed(GtkComboBox *widget,
1623 + gpointer user_data);
1626 gnac_profiles_lame_advanced_bitrate_on_toggle(GtkWidget *widget,
1627 diff -Naur gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-unknown.c gnac-0.2.4.1/src/profiles/formats/gnac-profiles-unknown.c
1628 --- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-unknown.c 2012-02-27 11:27:10.000000000 +0100
1629 +++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-unknown.c 2015-01-09 23:49:31.343045941 +0100
1633 const gchar *base_pipeline =
1634 - "audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert !";
1635 + "audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert !";
1637 static GtkTextView *pipeline_text_view;
1638 static GtkWidget *pipeline_box;
1639 diff -Naur gnac-0.2.4.1.orig/src/profiles/gnac-profiles-default.c gnac-0.2.4.1/src/profiles/gnac-profiles-default.c
1640 --- gnac-0.2.4.1.orig/src/profiles/gnac-profiles-default.c 2012-04-22 14:09:01.000000000 +0200
1641 +++ gnac-0.2.4.1/src/profiles/gnac-profiles-default.c 2015-01-09 23:49:31.343045941 +0100
1643 * Boston, MA 02110-1301 USA
1646 +#include <stdlib.h>
1647 #include <glib/gstdio.h>
1649 #include "gnac-main.h"