Add GstBaseVideoDecoder::set_sink_caps vfunc.

This commit is contained in:
Alessandro Decina 2009-10-02 14:25:50 +02:00
parent 7dc185655f
commit e665fb8702
2 changed files with 6 additions and 5 deletions

View file

@ -175,6 +175,7 @@ gst_base_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
GstBaseVideoDecoderClass *base_video_decoder_class;
GstStructure *structure;
const GValue *codec_data;
gboolean res = TRUE;
base_video_decoder = GST_BASE_VIDEO_DECODER (gst_pad_get_parent (pad));
base_video_decoder_class =
@ -194,9 +195,12 @@ gst_base_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
base_video_decoder->codec_data = gst_value_get_buffer (codec_data);
}
if (base_video_decoder_class->set_sink_caps)
res = base_video_decoder_class->set_sink_caps (base_video_decoder, caps);
g_object_unref (base_video_decoder);
return TRUE;
return res;
}
static void

View file

@ -118,9 +118,7 @@ struct _GstBaseVideoDecoderClass
{
GstBaseVideoCodecClass base_video_codec_class;
gboolean (*set_format) (GstBaseVideoDecoder *coder, GstVideoFormat,
int width, int height, int fps_n, int fps_d,
int par_n, int par_d);
gboolean (*set_sink_caps) (GstBaseVideoDecoder *coder, GstCaps *caps);
gboolean (*start) (GstBaseVideoDecoder *coder);
gboolean (*stop) (GstBaseVideoDecoder *coder);
gboolean (*reset) (GstBaseVideoDecoder *coder);
@ -131,7 +129,6 @@ struct _GstBaseVideoDecoderClass
GstFlowReturn (*handle_frame) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
GstFlowReturn (*shape_output) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
GstCaps *(*get_caps) (GstBaseVideoDecoder *coder);
};
GType gst_base_video_decoder_get_type (void);