plugins: Use <stdint.h> instead of _stdint.h
[platform/upstream/gst-plugins-ugly.git] / ext / x264 / gstx264enc.h
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  *
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.
9  *
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.
14  *
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.
19  */
20
21 #ifndef __GST_X264_ENC_H__
22 #define __GST_X264_ENC_H__
23
24 #include <gst/gst.h>
25 #include <gst/video/video.h>
26 #include <gst/video/gstvideoencoder.h>
27
28 #ifdef HAVE_STDINT_H
29 #include <stdint.h>
30 #endif
31
32 #include <x264.h>
33
34 G_BEGIN_DECLS
35
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))
46
47 typedef struct _GstX264Enc GstX264Enc;
48 typedef struct _GstX264EncClass GstX264EncClass;
49
50 struct _GstX264Enc
51 {
52   GstVideoEncoder element;
53
54   /*< private >*/
55   x264_t *x264enc;
56   x264_param_t x264param;
57   gint current_byte_stream;
58
59   /* List of frame/buffer mapping structs for
60    * pending frames */
61   GList *pending_frames;
62
63   /* properties */
64   guint threads;
65   gboolean sliced_threads;
66   gint sync_lookahead;
67   gint pass;
68   guint quantizer;
69   gchar *mp_cache_file;
70   gboolean byte_stream;
71   guint bitrate;
72   gboolean intra_refresh;
73   gint me;
74   guint subme;
75   guint analyse;
76   gboolean dct8x8;
77   guint ref;
78   guint bframes;
79   gboolean b_adapt;
80   gboolean b_pyramid;
81   gboolean weightb;
82   guint sps_id;
83   gboolean au_nalu;
84   gboolean trellis;
85   guint vbv_buf_capacity;
86   guint keyint_max;
87   gboolean cabac;
88   gfloat ip_factor;
89   gfloat pb_factor;
90   guint qp_min;
91   guint qp_max;
92   guint qp_step;
93   gboolean mb_tree;
94   gint rc_lookahead;
95   guint noise_reduction;
96   gboolean interlaced;
97   gint speed_preset;
98   gint psy_tune;
99   guint tune;
100   GString *tunings;
101   GString *option_string_prop; /* option-string property */
102   GString *option_string; /* used by set prop */
103   gint frame_packing;
104
105   /* input description */
106   GstVideoCodecState *input_state;
107
108   /* configuration changed  while playing */
109   gboolean reconfig;
110
111   /* from the downstream caps */
112   const gchar *peer_profile;
113   gboolean peer_intra_profile;
114   const x264_level_t *peer_level;
115 };
116
117 struct _GstX264EncClass
118 {
119   GstVideoEncoderClass parent_class;
120 };
121
122 GType gst_x264_enc_get_type (void);
123
124 G_END_DECLS
125
126 #endif /* __GST_X264_ENC_H__ */