Tizen 2.0 Release
[framework/multimedia/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapiencoder_h263.h
1 /*
2  *  gstvaapiencoder_h263.h - H.263 encoder
3  *
4  *  Copyright (C) 2011 Intel Corporation
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public License
8  *  as published by the Free Software Foundation; either version 2.1
9  *  of the License, or (at your option) any later version.
10  *
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  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this library; if not, write to the Free
18  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  *  Boston, MA 02110-1301 USA
20  */
21
22 #ifndef GST_VAAPI_ENCODER_H263_H
23 #define GST_VAAPI_ENCODER_H263_H
24
25 #include "gst/vaapi/gstvaapisurfacepool.h"
26 #include "gst/vaapi/gstvaapibaseencoder.h"
27
28 G_BEGIN_DECLS
29
30 #define H263_DEFAULT_INTRA_PERIOD 30
31 #define H263_DEFAULT_INIT_QP      15
32 #define H263_DEFAULT_MIN_QP       1
33
34
35 typedef struct _GstVaapiEncoderH263              GstVaapiEncoderH263;
36 typedef struct _GstVaapiEncoderH263Private       GstVaapiEncoderH263Private;
37 typedef struct _GstVaapiEncoderH263Class         GstVaapiEncoderH263Class;
38
39
40 #define GST_TYPE_VAAPI_ENCODER_H263 \
41     (gst_vaapi_encoder_h263_get_type())
42
43 #define GST_IS_VAAPI_ENCODER_H263(obj) \
44     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_ENCODER_H263))
45
46 #define GST_IS_VAAPI_ENCODER_H263_CLASS(klass) \
47     (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VAAPI_ENCODER_H263))
48
49 #define GST_VAAPI_ENCODER_H263_GET_CLASS(obj)                  \
50     (G_TYPE_INSTANCE_GET_CLASS ((obj),                         \
51                                 GST_TYPE_VAAPI_ENCODER_H263,   \
52                                 GstVaapiEncoderH263Class))
53
54 #define GST_VAAPI_ENCODER_H263(obj)                            \
55     (G_TYPE_CHECK_INSTANCE_CAST ((obj),                        \
56                                  GST_TYPE_VAAPI_ENCODER_H263,  \
57                                  GstVaapiEncoderH263))
58
59 #define GST_VAAPI_ENCODER_H263_CLASS(klass)                    \
60     (G_TYPE_CHECK_CLASS_CAST ((klass),                         \
61                               GST_TYPE_VAAPI_ENCODER_H263,     \
62                               GstVaapiEncoderH263Class))
63
64 #define GST_VAAPI_ENCODER_H263_GET_PRIVATE(obj)                \
65     (G_TYPE_INSTANCE_GET_PRIVATE((obj),                        \
66                                  GST_TYPE_VAAPI_ENCODER_H263,  \
67                                  GstVaapiEncoderH263Private))
68
69 struct _GstVaapiEncoderH263 {
70   GstVaapiBaseEncoder parent;   /*based on gobject*/
71
72   guint32  bitrate;  /*kbps*/
73   guint32  intra_period;
74   guint32  init_qp;  /*default 15, 1~31*/
75   guint32  min_qp;   /*default 1, 1~31*/
76
77   GstVaapiEncoderH263Private *priv;
78 };
79
80 struct _GstVaapiEncoderH263Class {
81     GstVaapiBaseEncoderClass parent_class;
82 };
83
84
85 GType
86 gst_vaapi_encoder_h263_get_type(void);
87
88 GstVaapiEncoderH263 *
89 gst_vaapi_encoder_h263_new(void);
90
91 static inline void
92 gst_vaapi_encoder_h263_unref (GstVaapiEncoderH263 * encoder)
93 {
94   g_object_unref (encoder);
95 }
96
97
98 G_END_DECLS
99
100 #endif /* GST_VAAPI_ENCODER_H263_H */