From 73ec6b7a1dac638c79e3704f961ae808c706fbbe Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 18 Jul 2007 09:21:23 +0000 Subject: More docs. More logs in pngdec. Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/inspect/plugin-jpeg.xml: * docs/plugins/inspect/plugin-png.xml: * ext/jpeg/gstjpegdec.c: * ext/libpng/gstpngdec.c: (gst_pngdec_task), (gst_pngdec_sink_setcaps): More docs. More logs in pngdec. --- ext/libpng/gstpngdec.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'ext/libpng') diff --git a/ext/libpng/gstpngdec.c b/ext/libpng/gstpngdec.c index e7457817..236538b2 100644 --- a/ext/libpng/gstpngdec.c +++ b/ext/libpng/gstpngdec.c @@ -13,6 +13,13 @@ * */ +/** + * SECTION:element-pngdec + * + * Decodes png images. If there is no framerate set on sink caps, it sends EOS + * after the first picture. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -457,6 +464,8 @@ gst_pngdec_task (GstPad * pad) pngdec = GST_PNGDEC (GST_OBJECT_PARENT (pad)); + GST_LOG_OBJECT (pngdec, "read frame"); + /* Let libpng come back here on error */ if (setjmp (png_jmpbuf (pngdec->png))) { ret = GST_FLOW_ERROR; @@ -510,16 +519,13 @@ gst_pngdec_task (GstPad * pad) return; pause: - { - GST_INFO_OBJECT (pngdec, "pausing task, reason %s", - gst_flow_get_name (ret)); - gst_pad_pause_task (pngdec->sinkpad); - if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { - GST_ELEMENT_ERROR (pngdec, STREAM, FAILED, - (_("Internal data stream error.")), - ("stream stopped, reason %s", gst_flow_get_name (ret))); - gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ()); - } + GST_INFO_OBJECT (pngdec, "pausing task, reason %s", gst_flow_get_name (ret)); + gst_pad_pause_task (pngdec->sinkpad); + if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { + gst_pad_push_event (pngdec->srcpad, gst_event_new_eos ()); + GST_ELEMENT_ERROR (pngdec, STREAM, FAILED, + (_("Internal data stream error.")), + ("stream stopped, reason %s", gst_flow_get_name (ret))); } } @@ -593,6 +599,7 @@ gst_pngdec_sink_setcaps (GstPad * pad, GstCaps * caps) pngdec->fps_n = num; pngdec->fps_d = denom; } else { + GST_DEBUG_OBJECT (pngdec, "single picture input"); pngdec->framed = FALSE; pngdec->fps_n = 0; pngdec->fps_d = 1; -- cgit