Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 27 Oct 2011 13:44:58 +0000 (15:44 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 27 Oct 2011 13:44:58 +0000 (15:44 +0200)
Conflicts:
configure.ac
gst-libs/gst/audio/gstbaseaudiosink.c
gst/audioconvert/channelmixtest.c
gst/playback/gstplaybasebin.c
gst/playback/gstsubtitleoverlay.c
tests/examples/Makefile.am
tests/examples/audio/Makefile.am

13 files changed:
1  2 
Android.mk
Makefile.am
ext/ogg/gstoggdemux.c
ext/vorbis/gstvorbisdec.c
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstbaseaudiosink.c
gst/playback/gstdecodebin2.c
gst/playback/gstplaysinkaudioconvert.c
gst/playback/gstsubtitleoverlay.c
sys/ximage/ximagesink.c
sys/xvimage/xvimagesink.c
tests/examples/Makefile.am
tests/examples/audio/Makefile.am

diff --cc Android.mk
Simple merge
diff --cc Makefile.am
index 126379f392ae14fbaa9e574feee9f1ca977d297f,f96c417971e3440f7022ef144f5270e734f1e4bf..0f329cb447b519ffa2bd8132e40fd9fd75d1487f
@@@ -77,11 -77,9 +77,12 @@@ CRUFT_FILES = 
        $(top_builddir)/common/shave \
        $(top_builddir)/common/shave-libtool \
        $(top_builddir)/gst-libs/gst/audio/testchannels \
+       $(top_builddir)/tests/examples/volume/volume \
        $(top_builddir)/tools/gst-discoverer
  
 +CRUFT_DIRS = \
 +      $(top_srcdir)/sys/v4l \
 +      $(top_srcdir)/tests/examples/v4l
  
  include $(top_srcdir)/common/cruft.mak
  
index a95397c5878a892921cee823eac8e62fd23c7805,f739df09a72791b852666a53253fe80b93560ad5..74703c5699212f0e2787a0d6f7bc02318b77a4f4
@@@ -1697,9 -1692,12 +1697,11 @@@ gst_ogg_chain_new_stream (GstOggChain 
    GST_DEBUG_OBJECT (chain->ogg,
        "creating new stream %08x in chain %p", serialno, chain);
  
-   ret = g_object_new (GST_TYPE_OGG_PAD, NULL);
+   name = g_strdup_printf ("serial_%08x", serialno);
+   ret = g_object_new (GST_TYPE_OGG_PAD, "name", name, NULL);
+   g_free (name);
    /* we own this one */
 -  gst_object_ref (ret);
 -  gst_object_sink (ret);
 +  gst_object_ref_sink (ret);
  
    GST_PAD_DIRECTION (ret) = GST_PAD_SRC;
    gst_ogg_pad_mark_discont (ret);
Simple merge
Simple merge
index deeb8a02cda3149f5514a8a425b50eb3b7803d39,a7477508e42076fbbf31459c9030450d00974060..f8d26554cb680b995229d5a89d6f398f021c010b
@@@ -1335,8 -1367,11 +1335,11 @@@ gst_base_audio_sink_get_alignment (GstB
          "align with prev sample, ABS (%" G_GINT64_FORMAT ") < %"
          G_GINT64_FORMAT, align, maxdrift);
    } else {
+     gint64 diff_s G_GNUC_UNUSED;
      /* calculate sample diff in seconds for error message */
-     gint64 diff_s = gst_util_uint64_scale_int (diff, GST_SECOND, rate);
 -    diff_s = gst_util_uint64_scale_int (diff, GST_SECOND, ringbuf->spec.rate);
++    diff_s = gst_util_uint64_scale_int (diff, GST_SECOND, rate);
      /* timestamps drifted apart from previous samples too much, we need to
       * resync. We log this as an element warning. */
      GST_WARNING_OBJECT (sink,
Simple merge
index f84c5abbb9f9ea0c1ee03c8d01f6d75a3fbe45d9,2441bfe261c4a8e9bc03fcfc8e951acb907792ef..cfdd7ef6c07890a67c0e0acd6406c85f4c3a2437
@@@ -342,15 -354,19 +342,19 @@@ gst_play_sink_audio_convert_getcaps (Gs
    otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));
    GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
  
-   peer = gst_pad_get_peer (otherpad);
+   if (otherpad) {
+     peer = gst_pad_get_peer (otherpad);
+     gst_object_unref (otherpad);
+     otherpad = NULL;
+   }
    if (peer) {
 -    ret = gst_pad_get_caps_reffed (peer);
 +    ret = gst_pad_get_caps (peer, filter);
      gst_object_unref (peer);
    } else {
 -    ret = gst_caps_new_any ();
 +    ret = (filter ? gst_caps_ref (filter) : gst_caps_new_any ());
    }
  
-   gst_object_unref (otherpad);
    gst_object_unref (self);
  
    return ret;
index 5744fc034679913c6743356eda3e6b58e621a435,c39ace872325c45ada4408fdd28ea9ff78add54b..0cb7213401b7ed9e5d659460e1b1990234e19853
@@@ -109,58 -112,6 +109,56 @@@ do_async_done (GstSubtitleOverlay * sel
    }
  }
  
-         _pad_blocked_cb, gst_object_ref (self),
-         (GDestroyNotify) gst_object_unref);
 +static GstProbeReturn
 +_pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
 +    gpointer user_data);
 +
 +static void
 +block_video (GstSubtitleOverlay * self)
 +{
 +  if (self->video_block_id != 0)
 +    return;
 +
 +  if (self->video_block_pad) {
 +    self->video_block_id =
 +        gst_pad_add_probe (self->video_block_pad, GST_PROBE_TYPE_BLOCK,
-         _pad_blocked_cb, gst_object_ref (self),
-         (GDestroyNotify) gst_object_unref);
++        _pad_blocked_cb, self, NULL);
 +  }
 +}
 +
 +static void
 +unblock_video (GstSubtitleOverlay * self)
 +{
 +  if (self->video_block_id) {
 +    gst_pad_remove_probe (self->video_block_pad, self->video_block_id);
 +    self->video_sink_blocked = FALSE;
 +    self->video_block_id = 0;
 +  }
 +}
 +
 +static void
 +block_subtitle (GstSubtitleOverlay * self)
 +{
 +  if (self->subtitle_block_id != 0)
 +    return;
 +
 +  if (self->subtitle_block_pad) {
 +    self->subtitle_block_id =
 +        gst_pad_add_probe (self->subtitle_block_pad, GST_PROBE_TYPE_BLOCK,
++        _pad_blocked_cb, self, NULL);
 +  }
 +}
 +
 +static void
 +unblock_subtitle (GstSubtitleOverlay * self)
 +{
 +  if (self->subtitle_block_id) {
 +    gst_pad_remove_probe (self->subtitle_block_pad, self->subtitle_block_id);
 +    self->subtitle_sink_blocked = FALSE;
 +    self->subtitle_block_id = 0;
 +  }
 +}
 +
  static void
  gst_subtitle_overlay_finalize (GObject * object)
  {
@@@ -803,9 -788,12 +801,8 @@@ _pad_blocked_cb (GstPad * pad, GstProbe
        gst_object_unref (target);
  
        /* Unblock pads */
 -      gst_pad_set_blocked_async_full (self->video_block_pad, FALSE,
 -          _pad_blocked_cb, self, NULL);
 -
 -      if (self->subtitle_sink_blocked)
 -        gst_pad_set_blocked_async_full (self->subtitle_block_pad, FALSE,
 -            _pad_blocked_cb, self, NULL);
 +      unblock_video (self);
 +      unblock_subtitle (self);
        goto out;
      } else if (target) {
        gst_object_unref (target);
@@@ -2073,8 -2148,11 +2071,9 @@@ gst_subtitle_overlay_init (GstSubtitleO
    templ = gst_static_pad_template_get (&video_sinktemplate);
    self->video_sinkpad =
        gst_ghost_pad_new_no_target_from_template ("video_sink", templ);
+   gst_object_unref (templ);
    gst_pad_set_event_function (self->video_sinkpad,
        GST_DEBUG_FUNCPTR (gst_subtitle_overlay_video_sink_event));
 -  gst_pad_set_setcaps_function (self->video_sinkpad,
 -      GST_DEBUG_FUNCPTR (gst_subtitle_overlay_video_sink_setcaps));
    gst_pad_set_chain_function (self->video_sinkpad,
        GST_DEBUG_FUNCPTR (gst_subtitle_overlay_video_sink_chain));
  
Simple merge
Simple merge
index 317f851809b02552ff7518f4bad1e75cfae171b2,f44e6e81cfa24236880033bc8245bf3c69d990c7..5025dc82ca14b689e34fb91bb60ede7407aa22fe
@@@ -8,8 -8,9 +8,9 @@@ if USE_GI
  GIO_SUBDIRS = gio
  endif
  
- SUBDIRS = app audio dynamic $(FT2_SUBDIRS) $(GIO_SUBDIRS) overlay playrec volume encoding
 -SUBDIRS = app audio dynamic $(FT2_SUBDIRS) $(GIO_SUBDIRS) overlay playrec v4l encoding
++SUBDIRS = app audio dynamic $(FT2_SUBDIRS) $(GIO_SUBDIRS) overlay playrec encoding
  
- DIST_SUBDIRS = app audio dynamic gio overlay seek snapshot playrec volume encoding
 -DIST_SUBDIRS = app audio dynamic gio overlay seek snapshot playrec v4l encoding
++DIST_SUBDIRS = app audio dynamic gio overlay seek snapshot playrec encoding
  
  include $(top_srcdir)/common/parallel-subdirs.mak
index 49d72667203a616f81deff3ea1aac53a6480a9f5,d8492340e970e4e0d1dfa5aec5839da46da5e897..8da3b3a4c198d4dc2bcd989a48a86b6fc0ac17bc
@@@ -4,3 -10,13 +10,12 @@@ testchannels_SOURCES = testchannels.
  testchannels_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
  testchannels_LDADD = $(top_builddir)/gst-libs/gst/audio/libgstaudio-$(GST_MAJORMINOR).la \
                       $(GST_LIBS)
 -
+ if HAVE_GTK
+ audiomix_SOURCES = audiomix.c
+ audiomix_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) -D_GNU_SOURCE
+ audiomix_LDADD = $(GST_LIBS) $(GTK_LIBS) $(LIBM)
+ volume_SOURCES = volume.c
+ volume_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) -D_GNU_SOURCE
+ volume_LDADD = $(GST_LIBS) $(GTK_LIBS) $(LIBM)
+ endif