search for: swfdecgstdecoder

Displaying 3 results from an estimated 3 matches for "swfdecgstdecoder".

2007 Oct 26
0
6 commits - configure.ac libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c player/swfplay.c
...RROR ("failed to create or link sinkpad"); + gst_object_unref (srcpad); + gst_object_unref (sinkpad); + return NULL; +} + +/*** DECODER ***/ + +typedef struct { + GstElement * decoder; + GstPad * src; + GstPad * sink; + GQueue * queue; /* all the stored output GstBuffers */ +} SwfdecGstDecoder; + +static GstFlowReturn +swfdec_gst_chain_func (GstPad *pad, GstBuffer *buffer) +{ + GQueue *queue = g_object_get_data (G_OBJECT (pad), "swfdec-queue"); + + g_queue_push_tail (queue, buffer); + + return GST_FLOW_OK; +} + +static gboolean +swfdec_gst_decoder_init (SwfdecGstDecoder *dec...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...:47:26 2007 +0200 only set caps if there are none set yet diff --git a/libswfdec/swfdec_codec_gst.c b/libswfdec/swfdec_codec_gst.c index cd2d02e..b449533 100644 --- a/libswfdec/swfdec_codec_gst.c +++ b/libswfdec/swfdec_codec_gst.c @@ -272,7 +272,16 @@ static gboolean swfdec_gst_decoder_push (SwfdecGstDecoder *dec, GstBuffer *buffer) { GstFlowReturn ret; - gst_buffer_set_caps (buffer, GST_PAD_CAPS (dec->src)); + GstCaps *caps; + + /* set caps if none set yet */ + caps = gst_buffer_get_caps (buffer); + if (caps) { + gst_caps_unref (caps); + } else { + gst_buffer_set_caps (buffer, GST_P...
2007 Oct 28
0
9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
...tmpl = gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, caps); + sinkpad = gst_pad_new_from_template (tmpl, "sink"); + g_object_unref (tmpl); if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK) goto error; @@ -279,6 +283,12 @@ swfdec_gst_decoder_push (SwfdecGstDecoder *dec, GstBuffer *buffer) if (caps) { gst_caps_unref (caps); } else { + caps = GST_PAD_CAPS (dec->src); + if (caps == NULL) { + caps = (GstCaps *) gst_pad_get_pad_template_caps (dec->src); + g_assert (gst_caps_is_fixed (caps)); + gst_pad_set_caps (dec->src, c...