void-packages/srcpkgs/gnac/patches/gstreamer-1.0.patch

1649 lines
70 KiB
Diff

diff -Naur gnac-0.2.4.1.orig/configure.ac gnac-0.2.4.1/configure.ac
--- gnac-0.2.4.1.orig/configure.ac 2012-04-22 14:09:01.000000000 +0200
+++ gnac-0.2.4.1/configure.ac 2015-01-09 23:55:03.296384170 +0100
@@ -93,21 +93,21 @@
dnl Find the GStreamer libraries
GSTREAMER_REQUIRED_VERSION=0.10.31
PKG_CHECK_MODULES(GSTREAMER, [
- gstreamer-0.10 >= $GSTREAMER_REQUIRED_VERSION
- gstreamer-base-0.10 >= $GSTREAMER_REQUIRED_VERSION
- gstreamer-pbutils-0.10 >= $GSTREAMER_REQUIRED_VERSION
- gstreamer-plugins-base-0.10 >= $GSTREAMER_REQUIRED_VERSION
- gstreamer-tag-0.10 >= $GSTREAMER_REQUIRED_VERSION
+ gstreamer-1.0 >= $GSTREAMER_REQUIRED_VERSION
+ gstreamer-base-1.0 >= $GSTREAMER_REQUIRED_VERSION
+ gstreamer-pbutils-1.0 >= $GSTREAMER_REQUIRED_VERSION
+ gstreamer-plugins-base-1.0 >= $GSTREAMER_REQUIRED_VERSION
+ gstreamer-tag-1.0 >= $GSTREAMER_REQUIRED_VERSION
])
AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)
dnl Find the GStreamer elements we use, and warn if they are not present
-AM_GST_ELEMENT_CHECK(faac, , AC_MSG_WARN([The 'faac' element was not found. This will cause encoding to AAC to fail.]))
-AM_GST_ELEMENT_CHECK(flacenc, , AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
-AM_GST_ELEMENT_CHECK(lame, , AC_MSG_WARN([The 'lame' element was not found. This will cause encoding to MP3 to fail.]))
-AM_GST_ELEMENT_CHECK(wavenc, , AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to WAV to fail.]))
-AM_GST_ELEMENT_CHECK(wavpackenc, , AC_MSG_WARN([The 'wavpackenc' element was not found. This will cause encoding to WAVPACK to fail.]))
+GST_ELEMENT_CHECK(faac, 1.0, , AC_MSG_WARN([The 'faac' element was not found. This will cause encoding to AAC to fail.]))
+GST_ELEMENT_CHECK(flacenc, 1.0, , AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
+GST_ELEMENT_CHECK(lamemp3enc, 1.0, , AC_MSG_WARN([The 'lamemp3enc' element was not found. This will cause encoding to MP3 to fail.]))
+GST_ELEMENT_CHECK(wavenc, 1.0, , AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to WAV to fail.]))
+GST_ELEMENT_CHECK(wavpackenc, 1.0, , AC_MSG_WARN([The 'wavpackenc' element was not found. This will cause encoding to WAVPACK to fail.]))
dnl Optionnaly enable G* deprecations
AC_MSG_CHECKING([Wether to enable deprecation warnings])
diff -Naur gnac-0.2.4.1.orig/data/profiles/aac.xml.in gnac-0.2.4.1/data/profiles/aac.xml.in
--- gnac-0.2.4.1.orig/data/profiles/aac.xml.in 2012-01-26 01:28:46.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/aac.xml.in 2015-01-09 23:49:31.329712534 +0100
@@ -11,8 +11,8 @@
<pipeline>
<process id="gstreamer-audio">faac</process>
<process id="multiplexer">
- <value value="ffmux_mp4">...</value>
- </process>
+ <value value="mp4mux">...</value>
+ </process>
<variable id="bitrate" type="combo">
<name>Bitrate</name>
<variable-name>bitrate</variable-name>
@@ -37,33 +37,12 @@
<value value="320000">320 Kbps</value>
</possible-values>
</variable>
- <variable id="profile" type="combo">
- <name>Profile</name>
- <_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>
- <variable-name>profile</variable-name>
- <default-value>1</default-value>
- <possible-values>
- <value value="1">Main (MAIN)</value>
- <value value="2">Low complexity (LC)</value>
- <value value="3">Scalable sampling rate (SSR)</value>
- <value value="4">Long term prediction (LTP)</value>
- </possible-values>
- </variable>
- <variable id="tns" type="check">
+ <variable id="tns" type="check">
<name>Temporal noise shaping</name>
<_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>
<variable-name>tns</variable-name>
<default-value>false</default-value>
</variable>
- <variable id="outputformat" type="combo">
- <name>Output format</name>
- <variable-name>outputformat</variable-name>
- <default-value>1</default-value>
- <possible-values>
- <_value value="1">ADTS headers</_value>
- <_value value="0">Raw AAC</_value>
- </possible-values>
- </variable>
</pipeline>
</profile>
</profiles>
diff -Naur gnac-0.2.4.1.orig/data/profiles/base.xml.in gnac-0.2.4.1/data/profiles/base.xml.in
--- gnac-0.2.4.1.orig/data/profiles/base.xml.in 2012-01-26 01:28:46.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/base.xml.in 2015-01-09 23:49:31.329712534 +0100
@@ -21,7 +21,7 @@
</variable>
</preset-variables>
<pipeline>
- <process id="gstreamer-audio">audio/x-raw-int</process>
+ <process id="gstreamer-audio">audio/x-raw</process>
<process id="audioconvert">audioconvert</process>
</pipeline>
</audio-profiles>
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
--- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_AAC.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_AAC.xml.in 2015-01-10 01:03:29.951986568 +0100
@@ -8,12 +8,10 @@
<_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>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! faac bitrate=128000 outputformat=1</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! faac bitrate=128000 ! audio/mpeg, mpegversion=4, stream-format=adts ! aacparse</pipeline>
</base>
<format-specific>
<bitrate>128000</bitrate>
- <outputformat>1</outputformat>
- <profile>1</profile>
<tns>false</tns>
</format-specific>
</audio-profile>
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
--- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossless.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossless.xml.in 2015-01-09 23:49:31.329712534 +0100
@@ -8,7 +8,7 @@
<_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>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! flacenc name=enc quality=5</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! flacenc name=enc quality=5</pipeline>
</base>
<format-specific>
<quality>5</quality>
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
--- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_Lossy.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_Lossy.xml.in 2015-01-09 23:49:31.333045887 +0100
@@ -8,7 +8,7 @@
<_description>Used for converting to CD-quality audio, but with a lossy compression codec. Use this for CD extraction and radio recordings.</_description>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! vorbisenc name=enc quality=0.5 ! oggmux</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! vorbisenc name=enc quality=0.5 ! oggmux</pipeline>
</base>
<format-specific>
<quality>0.5</quality>
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
--- gnac-0.2.4.1.orig/data/profiles/default/CD_Quality,_MP3.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/CD_Quality,_MP3.xml.in 2015-01-09 23:49:31.333045887 +0100
@@ -8,18 +8,12 @@
<_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>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! lame name=enc mode=4 vbr=4 vbr-quality=6 ! xingmux ! id3v2mux</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! lamemp3enc name=enc target=quality quality=4 ! xingmux ! id3v2mux</pipeline>
</base>
<format-specific>
- <encoding-mode>4</encoding-mode>
+ <target>quality</target>
<bitrate/>
- <quality>6</quality>
- <compression-ratio/>
- <preset/>
- <mean-abr/>
- <mean-bitrate/>
- <min-bitrate/>
- <max-bitrate/>
- <mode>4</mode>
+ <quality>4</quality>
+ <mono/>
</format-specific>
</audio-profile>
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
--- gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossless.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/Voice,_Lossless.xml.in 2015-01-09 23:49:31.333045887 +0100
@@ -8,7 +8,7 @@
<_description>Used for converting to lossless voice-quality audio. Use this for recording and editing speech.</_description>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-int, rate=44100, channels=2 ! audioconvert ! wavenc name=enc</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! wavenc name=enc</pipeline>
</base>
<format-specific>
</format-specific>
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
--- gnac-0.2.4.1.orig/data/profiles/default/Voice,_Lossy.xml.in 2012-01-25 17:27:37.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/default/Voice,_Lossy.xml.in 2015-01-09 23:49:31.333045887 +0100
@@ -8,7 +8,7 @@
<_description>Used for converting to lossy voice-quality audio. Use this for recording speech that doesn't need to be edited.</_description>
<channels>2</channels>
<sample-rate>44100</sample-rate>
- <pipeline>audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert ! speexenc name=enc quality=8 vad=false mode=0 ! oggmux</pipeline>
+ <pipeline>audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert ! speexenc name=enc quality=8 vad=false mode=0 ! oggmux</pipeline>
</base>
<format-specific>
<bitrate-cbr/>
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
--- gnac-0.2.4.1.orig/data/profiles/mp3-lame.xml.in 2012-01-26 01:28:46.000000000 +0100
+++ gnac-0.2.4.1/data/profiles/mp3-lame.xml.in 2015-01-09 23:49:31.333045887 +0100
@@ -13,58 +13,27 @@
<mimetype>application/x-id3</mimetype>
<mimetype>audio/x-mp3</mimetype>
<pipeline>
- <process id="gstreamer-audio">lame name=enc</process>
+ <process id="gstreamer-audio">lamemp3enc name=enc</process>
<process id="multiplexer">
<value value="xingmux">Add Xing header</value>
<value value="id3v2mux">Add id3v2 header</value>
</process>
- <variable id="preset" type="combo">
- <name>Preset</name>
- <variable-name>preset</variable-name>
- <default-value>1006</default-value>
- <possible-values>
- <_value value="1006">Medium</_value>
- <_value value="1001">Standard</_value>
- <_value value="1002">Extreme</_value>
- <_value value="1003">Insane</_value>
- </possible-values>
- </variable>
- <variable id="encoding-mode" type="combo">
- <name>Bitrate mode</name>
- <variable-name>vbr</variable-name>
+ <variable id="target" type="combo">
+ <name>Target</name>
+ <variable-name>target</variable-name>
<default-value>0</default-value>
<possible-values>
- <_value value="0">Constant bitrate (CBR)</_value>
- <_value value="3">Average bitrate (ABR)</_value>
- <_value value="4">Variable bitrate (VBR)</_value>
- <_value value="5">Presets</_value>
- <_value value="6">Compression ratio</_value>
+ <_value value="quality">Quality</_value>
+ <_value value="bitrate">Bitrate</_value>
</possible-values>
</variable>
<variable id="quality" type="slider">
<name>VBR quality</name>
- <variable-name>vbr-quality</variable-name>
+ <variable-name>quality</variable-name>
<min-value>0.0</min-value>
- <max-value>9.0</max-value>
+ <max-value>10.0</max-value>
<step-value>1.0</step-value>
- <default-value>3.0</default-value>
- </variable>
- <variable id="compression-ratio" type="slider">
- <name>Compression ratio</name>
- <_description>Let lame choose bitrate to achieve selected compression ratio.</_description>
- <variable-name>compression-ratio</variable-name>
- <min-value>0.0</min-value>
- <max-value>200</max-value>
- <step-value>1.0</step-value>
- <default-value>0.0</default-value>
- </variable>
- <variable id="mean-bitrate" type="slider">
- <name>VBR mean bitrate</name>
- <variable-name>vbr-mean-bitrate</variable-name>
- <min-value>0.0</min-value>
- <max-value>330.0</max-value>
- <step-value>1.0</step-value>
- <default-value>192</default-value>
+ <default-value>4.0</default-value>
</variable>
<variable id="bitrate" type="combo">
<name>Bitrate</name>
@@ -90,64 +59,13 @@
<value value="320">320 Kbps</value>
</possible-values>
</variable>
- <variable id="min-bitrate" type="combo">
- <name>VBR minimum bitrate</name>
- <variable-name>vbr-min-bitrate</variable-name>
- <default-value>128</default-value>
- <possible-values>
- <value value="8">8 Kbps</value>
- <value value="16">16 Kbps</value>
- <value value="24">24 Kbps</value>
- <value value="32">32 Kbps</value>
- <value value="40">40 Kbps</value>
- <value value="48">48 Kbps</value>
- <value value="56">56 Kbps</value>
- <value value="64">64 Kbps</value>
- <value value="80">80 Kbps</value>
- <value value="96">96 Kbps</value>
- <value value="112">112 Kbps</value>
- <value value="128">128 Kbps</value>
- <value value="160">160 Kbps</value>
- <value value="192">192 Kbps</value>
- <value value="224">224 Kbps</value>
- <value value="256">256 Kbps</value>
- <value value="320">320 Kbps</value>
- </possible-values>
- </variable>
- <variable id="max-bitrate" type="combo">
- <name>VBR maximum bitrate</name>
- <variable-name>vbr-max-bitrate</variable-name>
- <default-value>128</default-value>
- <possible-values>
- <value value="8">8 Kbps</value>
- <value value="16">16 Kbps</value>
- <value value="24">24 Kbps</value>
- <value value="32">32 Kbps</value>
- <value value="40">40 Kbps</value>
- <value value="48">48 Kbps</value>
- <value value="56">56 Kbps</value>
- <value value="64">64 Kbps</value>
- <value value="80">80 Kbps</value>
- <value value="96">96 Kbps</value>
- <value value="112">112 Kbps</value>
- <value value="128">128 Kbps</value>
- <value value="160">160 Kbps</value>
- <value value="192">192 Kbps</value>
- <value value="224">224 Kbps</value>
- <value value="256">256 Kbps</value>
- <value value="320">320 Kbps</value>
- </possible-values>
- </variable>
- <variable id="mode" type="combo">
+ <variable id="mono" type="combo">
<name>Mode</name>
- <variable-name>mode</variable-name>
- <default-value>4</default-value>
+ <variable-name>mono</variable-name>
+ <default-value>0</default-value>
<possible-values>
- <_value value="0">Stereo</_value>
- <_value value="1">Joint Stereo</_value>
- <_value value="2">Dual Channel</_value>
- <_value value="3">Mono</_value>
- <_value value="4">Auto</_value>
+ <_value value="0">Auto</_value>
+ <_value value="1">Mono</_value>
</possible-values>
</variable>
</pipeline>
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
--- gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-aac.xml 2012-04-22 14:09:01.000000000 +0200
+++ gnac-0.2.4.1/data/profiles/ui/gnac-profiles-aac.xml 2015-01-09 23:49:31.333045887 +0100
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAlignment" id="properties-alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -26,84 +27,6 @@
<property name="row_spacing">5</property>
<property name="column_spacing">10</property>
<child>
- <object class="GtkLabel" id="label-outputformat">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Output format</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox-outputformat">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="combo-outputformat">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label-profile">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Profile</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox-profile">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="combo-profile">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="checkbutton-tns">
<property name="label" translatable="yes">Temporal noise shaping</property>
<property name="use_action_appearance">False</property>
@@ -111,16 +34,14 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
- <property name="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="gnac_profiles_aac_generate_pipeline" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">1</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -146,7 +67,6 @@
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -170,8 +90,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -184,8 +102,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
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
--- gnac-0.2.4.1.orig/data/profiles/ui/gnac-profiles-lame.xml 2012-04-22 14:09:01.000000000 +0200
+++ gnac-0.2.4.1/data/profiles/ui/gnac-profiles-lame.xml 2015-01-09 23:49:31.336379238 +0100
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">1</property>
@@ -10,9 +11,6 @@
<object class="GtkAdjustment" id="adjustment2">
<property name="step_increment">1</property>
</object>
- <object class="GtkAdjustment" id="adjustment3">
- <property name="step_increment">1</property>
- </object>
<object class="GtkAlignment" id="properties-alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -44,7 +42,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkComboBoxText" id="combo-mode">
+ <object class="GtkComboBoxText" id="combo-mono">
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
@@ -60,8 +58,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -74,133 +70,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton-mean-bitrate">
- <property name="label" translatable="yes">Mean bitrate</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="slider-mean-vbr" swapped="yes"/>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton-min-bitrate">
- <property name="label" translatable="yes">Min bitrate</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="combo-min-vbr" swapped="yes"/>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton-max-bitrate">
- <property name="label" translatable="yes">Max bitrate</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="gnac_profiles_lame_advanced_bitrate_on_toggle" object="combo-max-vbr" swapped="yes"/>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="slider-mean-vbr">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment1</property>
- <property name="digits">0</property>
- <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="combo-min-vbr">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="combo-max-vbr">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -223,9 +92,8 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">3</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -233,10 +101,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkComboBoxText" id="combo-encoding-mode">
+ <object class="GtkComboBoxText" id="combo-target">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_lame_on_encoding_mode_changed" swapped="no"/>
+ <signal name="changed" handler="gnac_profiles_lame_on_target_changed" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -249,8 +117,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -274,47 +140,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox-preset">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkComboBoxText" id="combo-preset">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label-preset">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Preset</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -327,8 +152,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -336,13 +159,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Constant bitrate (CBR)</property>
+ <property name="label" translatable="yes">Bitrate</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -350,13 +171,11 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Encoding mode</property>
+ <property name="label" translatable="yes">Target</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -414,69 +233,12 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label-mean-bitrate">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Average bitrate (ABR)</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="slider-mean-abr">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment1</property>
- <property name="digits">0</property>
- <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label-compression-ratio">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Compression ratio</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="slider-compression-ratio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">adjustment3</property>
- <property name="digits">0</property>
- <signal name="value-changed" handler="gnac_profiles_lame_generate_pipeline" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="step_increment">1</property>
+ </object>
</interface>
diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-converter.c gnac-0.2.4.1/libgnac/libgnac-converter.c
--- gnac-0.2.4.1.orig/libgnac/libgnac-converter.c 2012-03-22 16:50:45.000000000 +0100
+++ gnac-0.2.4.1/libgnac/libgnac-converter.c 2015-01-09 23:49:31.336379238 +0100
@@ -1000,13 +1000,13 @@
gint64 pos;
static GstFormat format = GST_FORMAT_TIME;
- if (gst_element_query_position(item->pipeline, &format, &pos)) {
+ if (gst_element_query_position(item->pipeline, format, &pos)) {
if (pos != item->pos) {
gint64 len;
gfloat result = 0.0f;
guint64 time_left = 0;
- if (gst_element_query_duration(item->pipeline, &format, &len)) {
+ if (gst_element_query_duration(item->pipeline, format, &len)) {
gfloat processed = priv->elapsed_duration + ((pos - len) / GST_SECOND);
result = CLAMP(processed / priv->total_duration, 0.0f, 1.0f);
/* XXX this is a workaround to prevent the remaining time
diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-error.c gnac-0.2.4.1/libgnac/libgnac-error.c
--- gnac-0.2.4.1.orig/libgnac/libgnac-error.c 2012-01-26 01:28:46.000000000 +0100
+++ gnac-0.2.4.1/libgnac/libgnac-error.c 2015-01-09 23:49:31.336379238 +0100
@@ -52,7 +52,7 @@
gst_message_unref(msg);
if (!detail) return;
- gchar *details[] = { detail, NULL };
+ const gchar *details[] = { detail, NULL };
GstInstallPluginsReturn ret = gst_install_plugins_async(details, NULL,
libgnac_converter_missing_plugin_result_cb, item->parent);
g_free(detail);
diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-gst.c gnac-0.2.4.1/libgnac/libgnac-gst.c
--- gnac-0.2.4.1.orig/libgnac/libgnac-gst.c 2012-02-28 12:26:06.000000000 +0100
+++ gnac-0.2.4.1/libgnac/libgnac-gst.c 2015-01-09 23:49:31.336379238 +0100
@@ -223,7 +223,7 @@
/* decodebin */
GstElement *decodebin = libgnac_gstu_make_pipeline_element(item->pipeline,
- "decodebin2", NULL, &err);
+ "decodebin", NULL, &err);
if (err) {
g_propagate_error(error, err);
return;
@@ -382,7 +382,7 @@
gpointer data)
{
LibgnacMediaItem *item = (LibgnacMediaItem *) data;
- GstCaps *caps = gst_pad_get_caps(pad);
+ GstCaps *caps = gst_pad_query_caps(pad, NULL);
if (gst_caps_is_empty(caps) || gst_caps_is_any(caps)) {
libgnac_debug("Got a bad caps: %s", gst_caps_to_string(caps));
diff -Naur gnac-0.2.4.1.orig/libgnac/libgnac-metadata.c gnac-0.2.4.1/libgnac/libgnac-metadata.c
--- gnac-0.2.4.1.orig/libgnac/libgnac-metadata.c 2012-03-27 15:51:09.000000000 +0200
+++ gnac-0.2.4.1/libgnac/libgnac-metadata.c 2015-01-10 00:34:27.564874078 +0100
@@ -209,11 +209,14 @@
GstBuffer *buffer = gst_value_get_buffer(val);
g_return_if_fail(buffer);
+ GstSample *sample = gst_value_get_sample(val);
+ g_return_if_fail(sample);
+
gint image_type = GST_TAG_IMAGE_TYPE_NONE;
/* GST_TAG_PREVIEW_IMAGE does not have an "image-type" field */
if (g_str_equal(tag_name, GST_TAG_IMAGE)) {
- GstCaps *caps = GST_BUFFER_CAPS(buffer);
+ GstCaps *caps = gst_sample_get_caps(sample);
g_return_if_fail(caps);
GstStructure *structure = gst_caps_get_structure(caps, 0);
@@ -231,8 +234,11 @@
{
GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
GError *error = NULL;
- guint8 *data = GST_BUFFER_DATA(buffer);
- guint size = GST_BUFFER_SIZE(buffer);
+ GstMapInfo *info = NULL;
+ gst_buffer_map(buffer, info, GST_MAP_READ);
+ guint8 *data = info->data;
+ guint size = info->size;
+ gst_buffer_unmap(buffer, info);
if (!gdk_pixbuf_loader_write(loader, data, size, &error)) {
libgnac_debug("Error writing data to pixbuf: %s", error->message);
@@ -297,8 +303,8 @@
if (g_str_equal(tag_name, GST_TAG_DATE))
{
- g_return_if_fail(GST_VALUE_HOLDS_DATE(newval));
- const GDate *date = gst_value_get_date(newval);
+ g_return_if_fail(G_VALUE_HOLDS(newval,G_TYPE_DATE));
+ const GDate *date = g_value_get_boxed(newval);
if (!date) return;
GDateYear year = g_date_get_year(date);
g_value_unset(newval);
diff -Naur gnac-0.2.4.1.orig/src/gnac-options.c gnac-0.2.4.1/src/gnac-options.c
--- gnac-0.2.4.1.orig/src/gnac-options.c 2012-02-28 12:26:06.000000000 +0100
+++ gnac-0.2.4.1/src/gnac-options.c 2015-01-09 23:49:31.339712589 +0100
@@ -27,6 +27,7 @@
#include "config.h"
#endif
+#include <stdlib.h>
#include <glib/gi18n.h>
#include <gst/gst.h>
diff -Naur gnac-0.2.4.1.orig/src/Makefile.am gnac-0.2.4.1/src/Makefile.am
--- gnac-0.2.4.1.orig/src/Makefile.am 2012-03-01 00:35:14.000000000 +0100
+++ gnac-0.2.4.1/src/Makefile.am 2015-01-09 23:49:31.339712589 +0100
@@ -73,6 +73,7 @@
$(AM_CFLAGS) \
$(GSTREAMER_CFLAGS) \
$(GTK_CFLAGS) \
+ $(LIBXML_CFLAGS) \
$(NOTIFY_CFLAGS) \
$(UNIQUE_CFLAGS) \
$(WARN_CFLAGS) \
@@ -82,6 +83,7 @@
$(top_builddir)/libgnac/libgnac.la \
$(GSTREAMER_LIBS) \
$(GTK_LIBS) \
+ $(LIBXML_LIBS) \
$(NOTIFY_LIBS) \
$(UNIQUE_LIBS)
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
--- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-aac.c 2012-02-28 12:26:06.000000000 +0100
+++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-aac.c 2015-01-10 01:03:33.835412850 +0100
@@ -34,8 +34,6 @@
AudioProfileGeneric *generic;
gchar *bitrate;
- gchar *outputformat;
- gchar *profile;
gchar *tns;
}
AudioProfileAAC;
@@ -60,7 +58,6 @@
gnac_profiles_aac_init(void)
{
GtkWidget *widget;
- GtkWidget *widget2;
gnac_profiles_default_init(&aac_bfi);
@@ -68,23 +65,12 @@
gnac_profiles_utils_init_widget(&aac_bfi, "combo-bitrate",
"//variable[@id='bitrate']");
- // Profile
- widget = gnac_profiles_utils_init_widget(&aac_bfi, "combo-profile",
- "//variable[@id='profile']");
- widget2 = gnac_profiles_utils_get_widget(&aac_bfi, "label-profile"),
- gnac_profiles_utils_add_description_tooltip(&aac_bfi,
- "//variable[@id='profile']/description", widget, widget2, NULL);
-
// Tns
widget = gnac_profiles_utils_init_widget(&aac_bfi, "checkbutton-tns",
"//variable[@id='tns']");
gnac_profiles_utils_add_description_tooltip(&aac_bfi,
"//variable[@id='tns']/description", widget, NULL);
- // Outputformat
- gnac_profiles_utils_init_widget(&aac_bfi, "combo-outputformat",
- "//variable[@id='outputformat']");
-
gnac_profiles_xml_engine_free_doc_xpath(aac_bfi.doc);
aac_bfi.doc = NULL;
@@ -97,11 +83,12 @@
{
gchar *pipeline = gnac_profiles_default_generate_pipeline(&aac_bfi);
pipeline = gnac_profiles_utils_add_properties(pipeline, &aac_bfi,
- "combo-bitrate", "combo-outputformat",
- "combo-profile", "checkbutton-tns", NULL);
+ "combo-bitrate", "checkbutton-tns", NULL);
gnac_profiles_properties_update_textbuffer(pipeline);
+ pipeline = gnac_profiles_utils_add_pipe(pipeline, "audio/mpeg, mpegversion=4, stream-format=adts ! aacparse");
+
g_free(aac_bfi.pipeline);
aac_bfi.pipeline = pipeline;
@@ -113,8 +100,7 @@
{
gnac_profiles_default_reset_ui(&aac_bfi);
gnac_profiles_utils_reset_values(&aac_bfi,
- "combo-bitrate", "combo-outputformat",
- "combo-profile", "checkbutton-tns", NULL);
+ "combo-bitrate", "checkbutton-tns", NULL);
}
@@ -129,8 +115,6 @@
AudioProfileAAC *profile = (AudioProfileAAC *) data;
gnac_profiles_utils_set_values(&aac_bfi,
"combo-bitrate", profile->bitrate,
- "combo-outputformat", profile->outputformat,
- "combo-profile", profile->profile,
"checkbutton-tns", profile->tns,
NULL);
}
@@ -153,8 +137,6 @@
gnac_profiles_utils_free_audio_profile_generic(profile->generic);
g_free(profile->bitrate);
- g_free(profile->outputformat);
- g_free(profile->profile);
g_free(profile->tns);
g_free(profile);
}
@@ -171,8 +153,6 @@
gnac_profiles_utils_get_values_and_set(&aac_bfi,
"combo-bitrate", &profile->bitrate,
- "combo-outputformat", &profile->outputformat,
- "combo-profile", &profile->profile,
"checkbutton-tns", &profile->tns,
NULL);
@@ -196,8 +176,6 @@
XMLDoc *doc = gnac_profiles_default_save_profile(profile->generic, &aac_bfi);
gnac_profiles_xml_engine_add_values(doc,
"bitrate", profile->bitrate,
- "outputformat", profile->outputformat,
- "profile", profile->profile,
"tns", profile->tns,
NULL);
gnac_profiles_xml_engine_save_doc(doc, profile->generic->name);
@@ -216,8 +194,6 @@
gnac_profiles_utils_load_saved_profile(doc,
"/audio-profile/format-specific/",
"bitrate", &profile->bitrate,
- "outputformat", &profile->outputformat,
- "profile", &profile->profile,
"tns", &profile->tns,
NULL);
@@ -230,8 +206,7 @@
{
gnac_profiles_default_clean_up(&aac_bfi);
gnac_profiles_utils_free_values(&aac_bfi,
- "combo-bitrate", "combo-outputformat",
- "combo-profile", "checkbutton-tns", NULL);
+ "combo-bitrate", "checkbutton-tns", NULL);
gnac_profiles_utils_free_basic_format_info(&aac_bfi);
}
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
--- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.c 2012-02-28 12:26:06.000000000 +0100
+++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.c 2015-01-09 23:49:31.339712589 +0100
@@ -33,26 +33,17 @@
{
AudioProfileGeneric *generic;
- gchar *encoding_mode;
+ gchar *target;
gdouble quality;
- gdouble compression_ratio;
gchar *bitrate;
- gchar *preset;
- gdouble mean_abr;
- gdouble mean_bitrate;
- gchar *min_bitrate;
- gchar *max_bitrate;
- gchar *mode;
+ gchar *mono;
}
AudioProfileLame;
typedef enum {
- CONSTANT_BITRATE,
- AVERAGE_BITRATE,
- VARIABLE_BITRATE,
- PRESETS,
- COMPRESSION_RATIO
-} EncodingMode;
+ QUALITY,
+ BITRATE,
+} Target;
BasicFormatInfo lame_bfi = {
PKGDATADIR "/profiles/gnac-profiles-lame.xml",
@@ -78,7 +69,7 @@
void
-gnac_profiles_lame_on_encoding_mode_changed(GtkComboBox *widget,
+gnac_profiles_lame_on_target_changed(GtkComboBox *widget,
gpointer user_data)
{
gnac_profiles_lame_vbr_on_changed(widget);
@@ -90,7 +81,6 @@
gnac_profiles_lame_init(void)
{
GtkWidget *widget;
- GtkWidget *widget2;
gnac_profiles_default_init(&lame_bfi);
@@ -102,42 +92,13 @@
gnac_profiles_utils_init_widget(&lame_bfi, "slider-vbr-quality",
"//variable[@id='quality']");
- // Compression ratio
- widget = gnac_profiles_utils_init_widget(&lame_bfi,
- "slider-compression-ratio", "//variable[@id='compression-ratio']");
- widget2 = gnac_profiles_utils_get_widget(&lame_bfi,
- "label-compression-ratio");
- gnac_profiles_utils_add_description_tooltip(&lame_bfi,
- "//variable[@id='compression-ratio']/description",
- widget, widget2, NULL);
-
- // Preset
- gnac_profiles_utils_init_widget(&lame_bfi, "combo-preset",
- "//variable[@id='preset']");
-
- // Abr bitrate
- gnac_profiles_utils_init_widget(&lame_bfi, "slider-mean-abr",
- "//variable[@id='mean-bitrate']");
-
// Mode
- gnac_profiles_utils_init_widget(&lame_bfi, "combo-mode",
- "//variable[@id='mode']");
-
- // Mean bitrate
- gnac_profiles_utils_init_widget(&lame_bfi, "slider-mean-vbr",
- "//variable[@id='mean-bitrate']");
+ gnac_profiles_utils_init_widget(&lame_bfi, "combo-mono",
+ "//variable[@id='mono']");
- // Min bitrate
- gnac_profiles_utils_init_widget(&lame_bfi, "combo-min-vbr",
- "//variable[@id='min-bitrate']");
-
- // Max bitrate
- gnac_profiles_utils_init_widget(&lame_bfi, "combo-max-vbr",
- "//variable[@id='max-bitrate']");
-
- // Encoding mode
- widget = gnac_profiles_utils_init_widget(&lame_bfi, "combo-encoding-mode",
- "//variable[@id='encoding-mode']");
+ // Target
+ widget = gnac_profiles_utils_init_widget(&lame_bfi, "combo-target",
+ "//variable[@id='target']");
gnac_profiles_lame_vbr_on_changed(GTK_COMBO_BOX(widget));
@@ -149,26 +110,6 @@
static void
-gnac_profiles_lame_show_abr_widgets(gboolean show)
-{
- GtkWidget *abr_widgets[] = {
- gnac_profiles_utils_get_widget(&lame_bfi, "label-mean-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "slider-mean-abr"),
- gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-min-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "combo-min-vbr"),
- gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-max-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "combo-max-vbr")
- };
-
- guint i;
- for (i = 0; i < G_N_ELEMENTS(abr_widgets); i++) {
- if (show) gtk_widget_show_all(abr_widgets[i]);
- else gtk_widget_hide(abr_widgets[i]);
- }
-}
-
-
-static void
gnac_profiles_lame_show_cbr_widgets(gboolean show)
{
GtkWidget *cbr_widgets[] = {
@@ -190,12 +131,6 @@
GtkWidget *vbr_widgets[] = {
gnac_profiles_utils_get_widget(&lame_bfi, "label-vbr"),
gnac_profiles_utils_get_widget(&lame_bfi, "hbox-vbr"),
- gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-mean-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "slider-mean-vbr"),
- gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-min-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "combo-min-vbr"),
- gnac_profiles_utils_get_widget(&lame_bfi, "checkbutton-max-bitrate"),
- gnac_profiles_utils_get_widget(&lame_bfi, "combo-max-vbr")
};
guint i;
@@ -207,48 +142,12 @@
static void
-gnac_profiles_lame_show_presets_widgets(gboolean show)
-{
- GtkWidget *presets_widgets[] = {
- gnac_profiles_utils_get_widget(&lame_bfi, "label-preset"),
- gnac_profiles_utils_get_widget(&lame_bfi, "hbox-preset"),
- };
-
- guint i;
- for (i = 0; i < G_N_ELEMENTS(presets_widgets); i++) {
- if (show) gtk_widget_show_all(presets_widgets[i]);
- else gtk_widget_hide(presets_widgets[i]);
- }
-}
-
-
-static void
-gnac_profiles_lame_show_compression_ratio_widgets(gboolean show)
-{
- GtkWidget *compression_ratio_widgets[] = {
- gnac_profiles_utils_get_widget(&lame_bfi, "label-compression-ratio"),
- gnac_profiles_utils_get_widget(&lame_bfi, "slider-compression-ratio"),
- };
-
- guint i;
- for (i = 0; i < G_N_ELEMENTS(compression_ratio_widgets); i++) {
- if (show) gtk_widget_show_all(compression_ratio_widgets[i]);
- else gtk_widget_hide(compression_ratio_widgets[i]);
- }
-}
-
-
-static void
gnac_profiles_lame_vbr_on_changed(GtkComboBox *widget)
{
- EncodingMode encoding_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+ Target target = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
- gnac_profiles_lame_show_abr_widgets(encoding_mode == AVERAGE_BITRATE);
- gnac_profiles_lame_show_cbr_widgets(encoding_mode == CONSTANT_BITRATE);
- gnac_profiles_lame_show_vbr_widgets(encoding_mode == VARIABLE_BITRATE);
- gnac_profiles_lame_show_presets_widgets(encoding_mode == PRESETS);
- gnac_profiles_lame_show_compression_ratio_widgets(
- encoding_mode == COMPRESSION_RATIO);
+ gnac_profiles_lame_show_cbr_widgets(target == BITRATE);
+ gnac_profiles_lame_show_vbr_widgets(target == QUALITY);
}
@@ -257,54 +156,25 @@
{
gchar *pipeline = gnac_profiles_default_generate_pipeline(&lame_bfi);
GtkWidget *widget = gnac_profiles_utils_get_widget(&lame_bfi,
- "combo-encoding-mode");
- EncodingMode encoding_mode = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
+ "combo-target");
+ Target target = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
// Mode
pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
- "combo-mode", NULL);
+ "combo-mono", NULL);
- switch (encoding_mode)
+ switch (target)
{
- case CONSTANT_BITRATE:
+ case BITRATE:
pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
- "combo-encoding-mode", "combo-bitrate", NULL);
+ "combo-target", "combo-bitrate", NULL);
break;
- case AVERAGE_BITRATE:
+ case QUALITY:
pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
- "combo-encoding-mode", NULL);
- pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
- "%.0f", "slider-mean-abr", NULL);
- pipeline = gnac_profiles_utils_add_properties_checked_combo(pipeline,
- &lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate",
- "combo-max-vbr", "checkbutton-max-bitrate",
- NULL);
- break;
-
- case VARIABLE_BITRATE:
- pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
- "combo-encoding-mode", NULL);
+ "combo-target", NULL);
pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
"%.0f", "slider-vbr-quality", NULL);
- pipeline = gnac_profiles_utils_add_properties_checked_slider(pipeline,
- &lame_bfi, "slider-mean-vbr", "checkbutton-mean-bitrate", NULL);
- pipeline = gnac_profiles_utils_add_properties_checked_combo(pipeline,
- &lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate",
- "combo-max-vbr", "checkbutton-max-bitrate",
- NULL);
- break;
-
- case PRESETS:
- pipeline = gnac_profiles_utils_add_properties(pipeline, &lame_bfi,
- "combo-preset", NULL);
- break;
-
- case COMPRESSION_RATIO:
- pipeline = gnac_profiles_utils_add_properties_slider(pipeline, &lame_bfi,
- "%.0f", "slider-compression-ratio", NULL);
break;
default:
@@ -321,26 +191,12 @@
}
-void
-gnac_profiles_lame_advanced_bitrate_on_toggle(GtkWidget *widget,
- GtkToggleButton *togglebutton)
-{
- gnac_profiles_utils_on_toggle_optionnal_property(togglebutton, widget);
- gnac_profiles_lame_generate_pipeline();
-}
-
-
static void
gnac_profiles_lame_reset_ui(void)
{
gnac_profiles_utils_reset_values(&lame_bfi,
- "combo-mode", "combo-bitrate", "combo-min-vbr", "combo-max-vbr",
- "combo-preset", "combo-encoding-mode", "slider-vbr-quality",
- "slider-compression-ratio", "slider-mean-vbr", "slider-mean-abr",
+ "combo-mono", "combo-bitrate", "combo-target", "slider-vbr-quality",
NULL);
- gnac_profiles_utils_set_active_toggle_button(&lame_bfi, FALSE,
- "checkbutton-mean-bitrate", "checkbutton-min-bitrate",
- "checkbutton-max-bitrate", NULL);
}
@@ -354,42 +210,18 @@
AudioProfileLame *profile = (AudioProfileLame *) data;
gnac_profiles_utils_set_values(&lame_bfi,
- "combo-encoding-mode", profile->encoding_mode,
- "combo-mode", profile->mode, NULL);
+ "combo-target", profile->target,
+ "combo-mono", profile->mono, NULL);
if (profile->bitrate)
{
gnac_profiles_utils_set_values(&lame_bfi,
"combo-bitrate", profile->bitrate, NULL);
}
- else if (profile->preset)
- {
- gnac_profiles_utils_set_values(&lame_bfi,
- "combo-preset", profile->preset, NULL);
- }
- else if (profile->mean_abr != -1)
- {
- gnac_profiles_utils_set_values(&lame_bfi,
- "slider-mean-abr", profile->mean_abr, NULL);
- gnac_profiles_utils_set_values_checked(&lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate", profile->min_bitrate,
- "combo-max-vbr", "checkbutton-max-bitrate", profile->max_bitrate,
- NULL);
- }
else if (profile->quality != -1)
{
gnac_profiles_utils_set_values(&lame_bfi,
"slider-vbr-quality", profile->quality, NULL);
- gnac_profiles_utils_set_values_checked(&lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate", profile->min_bitrate,
- "combo-max-vbr", "checkbutton-max-bitrate", profile->max_bitrate,
- "slider-mean-vbr", "checkbutton-mean-bitrate", profile->mean_bitrate,
- NULL);
- }
- else if (profile->compression_ratio != -1)
- {
- gnac_profiles_utils_set_values(&lame_bfi,
- "slider-compression-ratio", profile->compression_ratio, NULL);
}
}
@@ -406,16 +238,10 @@
{
AudioProfileLame *profile = g_malloc(sizeof(AudioProfileLame));
- profile->encoding_mode = NULL;
- profile->mode = NULL;
+ profile->target = NULL;
+ profile->mono = NULL;
profile->bitrate = NULL;
- profile->preset = NULL;
profile->quality = -1;
- profile->compression_ratio = -1;
- profile->mean_bitrate = -1;
- profile->mean_abr = -1;
- profile->min_bitrate = NULL;
- profile->max_bitrate = NULL;
return profile;
}
@@ -428,12 +254,9 @@
AudioProfileLame *profile = (AudioProfileLame *) data;
gnac_profiles_utils_free_audio_profile_generic(profile->generic);
- g_free(profile->encoding_mode);
- g_free(profile->mode);
+ g_free(profile->target);
+ g_free(profile->mono);
g_free(profile->bitrate);
- g_free(profile->min_bitrate);
- g_free(profile->max_bitrate);
- g_free(profile->preset);
g_free(profile);
}
@@ -447,49 +270,23 @@
profile->generic = generic;
gnac_profiles_utils_get_values_and_set(&lame_bfi,
- "combo-encoding-mode", &profile->encoding_mode,
- "combo-mode", &profile->mode,
+ "combo-target", &profile->target,
+ "combo-mono", &profile->mono,
NULL);
GtkWidget *widget = gnac_profiles_utils_get_widget(&lame_bfi,
- "combo-encoding-mode");
+ "combo-target");
switch (gtk_combo_box_get_active(GTK_COMBO_BOX(widget)))
{
- case CONSTANT_BITRATE:
+ case BITRATE:
gnac_profiles_utils_get_values_and_set(&lame_bfi,
"combo-bitrate", &profile->bitrate, NULL);
break;
- case AVERAGE_BITRATE:
- gnac_profiles_utils_get_values_and_set(&lame_bfi,
- "slider-mean-abr", &profile->mean_abr, NULL);
- gnac_profiles_utils_get_values_checked_combo_and_set(&lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate", &profile->min_bitrate,
- "combo-max-vbr", "checkbutton-max-bitrate", &profile->max_bitrate,
- NULL );
- break;
-
- case VARIABLE_BITRATE:
+ case QUALITY:
gnac_profiles_utils_get_values_and_set(&lame_bfi,
"slider-vbr-quality", &profile->quality, NULL);
- gnac_profiles_utils_get_values_checked_slider_and_set(&lame_bfi,
- "slider-mean-vbr", "checkbutton-mean-bitrate", &profile->mean_bitrate,
- NULL);
- gnac_profiles_utils_get_values_checked_combo_and_set(&lame_bfi,
- "combo-min-vbr", "checkbutton-min-bitrate", &profile->min_bitrate,
- "combo-max-vbr", "checkbutton-max-bitrate", &profile->max_bitrate,
- NULL );
- break;
-
- case PRESETS:
- gnac_profiles_utils_get_values_and_set(&lame_bfi,
- "combo-preset", &profile->preset, NULL);
- break;
-
- case COMPRESSION_RATIO:
- gnac_profiles_utils_get_values_and_set(&lame_bfi,
- "slider-compression-ratio", &profile->compression_ratio, NULL);
break;
default:
@@ -513,49 +310,25 @@
if (!data) return;
gchar *quality = NULL;
- gchar *mean_bitrate = NULL;
- gchar *mean_abr = NULL;
- gchar *compression_ratio = NULL;
AudioProfileLame *profile = (AudioProfileLame *) data;
if (profile->quality != -1)
{
quality = gnac_profiles_utils_gdouble_to_gchararray(profile->quality);
-
- if (profile->mean_bitrate != -1) {
- mean_bitrate = gnac_profiles_utils_gdouble_to_gchararray(
- profile->mean_bitrate);
- }
- }
- else if (profile->mean_abr != -1)
- {
- mean_abr = gnac_profiles_utils_gdouble_to_gchararray(profile->mean_abr);
- }
- else if (profile->compression_ratio != -1) {
- compression_ratio = gnac_profiles_utils_gdouble_to_gchararray(
- profile->compression_ratio);
}
XMLDoc *doc = gnac_profiles_default_save_profile(profile->generic, &lame_bfi);
gnac_profiles_xml_engine_add_values(doc,
- "encoding-mode", profile->encoding_mode,
+ "target", profile->target,
"bitrate", profile->bitrate,
"quality", quality,
- "compression-ratio", compression_ratio,
- "preset", profile->preset,
- "mean-abr", mean_abr,
- "mean-bitrate", mean_bitrate,
- "min-bitrate", profile->min_bitrate,
- "max-bitrate", profile->max_bitrate,
- "mode", profile->mode,
+ "mono", profile->mono,
NULL);
gnac_profiles_xml_engine_save_doc(doc, profile->generic->name);
gnac_profiles_xml_engine_free_doc_xpath(doc);
g_free(quality);
- g_free(mean_bitrate);
- g_free(compression_ratio);
}
@@ -564,42 +337,20 @@
AudioProfileGeneric *generic)
{
gchar *quality;
- gchar *mean_bitrate;
- gchar *mean_abr;
- gchar *compression_ratio;
AudioProfileLame *profile = gnac_profiles_lame_audio_profile_new();
profile->generic = generic;
gnac_profiles_utils_load_saved_profile(doc,
"/audio-profile/format-specific/",
- "encoding-mode", &profile->encoding_mode,
+ "target", &profile->target,
"bitrate", &profile->bitrate,
"quality", &quality,
- "compression-ratio", &compression_ratio,
- "preset", &profile->preset,
- "mean-abr", &mean_abr,
- "mean-bitrate", &mean_bitrate,
- "min-bitrate", &profile->min_bitrate,
- "max-bitrate", &profile->max_bitrate,
- "mode", &profile->mode,
+ "mono", &profile->mono,
NULL);
if (quality) {
profile->quality = gnac_profiles_utils_gchararray_to_gdouble(quality);
g_free(quality);
-
- if (mean_bitrate) {
- profile->mean_bitrate = gnac_profiles_utils_gchararray_to_gdouble(
- mean_bitrate);
- g_free(mean_bitrate);
- }
- } else if (mean_abr) {
- profile->mean_abr = gnac_profiles_utils_gchararray_to_gdouble(mean_abr);
- g_free(mean_abr);
- } else if (compression_ratio) {
- profile->compression_ratio = gnac_profiles_utils_gchararray_to_gdouble(
- compression_ratio);
- g_free(compression_ratio);
}
return profile;
@@ -611,9 +362,7 @@
{
gnac_profiles_default_clean_up(&lame_bfi);
gnac_profiles_utils_free_values(&lame_bfi,
- "combo-mode", "combo-bitrate", "combo-min-vbr", "combo-max-vbr",
- "combo-preset", "combo-encoding-mode", "slider-vbr-quality",
- "slider-compression-ratio", "slider-mean-vbr", "slider-mean-abr",
+ "combo-mono", "combo-bitrate", "combo-target", "slider-vbr-quality",
NULL);
gnac_profiles_utils_free_basic_format_info(&lame_bfi);
}
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
--- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-lame.h 2012-01-26 01:28:46.000000000 +0100
+++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-lame.h 2015-01-09 23:49:31.343045941 +0100
@@ -37,8 +37,8 @@
gnac_profiles_lame_generate_pipeline(void);
void
-gnac_profiles_lame_on_encoding_mode_changed(GtkComboBox *widget,
- gpointer user_data);
+gnac_profiles_lame_on_target_changed(GtkComboBox *widget,
+ gpointer user_data);
void
gnac_profiles_lame_advanced_bitrate_on_toggle(GtkWidget *widget,
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
--- gnac-0.2.4.1.orig/src/profiles/formats/gnac-profiles-unknown.c 2012-02-27 11:27:10.000000000 +0100
+++ gnac-0.2.4.1/src/profiles/formats/gnac-profiles-unknown.c 2015-01-09 23:49:31.343045941 +0100
@@ -49,7 +49,7 @@
};
const gchar *base_pipeline =
- "audioconvert ! audio/x-raw-float, rate=44100, channels=2 ! audioconvert !";
+ "audioconvert ! audio/x-raw, rate=44100, channels=2 ! audioconvert !";
static GtkTextView *pipeline_text_view;
static GtkWidget *pipeline_box;
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
--- gnac-0.2.4.1.orig/src/profiles/gnac-profiles-default.c 2012-04-22 14:09:01.000000000 +0200
+++ gnac-0.2.4.1/src/profiles/gnac-profiles-default.c 2015-01-09 23:49:31.343045941 +0100
@@ -23,6 +23,7 @@
* Boston, MA 02110-1301 USA
*/
+#include <stdlib.h>
#include <glib/gstdio.h>
#include "gnac-main.h"