2 * gstvaapiencoder_mpeg4.h - MPEG-4 encoder
4 * Copyright (C) 2011 Intel Corporation
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.
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.
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
22 #ifndef GST_VAAPI_ENCODER_MPEG4_H
23 #define GST_VAAPI_ENCODER_MPEG4_H
25 #include "gst/vaapi/gstvaapisurfacepool.h"
26 #include "gst/vaapi/gstvaapibaseencoder.h"
30 #define MPEG4_DEFAULT_INTRA_PERIOD 30
31 #define MPEG4_DEFAULT_INIT_QP 15
32 #define MPEG4_DEFAULT_MIN_QP 1
33 #define MPEG4_DEFAULT_SIMPLE_PROFILE_AND_LEVEL 0x03
34 #define MPEG4_DEFAULT_ADVANCED_SIMPLE_PROFILE_AND_LEVEL 0xF3
36 #define MPEG4_DEFAULT_FIXED_VOP_RATE FALSE
39 typedef struct _GstVaapiEncoderMpeg4 GstVaapiEncoderMpeg4;
40 typedef struct _GstVaapiEncoderMpeg4Private GstVaapiEncoderMpeg4Private;
41 typedef struct _GstVaapiEncoderMpeg4Class GstVaapiEncoderMpeg4Class;
44 #define GST_TYPE_VAAPI_ENCODER_MPEG4 \
45 (gst_vaapi_encoder_mpeg4_get_type())
47 #define GST_IS_VAAPI_ENCODER_MPEG4(obj) \
48 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_ENCODER_MPEG4))
50 #define GST_IS_VAAPI_ENCODER_MPEG4_CLASS(klass) \
51 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VAAPI_ENCODER_MPEG4))
53 #define GST_VAAPI_ENCODER_MPEG4_GET_CLASS(obj) \
54 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
55 GST_TYPE_VAAPI_ENCODER_MPEG4, \
56 GstVaapiEncoderMpeg4Class))
58 #define GST_VAAPI_ENCODER_MPEG4(obj) \
59 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
60 GST_TYPE_VAAPI_ENCODER_MPEG4, \
61 GstVaapiEncoderMpeg4))
63 #define GST_VAAPI_ENCODER_MPEG4_CLASS(klass) \
64 (G_TYPE_CHECK_CLASS_CAST ((klass), \
65 GST_TYPE_VAAPI_ENCODER_MPEG4, \
66 GstVaapiEncoderMpeg4Class))
68 #define GST_VAAPI_ENCODER_MPEG4_GET_PRIVATE(obj) \
69 (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
70 GST_TYPE_VAAPI_ENCODER_MPEG4, \
71 GstVaapiEncoderMpeg4Private))
73 struct _GstVaapiEncoderMpeg4 {
74 GstVaapiBaseEncoder parent; /*based on gobject*/
75 VAProfile profile; /* VAProfileMPEG4Simple, VAProfileMPEG4AdvancedSimple */
78 guint32 init_qp; /*default 15, 1~31*/
79 guint32 min_qp; /*default 1, 1~31*/
81 GstVaapiEncoderMpeg4Private *priv;
84 struct _GstVaapiEncoderMpeg4Class {
85 GstVaapiBaseEncoderClass parent_class;
89 gst_vaapi_encoder_mpeg4_get_type(void);
91 GstVaapiEncoderMpeg4 *
92 gst_vaapi_encoder_mpeg4_new(void);
95 gst_vaapi_encoder_mpeg4_unref (GstVaapiEncoderMpeg4 * encoder)
97 g_object_unref (encoder);
103 #endif /* GST_VAAPI_ENCODER_MPEG4_H */