~ubuntu-branches/ubuntu/precise/gst-plugins-base0.10/precise-updates

« back to all changes in this revision

Viewing changes to gst/encoding/gststreamsplitter.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-12 12:40:13 UTC
  • mfrom: (36.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20111212124013-onyadfb150d8c5dk
Tags: 0.10.35.2-2
* debian/libgstreamer-plugins-base.install:
  + Add license translations file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#endif
24
24
 
25
25
#include "gststreamsplitter.h"
 
26
#include "gst/glib-compat-private.h"
26
27
 
27
28
static GstStaticPadTemplate src_template =
28
29
GST_STATIC_PAD_TEMPLATE ("src_%d", GST_PAD_SRC, GST_PAD_REQUEST,
62
63
  GST_DEBUG_CATEGORY_INIT (gst_stream_splitter_debug, "streamsplitter", 0,
63
64
      "Stream Splitter");
64
65
 
65
 
  gst_element_class_add_pad_template (gstelement_klass,
66
 
      gst_static_pad_template_get (&src_template));
67
 
  gst_element_class_add_pad_template (gstelement_klass,
68
 
      gst_static_pad_template_get (&sink_template));
 
66
  gst_element_class_add_static_pad_template (gstelement_klass, &src_template);
 
67
  gst_element_class_add_static_pad_template (gstelement_klass, &sink_template);
69
68
 
70
69
  gstelement_klass->request_new_pad =
71
70
      GST_DEBUG_FUNCPTR (gst_stream_splitter_request_new_pad);
268
267
    GstPad *srcpad = (GstPad *) tmp->data;
269
268
 
270
269
    STREAMS_UNLOCK (stream_splitter);
271
 
    if (res)
272
 
      gst_caps_merge (res, gst_pad_peer_get_caps_reffed (srcpad));
273
 
    else
 
270
    if (res) {
 
271
      GstCaps *peercaps = gst_pad_peer_get_caps_reffed (srcpad);
 
272
      if (peercaps)
 
273
        gst_caps_merge (res, gst_caps_make_writable (peercaps));
 
274
    } else {
274
275
      res = gst_pad_peer_get_caps (srcpad);
 
276
    }
275
277
    STREAMS_LOCK (stream_splitter);
276
278
 
277
279
    if (G_UNLIKELY (cookie != stream_splitter->cookie)) {
328
330
 
329
331
    if (res) {
330
332
      /* FIXME : we need to switch properly */
331
 
      GST_DEBUG_OBJECT (srcpad, "Setting caps on this pad was succesfull");
 
333
      GST_DEBUG_OBJECT (srcpad, "Setting caps on this pad was successful");
332
334
      stream_splitter->current = srcpad;
333
335
      goto beach;
334
336
    }