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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 /* First, include the header file for the plugin, to bring in the
21 * object definition and other useful things.
24 #ifndef __GST_FFMPEGENC_H__
25 #define __GST_FFMPEGENC_H__
29 #include <gst/base/gstadapter.h>
31 typedef struct _GstFFMpegEnc GstFFMpegEnc;
37 /* We need to keep track of our pads, so we do so here. */
41 AVCodecContext *context;
44 GstClockTime adapter_ts;
45 guint64 adapter_consumed;
54 gulong rtp_payload_size;
57 gulong working_buf_size;
59 /* settings with some special handling */
65 gint max_key_interval;
71 /* for b-frame delay handling */
74 /* other settings are copied over straight,
75 * include a context here, rather than copy-and-past it from avcodec.h */
76 AVCodecContext config;
78 gboolean force_keyframe;
81 typedef struct _GstFFMpegEncClass GstFFMpegEncClass;
83 struct _GstFFMpegEncClass
85 GstElementClass parent_class;
88 GstPadTemplate *srctempl, *sinktempl;
92 #define GST_TYPE_FFMPEGENC \
93 (gst_ffmpegenc_get_type())
94 #define GST_FFMPEGENC(obj) \
95 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGENC,GstFFMpegEnc))
96 #define GST_FFMPEGENC_CLASS(klass) \
97 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGENC,GstFFMpegEncClass))
98 #define GST_IS_FFMPEGENC(obj) \
99 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGENC))
100 #define GST_IS_FFMPEGENC_CLASS(klass) \
101 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGENC))
105 #endif /* __GST_FFMPEGENC_H__ */