add Intel Copyright
[profile/ivi/gstreamer-vaapi.git] / gst / vaapiencode / gstvaapih263encoder.h
1 /*
2  *  gstvaapih263encoder.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_H263_ENCODER_H_
23 #define _GST_VAAPI_H263_ENCODER_H_
24
25
26 #include "gst/vaapi/gstvaapisurfacepool.h"
27
28 #include "gstvaapibaseencoder.h"
29
30 G_BEGIN_DECLS
31
32 #define H263_DEFAULT_INTRA_PERIOD 30
33 #define H263_DEFAULT_INIT_QP      15
34 #define H263_DEFAULT_MIN_QP       1
35
36
37 typedef struct _GstH263Encoder              GstH263Encoder;
38 typedef struct _GstH263EncoderPrivate       GstH263EncoderPrivate;
39 typedef struct _GstH263EncoderClass         GstH263EncoderClass;
40
41
42 #define GST_TYPE_H263_ENCODER             (gst_h263_encoder_get_type())
43 #define GST_IS_H263_ENCODER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_H263_ENCODER))
44 #define GST_IS_H263_ENCODER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_H263_ENCODER))
45 #define GST_H263_ENCODER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_H263_ENCODER, GstH263EncoderClass))
46 #define GST_H263_ENCODER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_H263_ENCODER, GstH263Encoder))
47 #define GST_H263_ENCODER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_H263_ENCODER, GstH263EncoderClass))
48 #define GST_H263_ENCODER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj),GST_TYPE_H263_ENCODER,GstH263EncoderPrivate))
49
50 struct _GstH263Encoder {
51   GstVaapiBaseEncoder parent;   /*based on gobject*/
52
53   guint32  bitrate;
54   guint32  intra_period;
55   guint32  init_qp;  /*default 15, 1~31*/
56   guint32  min_qp;   /*default 1, 1~31*/
57 };
58
59 struct _GstH263EncoderClass {
60     GstVaapiBaseEncoderClass parent_class;
61 };
62
63
64 GType    gst_h263_encoder_get_type(void);
65
66 GstH263Encoder *gst_h263_encoder_new(void);
67 static inline void gst_h263_encoder_unref (GstH263Encoder * encoder)
68 {
69   g_object_unref (encoder);
70 }
71
72
73 G_END_DECLS
74
75 #endif /* _GST_VAAPI_H263_ENCODER_H_ */
76