Merge branch 'master' into 0.11
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 25 Jan 2012 11:49:11 +0000 (12:49 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 25 Jan 2012 11:49:11 +0000 (12:49 +0100)
Conflicts:
ext/flac/gstflacdec.c
ext/jpeg/gstjpegenc.c
ext/pulse/pulsesink.c
sys/v4l2/gstv4l2src.c

23 files changed:
1  2 
configure.ac
ext/pulse/pulsesink.c
ext/pulse/pulsesrc.c
gst/alpha/gstalphacolor.c
gst/avi/gstavidemux.c
gst/cutter/gstcutter.c
gst/deinterlace/gstdeinterlace.c
gst/imagefreeze/gstimagefreeze.c
gst/isomp4/atomsrecovery.c
gst/matroska/matroska-demux.c
gst/rtp/gstrtph263ppay.c
gst/rtp/gstrtpmp4adepay.c
gst/rtp/gstrtptheoradepay.c
gst/rtpmanager/gstrtpbin.c
gst/rtpmanager/gstrtpptdemux.c
gst/rtpmanager/rtpsession.c
gst/rtsp/gstrtspsrc.c
sys/oss4/oss4-sink.c
sys/oss4/oss4-source.c
sys/v4l2/gstv4l2src.c
sys/waveform/gstwaveformsink.c
tests/check/elements/autodetect.c
tests/check/elements/videocrop.c

diff --cc configure.ac
Simple merge
@@@ -2863,9 -2955,12 +2863,12 @@@ gst_pulsesink_change_state (GstElement 
          GST_INFO_OBJECT (element, "new pa main loop thread");
          if (!(mainloop = pa_threaded_mainloop_new ()))
            goto mainloop_failed;
+         if (pa_threaded_mainloop_start (mainloop) < 0) {
+           pa_threaded_mainloop_free (mainloop);
+           goto mainloop_start_failed;
+         }
          mainloop_ref_ct = 1;
-         pa_threaded_mainloop_start (mainloop);
 -        g_mutex_unlock (pa_shared_resource_mutex);
 +        g_mutex_unlock (&pa_shared_resource_mutex);
        } else {
          GST_INFO_OBJECT (element, "reusing pa main loop thread");
          mainloop_ref_ct++;
@@@ -2910,6 -3005,13 +2913,13 @@@ mainloop_failed
          ("pa_threaded_mainloop_new() failed"), (NULL));
      return GST_STATE_CHANGE_FAILURE;
    }
 -    g_mutex_unlock (pa_shared_resource_mutex);
