2012-11-19 09:29:00 +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., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
#ifndef __GST_FFMPEGVIDDEC_H__
|
|
|
|
#define __GST_FFMPEGVIDDEC_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/video/video.h>
|
|
|
|
#include <libavcodec/avcodec.h>
|
|
|
|
|
2020-05-09 13:20:00 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2022-11-01 15:13:23 +00:00
|
|
|
#define GST_TYPE_FFMPEGVIDDEC (gst_ffmpegviddec_get_type())
|
|
|
|
#define GST_FFMPEGVIDDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGVIDDEC,GstFFMpegVidDec))
|
|
|
|
#define GST_FFMPEGVIDDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGVIDDEC,GstFFMpegVidDecClass))
|
|
|
|
#define GST_FFMPEGVIDDEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_FFMPEGVIDDEC, GstFFMpegVidDecClass))
|
|
|
|
#define GST_IS_FFMPEGVIDDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGVIDDEC))
|
|
|
|
#define GST_IS_FFMPEGVIDDEC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGVIDDEC))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstFFMpegVidDec:
|
|
|
|
*
|
|
|
|
* The #GstFFMpegVidDec data structure.
|
|
|
|
*
|
|
|
|
* Since: 1.22
|
|
|
|
*/
|
2012-11-19 09:29:00 +00:00
|
|
|
typedef struct _GstFFMpegVidDec GstFFMpegVidDec;
|
2022-11-01 15:13:23 +00:00
|
|
|
|
2012-11-19 09:29:00 +00:00
|
|
|
struct _GstFFMpegVidDec
|
|
|
|
{
|
|
|
|
GstVideoDecoder parent;
|
|
|
|
|
|
|
|
GstVideoCodecState *input_state;
|
|
|
|
GstVideoCodecState *output_state;
|
|
|
|
|
|
|
|
/* decoding */
|
|
|
|
AVCodecContext *context;
|
|
|
|
AVFrame *picture;
|
2017-03-16 04:23:01 +00:00
|
|
|
GstVideoMultiviewMode picture_multiview_mode;
|
|
|
|
GstVideoMultiviewFlags picture_multiview_flags;
|
2013-09-12 11:56:31 +00:00
|
|
|
gint stride[AV_NUM_DATA_POINTERS];
|
2012-11-19 09:29:00 +00:00
|
|
|
|
2015-06-26 13:34:30 +00:00
|
|
|
/* current output pictures */
|
2015-11-04 20:18:56 +00:00
|
|
|
enum AVPixelFormat pic_pix_fmt;
|
2015-06-26 13:34:30 +00:00
|
|
|
gint pic_width;
|
|
|
|
gint pic_height;
|
|
|
|
gint pic_par_n;
|
|
|
|
gint pic_par_d;
|
|
|
|
gint pic_interlaced;
|
2016-09-29 12:35:01 +00:00
|
|
|
/* GST_VIDEO_BUFFER_FLAG_RFF | GST_VIDEO_BUFFER_FLAG_TFF */
|
|
|
|
gint pic_field_order;
|
|
|
|
gboolean pic_field_order_changed;
|
2017-03-16 04:23:01 +00:00
|
|
|
GstVideoMultiviewMode cur_multiview_mode;
|
|
|
|
GstVideoMultiviewFlags cur_multiview_flags;
|
2012-11-19 09:29:00 +00:00
|
|
|
/* current context */
|
|
|
|
gint ctx_ticks;
|
|
|
|
gint ctx_time_d;
|
|
|
|
gint ctx_time_n;
|
2012-12-12 08:48:53 +00:00
|
|
|
GstBuffer *palette;
|
2012-11-19 09:29:00 +00:00
|
|
|
|
|
|
|
guint8 *padded;
|
2018-06-30 00:18:43 +00:00
|
|
|
gint padded_size;
|
2012-11-19 09:29:00 +00:00
|
|
|
|
|
|
|
/* some properties */
|
|
|
|
enum AVDiscard skip_frame;
|
|
|
|
gint lowres;
|
|
|
|
gboolean direct_rendering;
|
|
|
|
int max_threads;
|
2014-01-17 20:38:23 +00:00
|
|
|
gboolean output_corrupt;
|
2018-10-06 09:51:58 +00:00
|
|
|
guint thread_type;
|
2022-11-01 13:35:11 +00:00
|
|
|
GstAvCodecCompliance std_compliance;
|
2012-11-19 09:29:00 +00:00
|
|
|
|
|
|
|
GstCaps *last_caps;
|
2015-08-16 17:08:16 +00:00
|
|
|
|
|
|
|
/* Internally used for direct rendering */
|
|
|
|
GstBufferPool *internal_pool;
|
2015-08-20 15:02:11 +00:00
|
|
|
gint pool_width;
|
|
|
|
gint pool_height;
|
2015-11-04 20:18:56 +00:00
|
|
|
enum AVPixelFormat pool_format;
|
2015-08-20 15:02:11 +00:00
|
|
|
GstVideoInfo pool_info;
|
2012-11-19 09:29:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _GstFFMpegVidDecClass GstFFMpegVidDecClass;
|
|
|
|
|
|
|
|
struct _GstFFMpegVidDecClass
|
|
|
|
{
|
|
|
|
GstVideoDecoderClass parent_class;
|
|
|
|
|
2022-11-01 15:13:23 +00:00
|
|
|
const AVCodec *in_plugin;
|
2012-11-19 09:29:00 +00:00
|
|
|
};
|
|
|
|
|
2022-11-01 15:13:23 +00:00
|
|
|
GType gst_ffmpegviddec_get_type (void);
|
|
|
|
|
2012-11-19 09:29:00 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif
|