[totem] backend: Use new "audio-filter" property



commit 7763f75e05901e739bfbce81b7b07182f88b560c
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Apr 11 09:40:16 2014 +0200

    backend: Use new "audio-filter" property
    
    So that the audio-filter can be bypassed if it's not going to
    make any changes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728020

 configure.ac                     |    2 +-
 src/backend/bacon-video-widget.c |   16 ++++------------
 2 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index aa5c462..f632fd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,7 +88,7 @@ AC_SUBST(PLUGINDIR)
 dnl the two versions here implicate the gstreamer core and gst-plugins
 dnl release versions.
 GST_MAJORMINOR=1.0
-GST_REQS=1.2.4
+GST_REQS=1.3.1
 GST_PLUG_BASE_REQS=0.11.93
 GSTPLUG_REQS=0.11.93
 CLUTTER_REQS=1.17.3
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 2608378..7b20f4c 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -5870,7 +5870,7 @@ bacon_video_widget_initable_init (GInitable     *initable,
   gchar *version_str;
   GstPlayFlags flags;
   ClutterActor *layout;
-  GstElement *audio_bin, *audio_converter;
+  GstElement *audio_bin;
   GstPad *audio_pad;
   ClutterAction *action;
   GObject *item;
@@ -5892,13 +5892,11 @@ bacon_video_widget_initable_init (GInitable     *initable,
 
   /* Instantiate all the fallible plugins */
   bvw->priv->play = element_make_or_warn ("playbin", "play");
-  audio_converter = element_make_or_warn ("audioconvert", "audio-converter");
   bvw->priv->audio_pitchcontrol = element_make_or_warn ("scaletempo", "scaletempo");
   video_sink = element_make_or_warn ("cluttersink", "video-sink");
   audio_sink = element_make_or_warn ("autoaudiosink", "audio-sink");
 
   if (!bvw->priv->play ||
-      !audio_converter ||
       !bvw->priv->audio_pitchcontrol ||
       !video_sink ||
       !audio_sink) {
@@ -5906,8 +5904,6 @@ bacon_video_widget_initable_init (GInitable     *initable,
       g_object_ref_sink (video_sink);
     if (audio_sink)
       g_object_ref_sink (audio_sink);
-    if (audio_converter)
-      g_object_ref_sink (audio_converter);
     g_set_error_literal (error, BVW_ERROR, BVW_ERROR_PLUGIN_LOAD,
                         _("Some necessary plug-ins are missing. "
                           "Make sure that the program is correctly installed."));
@@ -5919,9 +5915,7 @@ bacon_video_widget_initable_init (GInitable     *initable,
   /* Add the download flag, for streaming buffering,
    * and the deinterlace flag, for video only */
   g_object_get (bvw->priv->play, "flags", &flags, NULL);
-  flags |= GST_PLAY_FLAG_DOWNLOAD;
-  g_object_set (bvw->priv->play, "flags", flags, NULL);
-  flags |= GST_PLAY_FLAG_DEINTERLACE;
+  flags |= GST_PLAY_FLAG_DOWNLOAD | GST_PLAY_FLAG_DEINTERLACE;
   g_object_set (bvw->priv->play, "flags", flags, NULL);
 
   gst_bus_add_signal_watch (bvw->priv->bus);
@@ -6030,11 +6024,8 @@ bacon_video_widget_initable_init (GInitable     *initable,
   audio_bin = gst_bin_new ("audiosinkbin");
   gst_bin_add_many (GST_BIN (audio_bin),
                     bvw->priv->audio_capsfilter,
-                    bvw->priv->audio_pitchcontrol,
-                  audio_converter, audio_sink, NULL);
+                   audio_sink, NULL);
   gst_element_link_many (bvw->priv->audio_capsfilter,
-                        bvw->priv->audio_pitchcontrol,
-                        audio_converter,
                         audio_sink,
                         NULL);
 
@@ -6044,6 +6035,7 @@ bacon_video_widget_initable_init (GInitable     *initable,
 
   /* And tell playbin */
   g_object_set (bvw->priv->play, "audio-sink", audio_bin, NULL);
+  g_object_set (bvw->priv->play, "audio-filter", bvw->priv->audio_pitchcontrol, NULL);
 
   /* Set default connection speed */
   g_object_set (bvw->priv->play, "connection-speed", MAX_NETWORK_SPEED, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]