+ mainloop_start_failed:
+   {
++    g_mutex_unlock (&pa_shared_resource_mutex);
+     GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED,
+         ("pa_threaded_mainloop_start() failed"), (NULL));
+     return GST_STATE_CHANGE_FAILURE;
+   }
  state_failure:
    {
      if (transition == GST_STATE_CHANGE_NULL_TO_READY) {
Simple merge
Simple merge
@@@ -522,10 -573,10 +522,10 @@@ gst_avi_demux_handle_src_query (GstPad 
            GST_DEBUG_OBJECT (query, "total frames is %" G_GUINT32_FORMAT,
                stream->idx_n);
  
-           if (stream->idx_n >= 0)
+           if (stream->idx_n > 0)
              gst_query_set_duration (query, fmt, stream->idx_n);
            else if (gst_pad_query_convert (pad, GST_FORMAT_TIME,
 -                  duration, &fmt, &dur))
 +                  duration, fmt, &dur))
              gst_query_set_duration (query, fmt, dur);
            break;
          }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -229,11 -233,10 +229,11 @@@ caps_append (GstCaps * caps, GstStructu
  
  
  static GstCaps *
 -gst_rtp_h263p_pay_sink_getcaps (GstBaseRTPPayload * payload, GstPad * pad)
 +gst_rtp_h263p_pay_sink_getcaps (GstRTPBasePayload * payload, GstPad * pad,
 +    GstCaps * filter)
  {
    GstRtpH263PPay *rtph263ppay;
-   GstCaps *caps = gst_caps_new_empty ();
+   GstCaps *caps = NULL;
    GstCaps *peercaps = NULL;
    GstCaps *intersect = NULL;
    guint i;
Simple merge
Simple merge
@@@ -1878,13 -1881,13 +1881,13 @@@ gst_rtp_bin_class_init (GstRtpBinClass 
  }
  
  static void
 -gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
 +gst_rtp_bin_init (GstRtpBin * rtpbin)
  {
-   gchar *str;
+   gchar *cname;
  
    rtpbin->priv = GST_RTP_BIN_GET_PRIVATE (rtpbin);
 -  rtpbin->priv->bin_lock = g_mutex_new ();
 -  rtpbin->priv->dyn_lock = g_mutex_new ();
 +  g_mutex_init (&rtpbin->priv->bin_lock);
 +  g_mutex_init (&rtpbin->priv->dyn_lock);
  
    rtpbin->latency_ms = DEFAULT_LATENCY_MS;
    rtpbin->latency_ns = DEFAULT_LATENCY_MS * GST_MSECOND;
@@@ -304,9 -309,8 +304,9 @@@ gst_rtp_pt_demux_chain (GstPad * pad, G
    GstPad *srcpad;
    GstRtpPtDemuxPad *rtpdemuxpad;
    GstCaps *caps;
-   GstRTPBuffer rtp = {NULL};
++  GstRTPBuffer rtp = { NULL };
  
 -  rtpdemux = GST_RTP_PT_DEMUX (GST_OBJECT_PARENT (pad));
 +  rtpdemux = GST_RTP_PT_DEMUX (parent);
  
    if (!gst_rtp_buffer_validate (buf))
      goto invalid_buffer;
      GstPadTemplate *templ;
      gchar *padname;
  
+     caps = gst_rtp_pt_demux_get_caps (rtpdemux, pt);
+     if (!caps)
+       goto no_caps;
      klass = GST_ELEMENT_GET_CLASS (rtpdemux);
 -    templ = gst_element_class_get_pad_template (klass, "src_%d");
 -    padname = g_strdup_printf ("src_%d", pt);
 +    templ = gst_element_class_get_pad_template (klass, "src_%u");
 +    padname = g_strdup_printf ("src_%u", pt);
      srcpad = gst_pad_new_from_template (templ, padname);
      gst_pad_use_fixed_caps (srcpad);
      g_free (padname);
Simple merge
@@@ -1947,16 -2014,11 +1947,12 @@@ gst_rtspsrc_handle_src_event (GstPad * 
  /* this is the final event function we receive on the internal source pad when
   * we deal with TCP connections */
  static gboolean
 -gst_rtspsrc_handle_internal_src_event (GstPad * pad, GstEvent * event)
 +gst_rtspsrc_handle_internal_src_event (GstPad * pad, GstObject * parent,
 +    GstEvent * event)
  {
-   GstRTSPSrc *src;
    gboolean res;
  
-   src = GST_RTSPSRC_CAST (gst_pad_get_element_private (pad));
-   GST_DEBUG_OBJECT (src, "pad %s:%s received event %s",
-       GST_DEBUG_PAD_NAME (pad), GST_EVENT_TYPE_NAME (event));
+   GST_DEBUG_OBJECT (pad, "received event %s", GST_EVENT_TYPE_NAME (event));
  
    switch (GST_EVENT_TYPE (event)) {
      case GST_EVENT_SEEK:
@@@ -476,7 -477,7 +476,7 @@@ gst_oss4_sink_open (GstAudioSink * asin
  
      if (ioctl (oss->fd, SNDCTL_DSP_GET_PLAYTGT_NAMES, &routings) != -1) {
        GST_LOG_OBJECT (oss, "%u output routings (static list: %d)",
--          routings.nvalues, !!(routings.version == 0));
++          routings.nvalues, ! !(routings.version == 0));
        for (i = 0; i < routings.nvalues; ++i) {
          GST_LOG_OBJECT (oss, "  output routing %d: %s", i,
              &routings.strings[routings.strindex[i]]);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge