mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
[570/906] remove the requirement for VideoMeta to be present on non-GL buffers
This commit is contained in:
parent
9fb3e60387
commit
0f2f42e4e8
3 changed files with 6 additions and 35 deletions
|
@ -375,22 +375,14 @@ gst_gl_download_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
GstBuffer * outbuf)
|
GstBuffer * outbuf)
|
||||||
{
|
{
|
||||||
GstGLDownload *download;
|
GstGLDownload *download;
|
||||||
GstVideoMeta *smeta, *dmeta;
|
|
||||||
GstGLMeta *gl_meta;
|
GstGLMeta *gl_meta;
|
||||||
GstVideoFrame frame;
|
GstVideoFrame frame;
|
||||||
|
|
||||||
download = GST_GL_DOWNLOAD (trans);
|
download = GST_GL_DOWNLOAD (trans);
|
||||||
smeta = gst_buffer_get_video_meta (inbuf);
|
|
||||||
gl_meta = gst_buffer_get_gl_meta (inbuf);
|
gl_meta = gst_buffer_get_gl_meta (inbuf);
|
||||||
dmeta = gst_buffer_get_video_meta (outbuf);
|
|
||||||
|
|
||||||
if (!smeta || !gl_meta) {
|
if (!gl_meta) {
|
||||||
GST_ERROR ("Input buffer does not have required GstVideoMeta or GstGLMeta");
|
GST_WARNING ("Input buffer does not have required GstGLMeta");
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
if (!dmeta) {
|
|
||||||
GST_ERROR ("Output buffer does not have required GstVideoMeta");
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_video_frame_map (&frame, &download->out_info, outbuf, GST_MAP_WRITE)) {
|
if (!gst_video_frame_map (&frame, &download->out_info, outbuf, GST_MAP_WRITE)) {
|
||||||
|
|
|
@ -564,10 +564,10 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
glimage_sink = GST_GLIMAGE_SINK (bsink);
|
glimage_sink = GST_GLIMAGE_SINK (bsink);
|
||||||
|
|
||||||
if (!(v_meta = gst_buffer_get_video_meta (buf)))
|
if (!(v_meta = gst_buffer_get_video_meta (buf)))
|
||||||
goto no_video_meta;
|
GST_WARNING ("Buffer %" GST_PTR_FORMAT " is missing GstVideoMeta");
|
||||||
|
|
||||||
if (!(gl_meta = gst_buffer_get_gl_meta (buf)))
|
if (!(gl_meta = gst_buffer_get_gl_meta (buf)))
|
||||||
goto no_gl_meta;
|
GST_WARNING ("Buffer %" GST_PTR_FORMAT " is missing required GstGLMeta");
|
||||||
|
|
||||||
if (glimage_sink->window_id != glimage_sink->new_window_id) {
|
if (glimage_sink->window_id != glimage_sink->new_window_id) {
|
||||||
glimage_sink->window_id = glimage_sink->new_window_id;
|
glimage_sink->window_id = glimage_sink->new_window_id;
|
||||||
|
@ -603,18 +603,6 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
no_video_meta:
|
|
||||||
{
|
|
||||||
GST_ERROR ("Buffer %" GST_PTR_FORMAT " is missing required GstVideoMeta");
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
no_gl_meta:
|
|
||||||
{
|
|
||||||
GST_ERROR ("Buffer %" GST_PTR_FORMAT " is missing required GstGLMeta");
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
redisplay_failed:
|
redisplay_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
|
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
|
||||||
|
|
|
@ -438,22 +438,13 @@ gst_gl_upload_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
GstBuffer * outbuf)
|
GstBuffer * outbuf)
|
||||||
{
|
{
|
||||||
GstGLUpload *upload = GST_GL_UPLOAD (trans);
|
GstGLUpload *upload = GST_GL_UPLOAD (trans);
|
||||||
GstVideoMeta *smeta, *dmeta;
|
|
||||||
GstGLMeta *gl_meta;
|
GstGLMeta *gl_meta;
|
||||||
GstVideoFrame frame;
|
GstVideoFrame frame;
|
||||||
|
|
||||||
smeta = gst_buffer_get_video_meta (inbuf);
|
|
||||||
dmeta = gst_buffer_get_video_meta (outbuf);
|
|
||||||
gl_meta = gst_buffer_get_gl_meta (outbuf);
|
gl_meta = gst_buffer_get_gl_meta (outbuf);
|
||||||
|
|
||||||
if (!smeta) {
|
if (!gl_meta) {
|
||||||
GST_ERROR ("Input buffer does not have required GstVideoMeta");
|
GST_WARNING ("Output buffer does not have required GstGLMeta");
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
if (!dmeta || !gl_meta) {
|
|
||||||
GST_ERROR
|
|
||||||
("Output buffer does not have required GstVideoMeta or GstGLMeta");
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_video_frame_map (&frame, &upload->in_info, inbuf, GST_MAP_READ)) {
|
if (!gst_video_frame_map (&frame, &upload->in_info, inbuf, GST_MAP_READ)) {
|
||||||
|
|
Loading…
Reference in a new issue