diff options
author | Edward Hervey <bilboed@bilboed.com> | 2005-12-19 15:19:44 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2005-12-19 15:19:44 +0000 |
commit | 95d65be727e4e64070c249641bd20d1c24070069 (patch) | |
tree | c5569e020fec5293994f882fb8abad4d02e3cb7c /ext | |
parent | ac8b1191d4c9db98ca500809e989f0cc75e94187 (diff) | |
download | gst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.tar.gz gst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.tar.bz2 gst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.zip |
ext/swfdec/gstswfdec.c: Add debugging category and return GstFlowReturn in the right places
Original commit message from CVS:
* ext/swfdec/gstswfdec.c: (gst_swfdec_class_init),
(gst_swfdec_chain), (gst_swfdec_render):
Add debugging category and return GstFlowReturn in the right places
* ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_link):
Get something from the peer pad once we've checked if there is a peer pad.
* gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state),
(qtdemux_tree_get_child_by_type), (qtdemux_parse_trak),
(qtdemux_video_caps):
Couple of fixes
Diffstat (limited to 'ext')
-rw-r--r-- | ext/swfdec/gstswfdec.c | 18 | ||||
-rw-r--r-- | ext/wavpack/gstwavpackdec.c | 3 |
2 files changed, 16 insertions, 5 deletions
diff --git a/ext/swfdec/gstswfdec.c b/ext/swfdec/gstswfdec.c index bd983b58..9b11b0cf 100644 --- a/ext/swfdec/gstswfdec.c +++ b/ext/swfdec/gstswfdec.c @@ -26,6 +26,9 @@ #include <gst/video/video.h> #include <swfdec_buffer.h> +GST_DEBUG_CATEGORY_STATIC (swfdec_debug); +#define GST_CAT_DEFAULT swfdec_debug + /* elementfactory information */ static GstElementDetails gst_swfdec_details = GST_ELEMENT_DETAILS ("SWF video decoder", @@ -243,6 +246,9 @@ gst_swfdec_class_init (GstSwfdecClass * klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSwfdecClass, embed_url), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); + + GST_DEBUG_CATEGORY_INIT (swfdec_debug, "swfdec", 0, "Flash decoder plugin"); + } static GstCaps * @@ -332,11 +338,13 @@ gst_swfdec_chain (GstPad * pad, GstBuffer * buffer) GstSwfdec *swfdec = GST_SWFDEC (GST_PAD_PARENT (pad)); g_static_rec_mutex_lock (&swfdec->mutex); + GST_DEBUG_OBJECT (swfdec, "about to call swfdec_decoder_parse"); ret = swfdec_decoder_parse (swfdec->decoder); if (ret == SWF_NEEDBITS) { guint buf_size; GstBuffer *prev_buffer; + GST_DEBUG_OBJECT (swfdec, "SWF_NEEDBITS, feeding data to swfdec-decoder"); buf_size = gst_adapter_available (swfdec->adapter); if (buf_size) { prev_buffer = gst_buffer_new_and_alloc (buf_size); @@ -351,8 +359,6 @@ gst_swfdec_chain (GstPad * pad, GstBuffer * buffer) swfdec_decoder_add_buffer (swfdec->decoder, gst_swfdec_buffer_to_swf (buffer)); - - } else if (ret == SWF_CHANGE) { GstCaps *caps; @@ -363,6 +369,7 @@ gst_swfdec_chain (GstPad * pad, GstBuffer * buffer) GstTagList *taglist; #endif + GST_DEBUG_OBJECT (swfdec, "SWF_CHANGE"); gst_adapter_push (swfdec->adapter, buffer); swfdec_decoder_get_image_size (swfdec->decoder, @@ -411,6 +418,7 @@ gst_swfdec_chain (GstPad * pad, GstBuffer * buffer) #endif } else if (ret == SWF_EOF) { + GST_DEBUG_OBJECT (swfdec, "SWF_EOF"); gst_swfdec_render (swfdec, ret); gst_task_start (swfdec->task); } @@ -439,8 +447,10 @@ gst_swfdec_render (GstSwfdec * swfdec, int ret) GstBuffer *videobuf; GstBuffer *audiobuf; gboolean ret; + GstFlowReturn res; const char *url; + GST_DEBUG_OBJECT (swfdec, "render:SWF_EOF"); swfdec_decoder_set_mouse (swfdec->decoder, swfdec->x, swfdec->y, swfdec->button); @@ -448,8 +458,8 @@ gst_swfdec_render (GstSwfdec * swfdec, int ret) if (!ret) { gst_task_stop (swfdec->task); - gst_pad_push_event (swfdec->videopad, gst_event_new_eos ()); - gst_pad_push_event (swfdec->audiopad, gst_event_new_eos ()); + res = gst_pad_push_event (swfdec->videopad, gst_event_new_eos ()); + res = gst_pad_push_event (swfdec->audiopad, gst_event_new_eos ()); return; } diff --git a/ext/wavpack/gstwavpackdec.c b/ext/wavpack/gstwavpackdec.c index f3f9d750..d8a4308e 100644 --- a/ext/wavpack/gstwavpackdec.c +++ b/ext/wavpack/gstwavpackdec.c @@ -83,13 +83,14 @@ static GstPadLinkReturn gst_wavpack_dec_link (GstPad * pad, GstPad * peer) { GstWavpackDec *wavpackdec = GST_WAVPACK_DEC (gst_pad_get_parent (pad)); - GstStructure *structure = gst_caps_get_structure (GST_PAD_CAPS (peer), 0); + GstStructure *structure; GstCaps *srccaps; gint bits; if (!gst_caps_is_fixed (GST_PAD_CAPS (peer))) return GST_PAD_LINK_REFUSED; + structure = gst_caps_get_structure (GST_PAD_CAPS (peer), 0); gst_structure_get_int (structure, "rate", (gint32 *) & wavpackdec->samplerate); gst_structure_get_int (structure, "channels", |