vdpau: remove unneeded gst_vdp_video_buffer_add_reference function

This commit is contained in:
Carl-Anton Ingmarsson 2009-10-02 01:04:02 +02:00
parent c621101faa
commit 325bd7aad2
3 changed files with 0 additions and 35 deletions

View file

@ -364,16 +364,6 @@ gst_vdp_mpeg_dec_decode (GstVdpMpegDec * mpeg_dec,
device = GST_VDP_VIDEO_BUFFER (outbuf)->device; device = GST_VDP_VIDEO_BUFFER (outbuf)->device;
if (info->forward_reference != VDP_INVALID_HANDLE &&
info->picture_coding_type != I_FRAME)
gst_vdp_video_buffer_add_reference (GST_VDP_VIDEO_BUFFER (outbuf),
GST_VDP_VIDEO_BUFFER (mpeg_dec->f_buffer));
if (info->backward_reference != VDP_INVALID_HANDLE
&& info->picture_coding_type == B_FRAME)
gst_vdp_video_buffer_add_reference (GST_VDP_VIDEO_BUFFER (outbuf),
GST_VDP_VIDEO_BUFFER (mpeg_dec->b_buffer));
GST_BUFFER_TIMESTAMP (outbuf) = timestamp; GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = mpeg_dec->duration; GST_BUFFER_DURATION (outbuf) = mpeg_dec->duration;
GST_BUFFER_OFFSET (outbuf) = mpeg_dec->frame_nr; GST_BUFFER_OFFSET (outbuf) = mpeg_dec->frame_nr;

View file

@ -24,18 +24,6 @@
#include "gstvdpvideobuffer.h" #include "gstvdpvideobuffer.h"
void
gst_vdp_video_buffer_add_reference (GstVdpVideoBuffer * buffer,
GstVdpVideoBuffer * buf)
{
g_assert (GST_IS_VDP_VIDEO_BUFFER (buffer));
g_assert (GST_IS_VDP_VIDEO_BUFFER (buf));
gst_buffer_ref (GST_BUFFER (buf));
buffer->refs = g_slist_prepend (buffer->refs, buf);
}
GstVdpVideoBuffer * GstVdpVideoBuffer *
gst_vdp_video_buffer_new (GstVdpDevice * device, VdpChromaType chroma_type, gst_vdp_video_buffer_new (GstVdpDevice * device, VdpChromaType chroma_type,
gint width, gint height) gint width, gint height)
@ -66,7 +54,6 @@ static GObjectClass *gst_vdp_video_buffer_parent_class;
static void static void
gst_vdp_video_buffer_finalize (GstVdpVideoBuffer * buffer) gst_vdp_video_buffer_finalize (GstVdpVideoBuffer * buffer)
{ {
GSList *iter;
GstVdpDevice *device; GstVdpDevice *device;
VdpStatus status; VdpStatus status;
@ -80,14 +67,6 @@ gst_vdp_video_buffer_finalize (GstVdpVideoBuffer * buffer)
g_object_unref (buffer->device); g_object_unref (buffer->device);
for (iter = buffer->refs; iter; iter = g_slist_next (iter)) {
GstBuffer *buf;
buf = (GstBuffer *) (iter->data);
gst_buffer_unref (buf);
}
g_slist_free (buffer->refs);
GST_MINI_OBJECT_CLASS (gst_vdp_video_buffer_parent_class)->finalize GST_MINI_OBJECT_CLASS (gst_vdp_video_buffer_parent_class)->finalize
(GST_MINI_OBJECT (buffer)); (GST_MINI_OBJECT (buffer));
} }
@ -97,8 +76,6 @@ gst_vdp_video_buffer_init (GstVdpVideoBuffer * buffer, gpointer g_class)
{ {
buffer->device = NULL; buffer->device = NULL;
buffer->surface = VDP_INVALID_HANDLE; buffer->surface = VDP_INVALID_HANDLE;
buffer->refs = NULL;
} }
static void static void

View file

@ -40,8 +40,6 @@ struct _GstVdpVideoBuffer {
GstVdpDevice *device; GstVdpDevice *device;
VdpVideoSurface surface; VdpVideoSurface surface;
GSList *refs;
}; };
typedef struct typedef struct