[570/906] remove the requirement for VideoMeta to be present on non-GL buffers

This commit is contained in:
Matthew Waters 2012-09-04 22:50:00 +10:00
parent 9fb3e60387
commit 0f2f42e4e8
3 changed files with 6 additions and 35 deletions

View file

@ -375,22 +375,14 @@ gst_gl_download_transform (GstBaseTransform * trans, GstBuffer * inbuf,
GstBuffer * outbuf)
{
GstGLDownload *download;
GstVideoMeta *smeta, *dmeta;
GstGLMeta *gl_meta;
GstVideoFrame frame;
download = GST_GL_DOWNLOAD (trans);
smeta = gst_buffer_get_video_meta (inbuf);
gl_meta = gst_buffer_get_gl_meta (inbuf);
dmeta = gst_buffer_get_video_meta (outbuf);
if (!smeta || !gl_meta) {
GST_ERROR ("Input buffer does not have required GstVideoMeta or GstGLMeta");
goto error;
}
if (!dmeta) {
GST_ERROR ("Output buffer does not have required GstVideoMeta");
goto error;
if (!gl_meta) {
GST_WARNING ("Input buffer does not have required GstGLMeta");
}
if (!gst_video_frame_map (&frame, &download->out_info, outbuf, GST_MAP_WRITE)) {

View file

@ -564,10 +564,10 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf)
glimage_sink = GST_GLIMAGE_SINK (bsink);
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)))
goto no_gl_meta;
GST_WARNING ("Buffer %" GST_PTR_FORMAT " is missing required GstGLMeta");
if (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;
/* 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:
{
GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,

View file

@ -438,22 +438,13 @@ gst_gl_upload_transform (GstBaseTransform * trans, GstBuffer * inbuf,
GstBuffer * outbuf)
{
GstGLUpload *upload = GST_GL_UPLOAD (trans);
GstVideoMeta *smeta, *dmeta;
GstGLMeta *gl_meta;
GstVideoFrame frame;
smeta = gst_buffer_get_video_meta (inbuf);
dmeta = gst_buffer_get_video_meta (outbuf);
gl_meta = gst_buffer_get_gl_meta (outbuf);
if (!smeta) {
GST_ERROR ("Input buffer does not have required GstVideoMeta");
goto error;
}
if (!dmeta || !gl_meta) {
GST_ERROR
("Output buffer does not have required GstVideoMeta or GstGLMeta");
goto error;
if (!gl_meta) {
GST_WARNING ("Output buffer does not have required GstGLMeta");
}
if (!gst_video_frame_map (&frame, &upload->in_info, inbuf, GST_MAP_READ)) {