2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
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.
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.
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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 #ifndef __GST_FFMPEGVIDDEC_H__
20 #define __GST_FFMPEGVIDDEC_H__
25 #include <gst/video/video.h>
26 #include <gst/video/gstvideodecoder.h>
27 #include <libavcodec/avcodec.h>
29 typedef struct _GstFFMpegVidDec GstFFMpegVidDec;
30 struct _GstFFMpegVidDec
32 GstVideoDecoder parent;
34 GstVideoCodecState *input_state;
35 GstVideoCodecState *output_state;
38 AVCodecContext *context;
40 gint stride[AV_NUM_DATA_POINTERS];
43 /* current output pictures */
44 enum PixelFormat pic_pix_fmt;
60 enum AVDiscard skip_frame;
62 gboolean direct_rendering;
65 gboolean output_corrupt;
67 gboolean is_realvideo;
71 /* Internally used for direct rendering */
72 GstBufferPool *internal_pool;
75 enum PixelFormat pool_format;
76 GstVideoInfo pool_info;
79 typedef struct _GstFFMpegVidDecClass GstFFMpegVidDecClass;
81 struct _GstFFMpegVidDecClass
83 GstVideoDecoderClass parent_class;
88 #define GST_TYPE_FFMPEGDEC \
89 (gst_ffmpegviddec_get_type())
90 #define GST_FFMPEGDEC(obj) \
91 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGDEC,GstFFMpegVidDec))
92 #define GST_FFMPEGVIDDEC_CLASS(klass) \
93 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGDEC,GstFFMpegVidDecClass))
94 #define GST_IS_FFMPEGDEC(obj) \
95 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGDEC))
96 #define GST_IS_FFMPEGVIDDEC_CLASS(klass) \
97 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEC))