1 /* GStreamer H264 encoder plugin
2 * Copyright (C) 2005 Michal Benes <michal.benes@itonis.tv>
3 * Copyright (C) 2005 Josef Zlomek <josef.zlomek@itonis.tv>
4 * Copyright (C) 2016 Sebastian Dröge <sebastian@centricular.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_X264_ENC_H__
23 #define __GST_X264_ENC_H__
26 #include <gst/video/video.h>
27 #include <gst/video/gstvideoencoder.h>
37 #define GST_TYPE_X264_ENC \
38 (gst_x264_enc_get_type())
39 #define GST_X264_ENC(obj) \
40 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_X264_ENC,GstX264Enc))
41 #define GST_X264_ENC_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_X264_ENC,GstX264EncClass))
43 #define GST_IS_X264_ENC(obj) \
44 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_X264_ENC))
45 #define GST_IS_X264_ENC_CLASS(klass) \
46 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_X264_ENC))
48 typedef struct _GstX264Enc GstX264Enc;
49 typedef struct _GstX264EncClass GstX264EncClass;
50 typedef struct _GstX264EncVTable GstX264EncVTable;
54 GstVideoEncoder element;
57 GstX264EncVTable *vtable;
59 x264_param_t x264param;
60 gint current_byte_stream;
62 /* List of frame/buffer mapping structs for
64 GList *pending_frames;
68 gboolean sliced_threads;
75 gboolean intra_refresh;
88 guint vbv_buf_capacity;
98 guint noise_reduction;
104 GString *option_string_prop; /* option-string property */
105 GString *option_string; /* used by set prop */
108 /* input description */
109 GstVideoCodecState *input_state;
111 /* configuration changed while playing */
114 /* from the downstream caps */
115 const gchar *peer_profile;
116 gboolean peer_intra_profile;
120 struct _GstX264EncClass
122 GstVideoEncoderClass parent_class;
125 GType gst_x264_enc_get_type (void);
129 #endif /* __GST_X264_ENC_H__ */