gst_plugins_good/ext/libpng/gstpngdec.h
changeset 27 d43ce56a1534
parent 23 29ecd5cb86b3
child 31 aec498aab1d3
equal deleted inserted replaced
23:29ecd5cb86b3 27:d43ce56a1534
     1 /* GStreamer
       
     2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
       
     3  *
       
     4  * This library is free software; you can redistribute it and/or
       
     5  * modify it under the terms of the GNU Library General Public
       
     6  * License as published by the Free Software Foundation; either
       
     7  * version 2 of the License, or (at your option) any later version.
       
     8  *
       
     9  * This library is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    12  * Library General Public License for more details.
       
    13  *
       
    14  * You should have received a copy of the GNU Library General Public
       
    15  * License along with this library; if not, write to the
       
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    17  * Boston, MA 02111-1307, USA.
       
    18  */
       
    19 
       
    20 
       
    21 #ifndef __GST_PNGDEC_H__
       
    22 #define __GST_PNGDEC_H__
       
    23 
       
    24 #include <gst/gst.h>
       
    25 #include <png.h>
       
    26 
       
    27 #ifdef __cplusplus
       
    28 extern "C" {
       
    29 #endif /* __cplusplus */
       
    30 
       
    31 #define GST_TYPE_PNGDEC            (gst_pngdec_get_type())
       
    32 #define GST_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PNGDEC,GstPngDec))
       
    33 #define GST_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PNGDEC,GstPngDecClass))
       
    34 #define GST_IS_PNGDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PNGDEC))
       
    35 #define GST_IS_PNGDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PNGDEC))
       
    36 
       
    37 typedef struct _GstPngDec GstPngDec;
       
    38 typedef struct _GstPngDecClass GstPngDecClass;
       
    39 
       
    40 struct _GstPngDec
       
    41 {
       
    42   GstElement element;
       
    43 
       
    44   GstPad *sinkpad, *srcpad;
       
    45 
       
    46   gboolean need_newsegment;
       
    47 
       
    48   /* Progressive */
       
    49   GstBuffer *buffer_out;
       
    50   GstFlowReturn ret;
       
    51   png_uint_32 rowbytes;
       
    52   
       
    53   /* Pull range */
       
    54   gint offset;
       
    55 
       
    56   png_structp png;
       
    57   png_infop info;
       
    58   png_infop endinfo;
       
    59   gboolean setup;
       
    60 
       
    61   gint width;
       
    62   gint height;
       
    63   gint bpp;
       
    64   gint color_type;
       
    65   gint fps_n;
       
    66   gint fps_d;
       
    67 
       
    68   /* Chain */
       
    69   gboolean framed;
       
    70   GstClockTime in_timestamp;
       
    71   GstClockTime in_duration;
       
    72 
       
    73   GstSegment segment;
       
    74   gboolean image_ready;
       
    75 };
       
    76 
       
    77 struct _GstPngDecClass
       
    78 {
       
    79   GstElementClass parent_class;
       
    80 };
       
    81 
       
    82 GType gst_pngdec_get_type(void);
       
    83 
       
    84 #ifdef __cplusplus
       
    85 }
       
    86 #endif /* __cplusplus */
       
    87 
       
    88 
       
    89 #endif /* __GST_PNGDEC_H__ */