Commit ce561913 authored by Matthew Waters's avatar Matthew Waters 🐨

gl/download: update to be similar to the glupload semantics

parent b0a1e1f1
......@@ -847,9 +847,8 @@ gst_gl_display_get_type
<TITLE>GstGLDownload</TITLE>
GstGLDownload
gst_gl_download_new
gst_gl_download_init_format
gst_gl_download_set_format
gst_gl_download_perform_with_data
gst_gl_download_perform_with_memory
<SUBSECTION Standard>
GST_GL_DOWNLOAD
GST_GL_DOWNLOAD_CAST
......
......@@ -494,19 +494,10 @@ gst_gl_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
}
out_tex = src->out_tex_id;
if (!src->download) {
if (!src->download)
src->download = gst_gl_download_new (src->context);
if (!gst_gl_download_init_format (src->download,
GST_VIDEO_FRAME_FORMAT (&out_frame),
GST_VIDEO_FRAME_WIDTH (&out_frame),
GST_VIDEO_FRAME_HEIGHT (&out_frame))) {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
("%s", "Failed to init download format"), (NULL));
return FALSE;
}
}
gst_gl_download_set_format (src->download, &out_frame.info);
out_gl_wrapped = TRUE;
}
......
This diff is collapsed.
......@@ -54,12 +54,11 @@ struct _GstGLDownload
/* output data */
GstVideoInfo info;
gpointer data[GST_VIDEO_MAX_PLANES];
gboolean initted;
/* used for the conversion */
GLuint in_texture;
GstGLMemory * out_texture[GST_VIDEO_MAX_PLANES];
GstGLMemory * in_tex[GST_VIDEO_MAX_PLANES];
GstGLMemory * out_tex[GST_VIDEO_MAX_PLANES];
GstGLDownloadPrivate *priv;
......@@ -79,10 +78,8 @@ struct _GstGLDownloadClass
GstGLDownload * gst_gl_download_new (GstGLContext * context);
gboolean gst_gl_download_init_format (GstGLDownload * download, GstVideoFormat v_format,
guint out_width, guint out_height);
void gst_gl_download_set_format (GstGLDownload * download, GstVideoInfo * out_info);
gboolean gst_gl_download_perform_with_memory (GstGLDownload * download, GstGLMemory * gl_mem);
gboolean gst_gl_download_perform_with_data (GstGLDownload * download, GLuint texture_id,
gpointer data[GST_VIDEO_MAX_PLANES]);
......
......@@ -1111,19 +1111,10 @@ gst_gl_filter_filter_texture (GstGLFilter * filter, GstBuffer * inbuf,
GST_LOG ("Output Buffer does not contain correct memory, "
"attempting to wrap for download");
if (!filter->download) {
if (!filter->download)
filter->download = gst_gl_download_new (filter->context);
if (!gst_gl_download_init_format (filter->download,
GST_VIDEO_FRAME_FORMAT (&out_frame),
GST_VIDEO_FRAME_WIDTH (&out_frame),
GST_VIDEO_FRAME_HEIGHT (&out_frame))) {
GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND,
("%s", "Failed to init download format"), (NULL));
ret = FALSE;
goto error;
}
}
gst_gl_download_set_format (filter->download, &out_frame.info);
out_tex = filter->out_tex_id;
}
......
......@@ -1638,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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment