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>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_X264_ENC_H__
22 #define __GST_X264_ENC_H__
25 #include <gst/video/video.h>
26 #include <gst/video/gstvideoencoder.h>
36 #define GST_TYPE_X264_ENC \
37 (gst_x264_enc_get_type())
38 #define GST_X264_ENC(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_X264_ENC,GstX264Enc))
40 #define GST_X264_ENC_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_X264_ENC,GstX264EncClass))
42 #define GST_IS_X264_ENC(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_X264_ENC))
44 #define GST_IS_X264_ENC_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_X264_ENC))
47 typedef struct _GstX264Enc GstX264Enc;
48 typedef struct _GstX264EncClass GstX264EncClass;
52 GstVideoEncoder element;
56 x264_param_t x264param;
57 gint current_byte_stream;
59 /* List of frame/buffer mapping structs for
61 GList *pending_frames;
65 gboolean sliced_threads;
72 gboolean intra_refresh;
85 guint vbv_buf_capacity;
95 guint noise_reduction;
101 GString *option_string_prop; /* option-string property */
102 GString *option_string; /* used by set prop */
105 /* input description */
106 GstVideoCodecState *input_state;
108 /* configuration changed while playing */
111 /* from the downstream caps */
112 const gchar *peer_profile;
113 gboolean peer_intra_profile;
114 const x264_level_t *peer_level;
117 struct _GstX264EncClass
119 GstVideoEncoderClass parent_class;
122 GType gst_x264_enc_get_type (void);
126 #endif /* __GST_X264_ENC_H__ */