mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
vdpau: remove gst_vdp_video_src_pad_set_caps
This commit is contained in:
parent
c15487961b
commit
6933d12a9b
3 changed files with 7 additions and 15 deletions
|
@ -176,8 +176,7 @@ gst_vdp_mpeg_dec_set_caps (GstPad * pad, GstCaps * caps)
|
||||||
GST_DEBUG_OBJECT (mpeg_dec, "Setting source caps to %" GST_PTR_FORMAT,
|
GST_DEBUG_OBJECT (mpeg_dec, "Setting source caps to %" GST_PTR_FORMAT,
|
||||||
src_caps);
|
src_caps);
|
||||||
|
|
||||||
res = gst_vdp_video_src_pad_set_caps
|
res = gst_pad_set_caps (mpeg_dec->src, src_caps);
|
||||||
(GST_VDP_VIDEO_SRC_PAD (mpeg_dec->src), src_caps);
|
|
||||||
gst_caps_unref (src_caps);
|
gst_caps_unref (src_caps);
|
||||||
if (!res)
|
if (!res)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -204,19 +204,12 @@ wrong_caps:
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
gst_vdp_video_src_pad_set_caps (GstVdpVideoSrcPad * vdp_pad, GstCaps * caps)
|
gst_vdp_video_src_pad_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
GstVdpVideoSrcPad *vdp_pad = GST_VDP_VIDEO_SRC_PAD (pad);
|
||||||
const GstStructure *structure;
|
const GstStructure *structure;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_VDP_VIDEO_SRC_PAD (vdp_pad), FALSE);
|
|
||||||
|
|
||||||
if (G_UNLIKELY (!caps))
|
|
||||||
return gst_pad_set_caps (GST_PAD (vdp_pad), caps);
|
|
||||||
|
|
||||||
if (G_UNLIKELY (!GST_IS_CAPS (caps) || !gst_caps_is_fixed (caps)))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
if (gst_structure_has_name (structure, "video/x-raw-yuv")) {
|
if (gst_structure_has_name (structure, "video/x-raw-yuv")) {
|
||||||
if (!gst_structure_get_int (structure, "width", &vdp_pad->width))
|
if (!gst_structure_get_int (structure, "width", &vdp_pad->width))
|
||||||
|
@ -237,7 +230,7 @@ gst_vdp_video_src_pad_set_caps (GstVdpVideoSrcPad * vdp_pad, GstCaps * caps)
|
||||||
} else
|
} else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return gst_pad_set_caps (GST_PAD (vdp_pad), caps);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstVdpDevice *
|
GstVdpDevice *
|
||||||
|
@ -346,6 +339,8 @@ gst_vdp_video_src_pad_init (GstVdpVideoSrcPad * vdp_pad)
|
||||||
|
|
||||||
gst_pad_set_getcaps_function (pad,
|
gst_pad_set_getcaps_function (pad,
|
||||||
GST_DEBUG_FUNCPTR (gst_vdp_video_src_pad_getcaps));
|
GST_DEBUG_FUNCPTR (gst_vdp_video_src_pad_getcaps));
|
||||||
|
gst_pad_set_setcaps_function (pad,
|
||||||
|
GST_DEBUG_FUNCPTR (gst_vdp_video_src_pad_setcaps));
|
||||||
gst_pad_set_activatepush_function (pad,
|
gst_pad_set_activatepush_function (pad,
|
||||||
GST_DEBUG_FUNCPTR (gst_vdp_video_src_pad_activate_push));
|
GST_DEBUG_FUNCPTR (gst_vdp_video_src_pad_activate_push));
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,6 @@ GstFlowReturn gst_vdp_video_src_pad_alloc_buffer (GstVdpVideoSrcPad *vdp_pad, Gs
|
||||||
|
|
||||||
GstVdpDevice *gst_vdp_video_src_pad_get_device (GstVdpVideoSrcPad *vdp_pad);
|
GstVdpDevice *gst_vdp_video_src_pad_get_device (GstVdpVideoSrcPad *vdp_pad);
|
||||||
|
|
||||||
gboolean gst_vdp_video_src_pad_set_caps (GstVdpVideoSrcPad *vdp_pad, GstCaps *caps);
|
|
||||||
|
|
||||||
GstCaps *gst_vdp_video_src_pad_get_template_caps ();
|
GstCaps *gst_vdp_video_src_pad_get_template_caps ();
|
||||||
|
|
||||||
GstVdpVideoSrcPad * gst_vdp_video_src_pad_new (GstPadTemplate * templ, const gchar * name);
|
GstVdpVideoSrcPad * gst_vdp_video_src_pad_new (GstPadTemplate * templ, const gchar * name);
|
||||||
|
|
Loading…
Reference in a new issue