1 /*
2  *  gstvaapidecoder_h264.h - H.264 decoder
3  *
4  *  Copyright (C) 2011-2013 Intel Corporation
5  *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
6  *
7  *  This library is free software; you can redistribute it and/or
8  *  modify it under the terms of the GNU Lesser General Public License
9  *  as published by the Free Software Foundation; either version 2.1
10  *  of the License, or (at your option) any later version.
11  *
12  *  This library is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  *  Lesser General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Lesser General Public
18  *  License along with this library; if not, write to the Free
19  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  *  Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef GST_VAAPI_DECODER_H264_H
24 #define GST_VAAPI_DECODER_H264_H
25 
26 #include <gst/vaapi/gstvaapidecoder.h>
27 
28 G_BEGIN_DECLS
29 
30 #define GST_TYPE_VAAPI_DECODER_H264 \
31     (gst_vaapi_decoder_h264_get_type ())
32 #define GST_VAAPI_DECODER_H264(obj) \
33     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VAAPI_DECODER_H264, GstVaapiDecoderH264))
34 #define GST_VAAPI_IS_DECODER_H264(obj) \
35     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VAAPI_DECODER_H264))
36 
37 typedef struct _GstVaapiDecoderH264             GstVaapiDecoderH264;
38 
39 /**
40  * GstVaapiStreamAlignH264:
41  * @GST_VAAPI_STREAM_ALIGN_H264_NONE: Generic H.264 stream buffers
42  * @GST_VAAPI_STREAM_ALIGN_H264_NALU: H.264 stream buffers aligned NAL
43  *   unit boundaries
44  * @GST_VAAPI_STREAM_ALIGN_H264_AU: H.264 stream buffers aligned on
45  *   access unit boundaries
46  *
47  * Set of possible buffer alignments for H.264 streams.
48  */
49 typedef enum {
50     GST_VAAPI_STREAM_ALIGN_H264_NONE,
51     GST_VAAPI_STREAM_ALIGN_H264_NALU,
52     GST_VAAPI_STREAM_ALIGN_H264_AU
53 } GstVaapiStreamAlignH264;
54 
55 GType
56 gst_vaapi_decoder_h264_get_type (void) G_GNUC_CONST;
57 
58 GstVaapiDecoder *
59 gst_vaapi_decoder_h264_new (GstVaapiDisplay *display, GstCaps *caps);
60 
61 void
62 gst_vaapi_decoder_h264_set_alignment(GstVaapiDecoderH264 *decoder,
63     GstVaapiStreamAlignH264 alignment);
64 
65 gboolean
66 gst_vaapi_decoder_h264_get_low_latency(GstVaapiDecoderH264 * decoder);
67 
68 void
69 gst_vaapi_decoder_h264_set_low_latency(GstVaapiDecoderH264 * decoder,
70     gboolean force_low_latency);
71 
72 void
73 gst_vaapi_decoder_h264_set_base_only(GstVaapiDecoderH264 * decoder,
74     gboolean base_only);
75 
76 G_END_DECLS
77 
78 #endif /* GST_VAAPI_DECODER_H264_H */
79