2 * Copyright (C) 2011, Hewlett-Packard Development Company, L.P.
3 * Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>, Collabora Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation
8 * version 2.1 of the License.
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 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef __GST_OMX_H264_DEC_H__
22 #define __GST_OMX_H264_DEC_H__
25 #include "gstomxvideodec.h"
29 #define GST_TYPE_OMX_H264_DEC \
30 (gst_omx_h264_dec_get_type())
31 #define GST_OMX_H264_DEC(obj) \
32 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OMX_H264_DEC,GstOMXH264Dec))
33 #define GST_OMX_H264_DEC_CLASS(klass) \
34 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OMX_H264_DEC,GstOMXH264DecClass))
35 #define GST_OMX_H264_DEC_GET_CLASS(obj) \
36 (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OMX_H264_DEC,GstOMXH264DecClass))
37 #define GST_IS_OMX_H264_DEC(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OMX_H264_DEC))
39 #define GST_IS_OMX_H264_DEC_CLASS(obj) \
40 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OMX_H264_DEC))
42 typedef struct _GstOMXH264Dec GstOMXH264Dec;
43 typedef struct _GstOMXH264DecClass GstOMXH264DecClass;
45 #ifdef TIZEN_FEATURE_OMX
46 #define GST_OMX_H264_NAL_START_LEN 4
47 #define GST_OMX_H264_SPSPPS_LEN 2
49 #define GST_OMX_H264_RB16(x) ((((const unsigned char*)(x))[0] << 8) | ((const unsigned char*)(x))[1])
50 #define GST_OMX_H264_RB32(x) ((((const unsigned char*)(x))[0] << 24) | \
51 (((const unsigned char*)(x))[1] << 16) | \
52 (((const unsigned char*)(x))[2] << 8) | \
53 ((const unsigned char*)(x))[3])
54 #define GST_OMX_H264_WB32(p, d) \
56 ((unsigned char*)(p))[3] = (d); \
57 ((unsigned char*)(p))[2] = (d)>>8; \
58 ((unsigned char*)(p))[1] = (d)>>16; \
59 ((unsigned char*)(p))[0] = (d)>>24; \
64 GST_OMX_H264_NUT_UNKNOWN = 0,
65 GST_OMX_H264_NUT_SLICE = 1,
66 GST_OMX_H264_NUT_DPA = 2,
67 GST_OMX_H264_NUT_DPB = 3,
68 GST_OMX_H264_NUT_DPC = 4,
69 GST_OMX_H264_NUT_IDR = 5,
70 GST_OMX_H264_NUT_SEI = 6,
71 GST_OMX_H264_NUT_SPS = 7,
72 GST_OMX_H264_NUT_PPS = 8,
73 GST_OMX_H264_NUT_AUD = 9,
74 GST_OMX_H264_NUT_EOSEQ = 10,
75 GST_OMX_H264_NUT_EOSTREAM = 11,
76 GST_OMX_H264_NUT_FILL = 12,
77 GST_OMX_H264_NUT_PREFIX = 14,
78 GST_OMX_H264_NUT_MIXED = 24,
79 } GSTOMX_H264_NAL_UNIT_TYPE;
83 GST_OMX_H264_FORMAT_UNKNOWN,
84 GST_OMX_H264_FORMAT_PACKETIZED,
85 GST_OMX_H264_FORMAT_BYTE_STREAM,
86 } GST_OMX_H264_STREAM_FORMAT;
91 GstOMXVideoDec parent;
92 #ifdef TIZEN_FEATURE_OMX
93 GST_OMX_H264_STREAM_FORMAT h264_format;
94 unsigned int h264_nal_length_size;
98 struct _GstOMXH264DecClass
100 GstOMXVideoDecClass parent_class;
103 GType gst_omx_h264_dec_get_type (void);
107 #endif /* __GST_OMX_H264_DEC_H__ */