Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / sys / vdpau / h264 / gsth264frame.h
1 /*
2 * GStreamer
3 * Copyright (C) 2009 Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
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 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef _GST_H264_FRAME_H_
22 #define _GST_H264_FRAME_H_
23
24 #include <gst/gst.h>
25
26 #include "../basevideodecoder/gstvideoframe.h"
27
28 #include "gsth264parser.h"
29
30 #define GST_TYPE_H264_FRAME      (gst_h264_frame_get_type())
31 #define GST_IS_H264_FRAME(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_H264_FRAME))
32 #define GST_H264_FRAME(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_H264_FRAME, GstH264Frame))
33 #define GST_H264_FRAME_CAST(obj) ((GstH264Frame *)obj)
34
35 #define GST_H264_FRAME_GOT_PRIMARY GST_VIDEO_FRAME_FLAG_LAST
36
37 typedef struct _GstH264Frame GstH264Frame;
38 typedef struct _GstH264FrameClass GstH264FrameClass;
39
40 struct _GstH264Frame
41 {
42   GstVideoFrame video_frame;
43
44   GstH264Slice slice_hdr;
45   GPtrArray *slices;
46
47   guint poc;
48   guint16 frame_idx;
49   gboolean is_reference;
50   gboolean is_long_term;
51   gboolean output_needed;
52 };
53
54 struct _GstH264FrameClass
55 {
56         GstVideoFrameClass video_frame_class;
57 };
58
59 void gst_h264_frame_add_slice (GstH264Frame *h264_frame, GstBuffer *buf);
60
61 GstH264Frame *gst_h264_frame_new (void);
62
63 GType gst_h264_frame_get_type (void);
64
65 #endif