2004-07-16 10:56:31 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GST_PNGDEC_H__
|
|
|
|
#define __GST_PNGDEC_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <png.h>
|
|
|
|
|
2005-10-15 16:48:55 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-07-16 10:56:31 +00:00
|
|
|
|
2005-10-15 16:48:55 +00:00
|
|
|
#define GST_TYPE_PNGDEC (gst_pngdec_get_type())
|
|
|
|
#define GST_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGDEC,GstPngDec))
|
2006-06-01 21:07:26 +00:00
|
|
|
#define GST_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGDEC,GstPngDecClass))
|
2005-10-15 16:48:55 +00:00
|
|
|
#define GST_IS_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGDEC))
|
2006-06-01 21:07:26 +00:00
|
|
|
#define GST_IS_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGDEC))
|
2004-07-16 10:56:31 +00:00
|
|
|
|
|
|
|
typedef struct _GstPngDec GstPngDec;
|
|
|
|
typedef struct _GstPngDecClass GstPngDecClass;
|
|
|
|
|
|
|
|
struct _GstPngDec
|
|
|
|
{
|
|
|
|
GstElement element;
|
|
|
|
|
|
|
|
GstPad *sinkpad, *srcpad;
|
|
|
|
|
ext/libpng/gstpngdec.*: Handle more than one frame if the content is framed, like with png-in-quicktime (#331917).
Original commit message from CVS:
* ext/libpng/gstpngdec.c: (gst_pngdec_init),
(user_endrow_callback), (user_end_callback),
(gst_pngdec_caps_create_and_set), (gst_pngdec_chain),
(gst_pngdec_sink_setcaps), (gst_pngdec_sink_event),
(gst_pngdec_libpng_clear), (gst_pngdec_change_state):
* ext/libpng/gstpngdec.h:
Handle more than one frame if the content is framed,
like with png-in-quicktime (#331917).
2006-04-11 09:35:45 +00:00
|
|
|
gboolean need_newsegment;
|
|
|
|
|
ext/libpng/gstpngdec.*: Complete rewrite of pngdec. It's now very nice and handle push/pull based model. if you have ...
Original commit message from CVS:
2005-10-19 Julien MOUTTE <julien@moutte.net>
* ext/libpng/gstpngdec.c: (gst_pngdec_class_init),
(gst_pngdec_init), (user_error_fn), (user_warning_fn),
(user_info_callback), (user_endrow_callback),
(user_end_callback),
(user_read_data), (gst_pngdec_caps_create_and_set),
(gst_pngdec_task), (gst_pngdec_chain), (gst_pngdec_sink_event),
(gst_pngdec_libpng_clear), (gst_pngdec_libpng_init),
(gst_pngdec_change_state), (gst_pngdec_sink_activate_push),
(gst_pngdec_sink_activate_pull), (gst_pngdec_sink_activate):
* ext/libpng/gstpngdec.h: Complete rewrite of pngdec. It's now
very nice and handle push/pull based model. if you have filesrc
connected to it, it will do random access to load the png file.
If you have a network source that can't do _getrange, it does
progressive loading through the chain function.
* gst/alpha/gstalphacolor.c: (gst_alpha_color_transform_caps),
(transform_rgb), (transform_bgr): Fix caps negotiation correctly
thanks to Master Wim Taymans ;-)
2005-10-18 22:44:11 +00:00
|
|
|
/* Progressive */
|
|
|
|
GstBuffer *buffer_out;
|
|
|
|
GstFlowReturn ret;
|
|
|
|
png_uint_32 rowbytes;
|
|
|
|
|
|
|
|
/* Pull range */
|
2004-07-16 10:56:31 +00:00
|
|
|
gint offset;
|
|
|
|
|
|
|
|
png_structp png;
|
|
|
|
png_infop info;
|
|
|
|
png_infop endinfo;
|
ext/libpng/gstpngdec.*: Complete rewrite of pngdec. It's now very nice and handle push/pull based model. if you have ...
Original commit message from CVS:
2005-10-19 Julien MOUTTE <julien@moutte.net>
* ext/libpng/gstpngdec.c: (gst_pngdec_class_init),
(gst_pngdec_init), (user_error_fn), (user_warning_fn),
(user_info_callback), (user_endrow_callback),
(user_end_callback),
(user_read_data), (gst_pngdec_caps_create_and_set),
(gst_pngdec_task), (gst_pngdec_chain), (gst_pngdec_sink_event),
(gst_pngdec_libpng_clear), (gst_pngdec_libpng_init),
(gst_pngdec_change_state), (gst_pngdec_sink_activate_push),
(gst_pngdec_sink_activate_pull), (gst_pngdec_sink_activate):
* ext/libpng/gstpngdec.h: Complete rewrite of pngdec. It's now
very nice and handle push/pull based model. if you have filesrc
connected to it, it will do random access to load the png file.
If you have a network source that can't do _getrange, it does
progressive loading through the chain function.
* gst/alpha/gstalphacolor.c: (gst_alpha_color_transform_caps),
(transform_rgb), (transform_bgr): Fix caps negotiation correctly
thanks to Master Wim Taymans ;-)
2005-10-18 22:44:11 +00:00
|
|
|
gboolean setup;
|
2004-07-16 10:56:31 +00:00
|
|
|
|
|
|
|
gint width;
|
|
|
|
gint height;
|
|
|
|
gint bpp;
|
|
|
|
gint color_type;
|
2005-11-22 22:21:37 +00:00
|
|
|
gint fps_n;
|
|
|
|
gint fps_d;
|
ext/libpng/gstpngdec.*: Handle more than one frame if the content is framed, like with png-in-quicktime (#331917).
Original commit message from CVS:
* ext/libpng/gstpngdec.c: (gst_pngdec_init),
(user_endrow_callback), (user_end_callback),
(gst_pngdec_caps_create_and_set), (gst_pngdec_chain),
(gst_pngdec_sink_setcaps), (gst_pngdec_sink_event),
(gst_pngdec_libpng_clear), (gst_pngdec_change_state):
* ext/libpng/gstpngdec.h:
Handle more than one frame if the content is framed,
like with png-in-quicktime (#331917).
2006-04-11 09:35:45 +00:00
|
|
|
|
|
|
|
/* Chain */
|
|
|
|
gboolean framed;
|
|
|
|
GstClockTime in_timestamp;
|
|
|
|
GstClockTime in_duration;
|
2006-07-17 10:22:54 +00:00
|
|
|
|
|
|
|
GstSegment segment;
|
2007-11-20 12:20:38 +00:00
|
|
|
gboolean image_ready;
|
2004-07-16 10:56:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstPngDecClass
|
|
|
|
{
|
|
|
|
GstElementClass parent_class;
|
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_pngdec_get_type(void);
|
|
|
|
|
2005-10-15 16:48:55 +00:00
|
|
|
G_END_DECLS
|
2004-07-16 10:56:31 +00:00
|
|
|
|
|
|
|
#endif /* __GST_PNGDEC_H__ */
|