diff options
Diffstat (limited to 'gst-libs/gst/gl/gstglmixer.c')
-rw-r--r-- | gst-libs/gst/gl/gstglmixer.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/gst-libs/gst/gl/gstglmixer.c b/gst-libs/gst/gl/gstglmixer.c index 238f4e10..89b68db8 100644 --- a/gst-libs/gst/gl/gstglmixer.c +++ b/gst-libs/gst/gl/gstglmixer.c @@ -533,19 +533,25 @@ enum static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS) "; " + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + "RGBA") "; " GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, - "RGBA")) + "RGBA") + "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)) ); static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS) "; " + GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES + (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, + "RGBA") "; " GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, - "RGBA")) + "RGBA") + "; " GST_VIDEO_CAPS_MAKE (GST_GL_COLOR_CONVERT_FORMATS)) ); static gboolean gst_gl_mixer_src_query (GstPad * pad, GstObject * object, @@ -1632,19 +1638,10 @@ gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf) out_tex = mix->out_tex_id;; - if (!mix->download) { + if (!mix->download) mix->download = gst_gl_download_new (mix->context); - if (!gst_gl_download_init_format (mix->download, - GST_VIDEO_FRAME_FORMAT (&out_frame), - GST_VIDEO_FRAME_WIDTH (&out_frame), - GST_VIDEO_FRAME_HEIGHT (&out_frame))) { - GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, - ("%s", "Failed to init upload format"), (NULL)); - res = FALSE; - goto out; - } - } + gst_gl_download_set_format (mix->download, &out_frame.info); out_gl_wrapped = TRUE; } @@ -1679,12 +1676,7 @@ gst_gl_mixer_process_textures (GstGLMixer * mix, GstBuffer * outbuf) if (!pad->upload) { pad->upload = gst_gl_upload_new (mix->context); - if (!gst_gl_upload_init_format (pad->upload, &pad->in_info)) { - GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s", - "Failed to init upload format"), (NULL)); - res = FALSE; - goto out; - } + gst_gl_upload_set_format (pad->upload, &pad->in_info); } if (!gst_gl_upload_perform_with_buffer (pad->upload, mixcol->buffer, |