mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Add GstBaseVideoDecoder::set_sink_caps vfunc.
This commit is contained in:
parent
7dc185655f
commit
e665fb8702
2 changed files with 6 additions and 5 deletions
|
@ -175,6 +175,7 @@ gst_base_video_decoder_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
GstBaseVideoDecoderClass *base_video_decoder_class;
|
GstBaseVideoDecoderClass *base_video_decoder_class;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
const GValue *codec_data;
|
const GValue *codec_data;
|
||||||
|
gboolean res = TRUE;
|
||||||
|
|
||||||
base_video_decoder = GST_BASE_VIDEO_DECODER (gst_pad_get_parent (pad));
|
base_video_decoder = GST_BASE_VIDEO_DECODER (gst_pad_get_parent (pad));
|
||||||
base_video_decoder_class =
|
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);
|
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);
|
g_object_unref (base_video_decoder);
|
||||||
|
|
||||||
return TRUE;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -118,9 +118,7 @@ struct _GstBaseVideoDecoderClass
|
||||||
{
|
{
|
||||||
GstBaseVideoCodecClass base_video_codec_class;
|
GstBaseVideoCodecClass base_video_codec_class;
|
||||||
|
|
||||||
gboolean (*set_format) (GstBaseVideoDecoder *coder, GstVideoFormat,
|
gboolean (*set_sink_caps) (GstBaseVideoDecoder *coder, GstCaps *caps);
|
||||||
int width, int height, int fps_n, int fps_d,
|
|
||||||
int par_n, int par_d);
|
|
||||||
gboolean (*start) (GstBaseVideoDecoder *coder);
|
gboolean (*start) (GstBaseVideoDecoder *coder);
|
||||||
gboolean (*stop) (GstBaseVideoDecoder *coder);
|
gboolean (*stop) (GstBaseVideoDecoder *coder);
|
||||||
gboolean (*reset) (GstBaseVideoDecoder *coder);
|
gboolean (*reset) (GstBaseVideoDecoder *coder);
|
||||||
|
@ -131,7 +129,6 @@ struct _GstBaseVideoDecoderClass
|
||||||
GstFlowReturn (*handle_frame) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
|
GstFlowReturn (*handle_frame) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
|
||||||
GstFlowReturn (*shape_output) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
|
GstFlowReturn (*shape_output) (GstBaseVideoDecoder *coder, GstVideoFrame *frame);
|
||||||
GstCaps *(*get_caps) (GstBaseVideoDecoder *coder);
|
GstCaps *(*get_caps) (GstBaseVideoDecoder *coder);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_base_video_decoder_get_type (void);
|
GType gst_base_video_decoder_get_type (void);
|
||||||
|
|
Loading…
Reference in a new issue