summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-27 01:27:28 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-28 11:11:52 +0200
commitec815085bf736e722086200f4cb0381be6a525bd (patch)
treea1340c4c065e96361547cc09bd7f48a055564e4a /sys/vdpau
parent00fd85c0f527e2ec85409778c5a5b1037937ccb6 (diff)
vdpauh264dec: rename GstVdpH264Frame to GstH264Frame
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/Makefile.am6
-rw-r--r--sys/vdpau/h264/gsth264dpb.c26
-rw-r--r--sys/vdpau/h264/gsth264dpb.h8
-rw-r--r--sys/vdpau/h264/gsth264frame.c (renamed from sys/vdpau/h264/gstvdph264frame.c)52
-rw-r--r--sys/vdpau/h264/gsth264frame.h (renamed from sys/vdpau/h264/gstvdph264frame.h)28
-rw-r--r--sys/vdpau/h264/gstvdph264dec.c33
6 files changed, 76 insertions, 77 deletions
diff --git a/sys/vdpau/Makefile.am b/sys/vdpau/Makefile.am
index 7ed6b581f..658183eeb 100644
--- a/sys/vdpau/Makefile.am
+++ b/sys/vdpau/Makefile.am
@@ -11,7 +11,7 @@ libgstvdpau_la_SOURCES = \
mpeg/gstvdpmpegdec.c \
h264/gstnalreader.c \
h264/gsth264parser.c \
- h264/gstvdph264frame.c \
+ h264/gsth264frame.c \
h264/gsth264dpb.c \
h264/gstvdph264dec.c
@@ -34,6 +34,6 @@ noinst_HEADERS = \
mpeg/gstvdpmpegdec.h \
h264/gstnalreader.h \
h264/gsth264parser.h \
- h264/gstvdph264frame.h \
+ h264/gsth264frame.h \
h264/gsth264dpb.h \
- h264/gstvdph264dec.h
+ h264/gstvdph264dec.h \ No newline at end of file
diff --git a/sys/vdpau/h264/gsth264dpb.c b/sys/vdpau/h264/gsth264dpb.c
index 382ac2848..6d75d582f 100644
--- a/sys/vdpau/h264/gsth264dpb.c
+++ b/sys/vdpau/h264/gsth264dpb.c
@@ -41,12 +41,12 @@ void
gst_h264_dpb_fill_reference_frames (GstH264DPB * dpb,
VdpReferenceFrameH264 reference_frames[16])
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
frames = dpb->frames;
for (i = 0; i < dpb->n_frames; i++) {
- GstVdpH264Frame *frame = frames[i];
+ GstH264Frame *frame = frames[i];
reference_frames[i].surface =
GST_VDP_VIDEO_BUFFER (GST_VIDEO_FRAME_CAST (frame)->
@@ -70,7 +70,7 @@ gst_h264_dpb_fill_reference_frames (GstH264DPB * dpb,
static void
gst_h264_dpb_remove (GstH264DPB * dpb, guint idx)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
frames = dpb->frames;
@@ -84,7 +84,7 @@ gst_h264_dpb_remove (GstH264DPB * dpb, guint idx)
static void
gst_h264_dpb_output (GstH264DPB * dpb, guint idx)
{
- GstVdpH264Frame *frame = dpb->frames[idx];
+ GstH264Frame *frame = dpb->frames[idx];
gst_video_frame_ref (GST_VIDEO_FRAME_CAST (frame));
dpb->output (dpb, frame, dpb->user_data);
@@ -97,7 +97,7 @@ gst_h264_dpb_output (GstH264DPB * dpb, guint idx)
static gboolean
gst_h264_dpb_bump (GstH264DPB * dpb, guint poc)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
gint bump_idx;
@@ -127,9 +127,9 @@ gst_h264_dpb_bump (GstH264DPB * dpb, guint poc)
}
gboolean
-gst_h264_dpb_add (GstH264DPB * dpb, GstVdpH264Frame * h264_frame)
+gst_h264_dpb_add (GstH264DPB * dpb, GstH264Frame * h264_frame)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
GST_DEBUG ("add frame with poc: %d", h264_frame->poc);
@@ -179,7 +179,7 @@ gst_h264_dpb_flush (GstH264DPB * dpb, gboolean output)
void
gst_h264_dpb_mark_sliding (GstH264DPB * dpb)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
gint mark_idx = -1;
@@ -211,7 +211,7 @@ void
gst_h264_dpb_mark_long_term (GstH264DPB * dpb, guint16 pic_num,
guint16 long_term_frame_idx)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
gint mark_idx = -1;
@@ -233,7 +233,7 @@ gst_h264_dpb_mark_long_term (GstH264DPB * dpb, guint16 pic_num,
void
gst_h264_dpb_mark_short_term_unused (GstH264DPB * dpb, guint16 pic_num)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
gint mark_idx = -1;
@@ -257,7 +257,7 @@ gst_h264_dpb_mark_short_term_unused (GstH264DPB * dpb, guint16 pic_num)
void
gst_h264_dpb_mark_long_term_unused (GstH264DPB * dpb, guint16 long_term_pic_num)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
gint mark_idx = -1;
@@ -281,7 +281,7 @@ gst_h264_dpb_mark_long_term_unused (GstH264DPB * dpb, guint16 long_term_pic_num)
void
gst_h264_dpb_mark_all_unused (GstH264DPB * dpb)
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
frames = dpb->frames;
@@ -345,7 +345,7 @@ gst_h264_dpb_set_property (GObject * object, guint property_id,
case PROP_MAX_LONGTERM_IDX:
{
- GstVdpH264Frame **frames;
+ GstH264Frame **frames;
guint i;
dpb->max_longterm_frame_idx = g_value_get_int (value);
diff --git a/sys/vdpau/h264/gsth264dpb.h b/sys/vdpau/h264/gsth264dpb.h
index a18be0d72..993c5524a 100644
--- a/sys/vdpau/h264/gsth264dpb.h
+++ b/sys/vdpau/h264/gsth264dpb.h
@@ -25,7 +25,7 @@
#include "../gstvdp/gstvdpvideobuffer.h"
-#include "gstvdph264frame.h"
+#include "gsth264frame.h"
G_BEGIN_DECLS
@@ -42,14 +42,14 @@ G_BEGIN_DECLS
typedef struct _GstH264DPB GstH264DPB;
typedef struct _GstH264DPBClass GstH264DPBClass;
-typedef void (*GstH264DPBOutputFunc) (GstH264DPB *dpb, GstVdpH264Frame *h264_frame, gpointer user_data);
+typedef void (*GstH264DPBOutputFunc) (GstH264DPB *dpb, GstH264Frame *h264_frame, gpointer user_data);
struct _GstH264DPB
{
GObject parent_instance;
/* private */
- GstVdpH264Frame *frames[MAX_DPB_SIZE];
+ GstH264Frame *frames[MAX_DPB_SIZE];
guint n_frames;
guint max_frames;
@@ -67,7 +67,7 @@ struct _GstH264DPBClass
void
gst_h264_dpb_fill_reference_frames (GstH264DPB *dpb, VdpReferenceFrameH264 reference_frames[16]);
-gboolean gst_h264_dpb_add (GstH264DPB *dpb, GstVdpH264Frame *h264_frame);
+gboolean gst_h264_dpb_add (GstH264DPB *dpb, GstH264Frame *h264_frame);
void gst_h264_dpb_flush (GstH264DPB *dpb, gboolean output);
void gst_h264_dpb_mark_sliding (GstH264DPB *dpb);
diff --git a/sys/vdpau/h264/gstvdph264frame.c b/sys/vdpau/h264/gsth264frame.c
index a8e6241bf..16c81b0e0 100644
--- a/sys/vdpau/h264/gstvdph264frame.c
+++ b/sys/vdpau/h264/gsth264frame.c
@@ -22,83 +22,83 @@
#include "config.h"
#endif
-#include "gstvdph264frame.h"
+#include "gsth264frame.h"
-GST_DEBUG_CATEGORY_STATIC (gst_vdp_h264_frame_debug);
-#define GST_CAT_DEFAULT gst_vdp_h264_frame_debug
+GST_DEBUG_CATEGORY_STATIC (gst_h264_frame_debug);
+#define GST_CAT_DEFAULT gst_h264_frame_debug
#define DEBUG_INIT(bla) \
-GST_DEBUG_CATEGORY_INIT (gst_vdp_h264_frame_debug, "gstvdph264frame", 0, "Video Frame");
+GST_DEBUG_CATEGORY_INIT (gst_h264_frame_debug, "gsth264frame", 0, "H264 Frame");
void
-gst_vdp_h264_frame_add_slice (GstVdpH264Frame * h264_frame, GstBuffer * buf)
+gst_h264_frame_add_slice (GstH264Frame * h264_frame, GstBuffer * buf)
{
gst_buffer_ref (buf);
g_ptr_array_add (h264_frame->slices, buf);
}
-GstVdpH264Frame *
-gst_vdp_h264_frame_new (void)
+GstH264Frame *
+gst_h264_frame_new (void)
{
- GstVdpH264Frame *frame;
+ GstH264Frame *frame;
- frame = (GstVdpH264Frame *) gst_mini_object_new (GST_TYPE_VDP_H264_FRAME);
+ frame = (GstH264Frame *) gst_mini_object_new (GST_TYPE_H264_FRAME);
return frame;
}
-static GObjectClass *gst_vdp_h264_frame_parent_class;
+static GObjectClass *gst_h264_frame_parent_class;
static void
-gst_vdp_h264_frame_finalize (GstVdpH264Frame * h264_frame)
+gst_h264_frame_finalize (GstH264Frame * h264_frame)
{
g_ptr_array_unref (h264_frame->slices);
- GST_MINI_OBJECT_CLASS (gst_vdp_h264_frame_parent_class)->finalize
+ GST_MINI_OBJECT_CLASS (gst_h264_frame_parent_class)->finalize
(GST_MINI_OBJECT (h264_frame));
}
static void
-gst_vdp_h264_frame_init (GstVdpH264Frame * h264_frame, gpointer g_class)
+gst_h264_frame_init (GstH264Frame * h264_frame, gpointer g_class)
{
h264_frame->slices = g_ptr_array_new_with_free_func (
(GDestroyNotify) gst_buffer_unref);
}
static void
-gst_vdp_h264_frame_class_init (gpointer g_class, gpointer class_data)
+gst_h264_frame_class_init (gpointer g_class, gpointer class_data)
{
GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
- gst_vdp_h264_frame_parent_class = g_type_class_peek_parent (g_class);
+ gst_h264_frame_parent_class = g_type_class_peek_parent (g_class);
mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
- gst_vdp_h264_frame_finalize;
+ gst_h264_frame_finalize;
}
GType
-gst_vdp_h264_frame_get_type (void)
+gst_h264_frame_get_type (void)
{
- static GType _gst_vdp_h264_frame_type = 0;
+ static GType _gst_h264_frame_type = 0;
- if (G_UNLIKELY (_gst_vdp_h264_frame_type == 0)) {
+ if (G_UNLIKELY (_gst_h264_frame_type == 0)) {
static const GTypeInfo info = {
- sizeof (GstVdpH264FrameClass),
+ sizeof (GstH264FrameClass),
NULL,
NULL,
- gst_vdp_h264_frame_class_init,
+ gst_h264_frame_class_init,
NULL,
NULL,
- sizeof (GstVdpH264Frame),
+ sizeof (GstH264Frame),
0,
- (GInstanceInitFunc) gst_vdp_h264_frame_init,
+ (GInstanceInitFunc) gst_h264_frame_init,
NULL
};
- _gst_vdp_h264_frame_type = g_type_register_static (GST_TYPE_VIDEO_FRAME,
- "GstVdpH264Frame", &info, 0);
+ _gst_h264_frame_type = g_type_register_static (GST_TYPE_VIDEO_FRAME,
+ "GstH264Frame", &info, 0);
DEBUG_INIT ();
}
- return _gst_vdp_h264_frame_type;
+ return _gst_h264_frame_type;
}
diff --git a/sys/vdpau/h264/gstvdph264frame.h b/sys/vdpau/h264/gsth264frame.h
index 2b8666894..025767354 100644
--- a/sys/vdpau/h264/gstvdph264frame.h
+++ b/sys/vdpau/h264/gsth264frame.h
@@ -18,8 +18,8 @@
* Boston, MA 02111-1307, USA.
*/
-#ifndef _GST_VDP_H264_FRAME_H_
-#define _GST_VDP_H264_FRAME_H_
+#ifndef _GST_H264_FRAME_H_
+#define _GST_H264_FRAME_H_
#include <gst/gst.h>
@@ -27,17 +27,17 @@
#include "gsth264parser.h"
-#define GST_TYPE_VDP_H264_FRAME (gst_vdp_h264_frame_get_type())
-#define GST_IS_VDP_H264_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VDP_H264_FRAME))
-#define GST_VDP_H264_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VDP_H264_FRAME, GstVdpH264Frame))
-#define GST_VDP_H264_FRAME_CAST(obj) ((GstVdpH264Frame *)obj)
+#define GST_TYPE_H264_FRAME (gst_h264_frame_get_type())
+#define GST_IS_H264_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_H264_FRAME))
+#define GST_H264_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_H264_FRAME, GstH264Frame))
+#define GST_H264_FRAME_CAST(obj) ((GstH264Frame *)obj)
-#define GST_VDP_H264_FRAME_GOT_PRIMARY GST_VIDEO_FRAME_FLAG_LAST
+#define GST_H264_FRAME_GOT_PRIMARY GST_VIDEO_FRAME_FLAG_LAST
-typedef struct _GstVdpH264Frame GstVdpH264Frame;
-typedef struct _GstVdpH264FrameClass GstVdpH264FrameClass;
+typedef struct _GstH264Frame GstH264Frame;
+typedef struct _GstH264FrameClass GstH264FrameClass;
-struct _GstVdpH264Frame
+struct _GstH264Frame
{
GstVideoFrame video_frame;
@@ -51,15 +51,15 @@ struct _GstVdpH264Frame
gboolean output_needed;
};
-struct _GstVdpH264FrameClass
+struct _GstH264FrameClass
{
GstVideoFrameClass video_frame_class;
};
-void gst_vdp_h264_frame_add_slice (GstVdpH264Frame *h264_frame, GstBuffer *buf);
+void gst_h264_frame_add_slice (GstH264Frame *h264_frame, GstBuffer *buf);
-GstVdpH264Frame *gst_vdp_h264_frame_new (void);
+GstH264Frame *gst_h264_frame_new (void);
-GType gst_vdp_h264_frame_get_type (void);
+GType gst_h264_frame_get_type (void);
#endif \ No newline at end of file
diff --git a/sys/vdpau/h264/gstvdph264dec.c b/sys/vdpau/h264/gstvdph264dec.c
index 1b6d1c515..3b66ab72f 100644
--- a/sys/vdpau/h264/gstvdph264dec.c
+++ b/sys/vdpau/h264/gstvdph264dec.c
@@ -26,7 +26,7 @@
#include <gst/base/gstbitreader.h>
#include <string.h>
-#include "gstvdph264frame.h"
+#include "gsth264frame.h"
#include "gstvdph264dec.h"
@@ -152,7 +152,7 @@ gst_vdp_h264_dec_set_sink_caps (GstBaseVideoDecoder * base_video_decoder,
}
static void
-gst_vdp_h264_dec_output (GstH264DPB * dpb, GstVdpH264Frame * h264_frame,
+gst_vdp_h264_dec_output (GstH264DPB * dpb, GstH264Frame * h264_frame,
gpointer user_data)
{
GstBaseVideoDecoder *base_video_decoder = (GstBaseVideoDecoder *) user_data;
@@ -197,7 +197,7 @@ gst_vdp_h264_dec_calculate_poc (GstVdpH264Dec * h264_dec, GstH264Slice * slice)
static void
gst_vdp_h264_dec_init_frame_info (GstVdpH264Dec * h264_dec,
- GstVdpH264Frame * h264_frame)
+ GstH264Frame * h264_frame)
{
GstH264Slice *slice;
@@ -239,7 +239,7 @@ gst_vdp_h264_dec_init_frame_info (GstVdpH264Dec * h264_dec,
}
static gboolean
-gst_vdp_h264_dec_idr (GstVdpH264Dec * h264_dec, GstVdpH264Frame * h264_frame)
+gst_vdp_h264_dec_idr (GstVdpH264Dec * h264_dec, GstH264Frame * h264_frame)
{
GstH264Slice *slice;
GstH264Sequence *seq;
@@ -320,8 +320,7 @@ gst_vdp_h264_dec_idr (GstVdpH264Dec * h264_dec, GstVdpH264Frame * h264_frame)
}
static VdpPictureInfoH264
-gst_vdp_h264_dec_fill_info (GstVdpH264Dec * h264_dec,
- GstVdpH264Frame * h264_frame)
+gst_vdp_h264_dec_fill_info (GstVdpH264Dec * h264_dec, GstH264Frame * h264_frame)
{
GstH264Slice *slice;
GstH264Picture *pic;
@@ -380,7 +379,7 @@ gst_vdp_h264_dec_fill_info (GstVdpH264Dec * h264_dec,
static VdpBitstreamBuffer *
gst_vdp_h264_dec_create_bitstream_buffers (GstVdpH264Dec * h264_dec,
- GstVdpH264Frame * h264_frame, guint * n_bufs)
+ GstH264Frame * h264_frame, guint * n_bufs)
{
VdpBitstreamBuffer *bufs;
@@ -434,7 +433,7 @@ gst_vdp_h264_dec_handle_frame (GstBaseVideoDecoder * base_video_decoder,
{
GstVdpH264Dec *h264_dec = GST_VDP_H264_DEC (base_video_decoder);
- GstVdpH264Frame *h264_frame;
+ GstH264Frame *h264_frame;
GstH264Slice *slice;
GstH264Picture *pic;
GstH264Sequence *seq;
@@ -451,7 +450,7 @@ gst_vdp_h264_dec_handle_frame (GstBaseVideoDecoder * base_video_decoder,
GST_DEBUG ("handle_frame");
- h264_frame = (GstVdpH264Frame *) frame;
+ h264_frame = (GstH264Frame *) frame;
slice = &h264_frame->slice_hdr;
pic = slice->picture;
@@ -726,7 +725,7 @@ gst_vdp_h264_dec_parse_data (GstBaseVideoDecoder * base_video_decoder,
gst_base_video_decoder_frame_start (base_video_decoder, buf);
}
- if (GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_VDP_H264_FRAME_GOT_PRIMARY)) {
+ if (GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_H264_FRAME_GOT_PRIMARY)) {
if (nal_unit.type == GST_NAL_SPS || nal_unit.type == GST_NAL_PPS ||
nal_unit.type == GST_NAL_SEI ||
(nal_unit.type >= 14 && nal_unit.type <= 18)) {
@@ -743,12 +742,12 @@ gst_vdp_h264_dec_parse_data (GstBaseVideoDecoder * base_video_decoder,
goto invalid_packet;
if (slice.redundant_pic_cnt == 0) {
- if (GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_VDP_H264_FRAME_GOT_PRIMARY)) {
+ if (GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_H264_FRAME_GOT_PRIMARY)) {
GstH264Slice *p_slice;
guint8 pic_order_cnt_type, p_pic_order_cnt_type;
gboolean finish_frame = FALSE;
- p_slice = &(GST_VDP_H264_FRAME_CAST (frame)->slice_hdr);
+ p_slice = &(GST_H264_FRAME_CAST (frame)->slice_hdr);
pic_order_cnt_type = slice.picture->sequence->pic_order_cnt_type;
p_pic_order_cnt_type = p_slice->picture->sequence->pic_order_cnt_type;
@@ -783,16 +782,16 @@ gst_vdp_h264_dec_parse_data (GstBaseVideoDecoder * base_video_decoder,
}
}
- if (!GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_VDP_H264_FRAME_GOT_PRIMARY)) {
+ if (!GST_VIDEO_FRAME_FLAG_IS_SET (frame, GST_H264_FRAME_GOT_PRIMARY)) {
if (GST_H264_IS_I_SLICE (slice.type)
|| GST_H264_IS_SI_SLICE (slice.type))
GST_VIDEO_FRAME_FLAG_SET (frame, GST_VIDEO_FRAME_FLAG_KEYFRAME);
- GST_VDP_H264_FRAME_CAST (frame)->slice_hdr = slice;
- GST_VIDEO_FRAME_FLAG_SET (frame, GST_VDP_H264_FRAME_GOT_PRIMARY);
+ GST_H264_FRAME_CAST (frame)->slice_hdr = slice;
+ GST_VIDEO_FRAME_FLAG_SET (frame, GST_H264_FRAME_GOT_PRIMARY);
}
}
- gst_vdp_h264_frame_add_slice ((GstVdpH264Frame *) frame, buf);
+ gst_h264_frame_add_slice ((GstH264Frame *) frame, buf);
}
if (nal_unit.type == GST_NAL_SPS) {
@@ -818,7 +817,7 @@ invalid_packet:
static GstVideoFrame *
gst_vdp_h264_dec_create_frame (GstBaseVideoDecoder * base_video_decoder)
{
- return GST_VIDEO_FRAME_CAST (gst_vdp_h264_frame_new ());
+ return GST_VIDEO_FRAME_CAST (gst_h264_frame_new ());
}
static gboolean