2012-04-07 08:36:04 +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
|
2012-11-04 00:22:16 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2012-04-07 08:36:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* First, include the header file for the plugin, to bring in the
|
|
|
|
* object definition and other useful things.
|
|
|
|
*/
|
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
#ifndef __GST_FFMPEGVIDENC_H__
|
|
|
|
#define __GST_FFMPEGVIDENC_H__
|
2012-04-07 08:36:04 +00:00
|
|
|
|
2012-11-19 09:29:00 +00:00
|
|
|
#include <gst/gst.h>
|
2018-05-11 12:24:03 +00:00
|
|
|
#include <gst/video/video.h>
|
2012-11-19 09:29:00 +00:00
|
|
|
#include <libavcodec/avcodec.h>
|
2012-04-24 09:31:27 +00:00
|
|
|
|
2018-06-27 18:41:37 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
typedef struct _GstFFMpegVidEnc GstFFMpegVidEnc;
|
2012-04-07 08:36:04 +00:00
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
struct _GstFFMpegVidEnc
|
2012-04-07 08:36:04 +00:00
|
|
|
{
|
2012-04-24 09:31:27 +00:00
|
|
|
GstVideoEncoder parent;
|
2012-04-07 08:36:04 +00:00
|
|
|
|
2012-04-24 09:31:27 +00:00
|
|
|
GstVideoCodecState *input_state;
|
2012-04-07 08:36:04 +00:00
|
|
|
|
|
|
|
AVCodecContext *context;
|
|
|
|
AVFrame *picture;
|
2023-01-13 10:43:30 +00:00
|
|
|
GstClockTime pts_offset;
|
2012-04-07 08:36:04 +00:00
|
|
|
gboolean opened;
|
2020-10-05 18:47:42 +00:00
|
|
|
gboolean need_reopen;
|
2012-04-07 08:36:04 +00:00
|
|
|
gboolean discont;
|
|
|
|
guint pass;
|
|
|
|
gfloat quantizer;
|
|
|
|
|
|
|
|
/* statistics file */
|
2018-06-27 18:41:37 +00:00
|
|
|
gchar *filename;
|
2012-04-07 08:36:04 +00:00
|
|
|
FILE *file;
|
|
|
|
|
2018-06-27 18:41:37 +00:00
|
|
|
/* cache */
|
|
|
|
guint8 *working_buf;
|
|
|
|
gsize working_buf_size;
|
|
|
|
|
|
|
|
AVCodecContext *refcontext;
|
2012-04-07 08:36:04 +00:00
|
|
|
};
|
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
typedef struct _GstFFMpegVidEncClass GstFFMpegVidEncClass;
|
2012-04-07 08:36:04 +00:00
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
struct _GstFFMpegVidEncClass
|
2012-04-07 08:36:04 +00:00
|
|
|
{
|
2012-04-24 09:31:27 +00:00
|
|
|
GstVideoEncoderClass parent_class;
|
2012-04-07 08:36:04 +00:00
|
|
|
|
|
|
|
AVCodec *in_plugin;
|
|
|
|
GstPadTemplate *srctempl, *sinktempl;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2012-04-07 09:14:45 +00:00
|
|
|
#endif /* __GST_FFMPEGVIDENC_H__ */
|