mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
gst/interleave/deinterleave.c (gst_deinterleave_add_new_pads): Use fixed caps on src pads.
Original commit message from CVS: 2007-01-13 Andy Wingo <wingo@pobox.com> * gst/interleave/deinterleave.c (gst_deinterleave_add_new_pads): Use fixed caps on src pads. (gst_deinterleave_remove_pads): Remove src pads, not sink pads. I seem to have reverse midas disease! (gst_deinterleave_process): Proxy timestamps, offsets, durations, and set caps on outgoing buffers. Fixes #395597, I think.
This commit is contained in:
parent
10a685a940
commit
1509c2efcc
1 changed files with 11 additions and 5 deletions
|
@ -143,6 +143,7 @@ gst_deinterleave_add_new_pads (GstDeinterleave * self, GstCaps * caps)
|
||||||
pad = gst_pad_new_from_static_template (&src_template, name);
|
pad = gst_pad_new_from_static_template (&src_template, name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
gst_pad_set_caps (pad, caps);
|
gst_pad_set_caps (pad, caps);
|
||||||
|
gst_pad_use_fixed_caps (pad);
|
||||||
GST_PAD_UNSET_FLUSHING (pad);
|
GST_PAD_UNSET_FLUSHING (pad);
|
||||||
gst_element_add_pad (GST_ELEMENT (self), pad);
|
gst_element_add_pad (GST_ELEMENT (self), pad);
|
||||||
}
|
}
|
||||||
|
@ -154,22 +155,21 @@ static void
|
||||||
gst_deinterleave_remove_pads (GstDeinterleave * self)
|
gst_deinterleave_remove_pads (GstDeinterleave * self)
|
||||||
{
|
{
|
||||||
GstElement *elem;
|
GstElement *elem;
|
||||||
GList *sinks, *l;
|
GList *srcs, *l;
|
||||||
|
|
||||||
elem = GST_ELEMENT (self);
|
elem = GST_ELEMENT (self);
|
||||||
|
|
||||||
GST_INFO_OBJECT (self, "remove_pads()");
|
GST_INFO_OBJECT (self, "remove_pads()");
|
||||||
|
|
||||||
sinks = g_list_copy (elem->sinkpads);
|
srcs = g_list_copy (elem->srcpads);
|
||||||
|
|
||||||
for (l = sinks; l; l = l->next)
|
for (l = srcs; l; l = l->next)
|
||||||
/* force set_caps when going to RUNNING, see note in set_caps */
|
|
||||||
gst_element_remove_pad (elem, GST_PAD (l->data));
|
gst_element_remove_pad (elem, GST_PAD (l->data));
|
||||||
|
|
||||||
gst_pad_set_caps (self->sink, NULL);
|
gst_pad_set_caps (self->sink, NULL);
|
||||||
gst_caps_replace (&self->sinkcaps, NULL);
|
gst_caps_replace (&self->sinkcaps, NULL);
|
||||||
|
|
||||||
g_list_free (sinks);
|
g_list_free (srcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -248,6 +248,12 @@ gst_deinterleave_process (GstDeinterleave * self, GstBuffer * buf)
|
||||||
goto alloc_buffer_failed;
|
goto alloc_buffer_failed;
|
||||||
if (buffers_out[i] && GST_BUFFER_SIZE (buffers_out[i]) != bufsize)
|
if (buffers_out[i] && GST_BUFFER_SIZE (buffers_out[i]) != bufsize)
|
||||||
goto alloc_buffer_bad_size;
|
goto alloc_buffer_bad_size;
|
||||||
|
|
||||||
|
if (buffers_out[i]) {
|
||||||
|
GST_BUFFER_TIMESTAMP (buffers_out[i]) = GST_BUFFER_TIMESTAMP (buf);
|
||||||
|
GST_BUFFER_OFFSET (buffers_out[i]) = GST_BUFFER_OFFSET (buf);
|
||||||
|
GST_BUFFER_DURATION (buffers_out[i]) = GST_BUFFER_DURATION (buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do the thing */
|
/* do the thing */
|
||||||
|
|
Loading…
Reference in a new issue