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>
32 #define GST_TYPE_X264_ENC \
33 (gst_x264_enc_get_type())
34 #define GST_X264_ENC(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_X264_ENC,GstX264Enc))
36 #define GST_X264_ENC_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_X264_ENC,GstX264EncClass))
38 #define GST_IS_X264_ENC(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_X264_ENC))
40 #define GST_IS_X264_ENC_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_X264_ENC))
43 typedef struct _GstX264Enc GstX264Enc;
44 typedef struct _GstX264EncClass GstX264EncClass;
48 GstVideoEncoder element;
52 x264_param_t x264param;
53 gint current_byte_stream;
56 /* List of frame/buffer mapping structs for
58 GList *pending_frames;
62 gboolean sliced_threads;
69 gboolean intra_refresh;
82 guint vbv_buf_capacity;
92 guint noise_reduction;
98 GString *option_string_prop; /* option-string property */
99 GString *option_string; /* used by set prop */
101 /* input description */
102 GstVideoCodecState *input_state;
104 /* configuration changed while playing */
107 /* from the downstream caps */
108 const gchar *peer_profile;
109 gboolean peer_intra_profile;
110 const x264_level_t *peer_level;
113 struct _GstX264EncClass
115 GstVideoEncoderClass parent_class;
118 GType gst_x264_enc_get_type (void);
122 #endif /* __GST_X264_ENC_H__ */