mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
glfilter: add uploaded_buffer field
This commit is contained in:
parent
22a1ec13b6
commit
6663967994
2 changed files with 14 additions and 1 deletions
|
@ -256,6 +256,11 @@ gst_gl_filter_reset (GstGLFilter * filter)
|
||||||
filter->download = NULL;
|
filter->download = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (filter->uploaded_buffer) {
|
||||||
|
gst_buffer_unref (filter->uploaded_buffer);
|
||||||
|
filter->uploaded_buffer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (filter->context) {
|
if (filter->context) {
|
||||||
if (filter_class->onReset)
|
if (filter_class->onReset)
|
||||||
filter_class->onReset (filter);
|
filter_class->onReset (filter);
|
||||||
|
@ -1183,7 +1188,13 @@ gst_gl_filter_filter_texture (GstGLFilter * filter, GstBuffer * inbuf,
|
||||||
|
|
||||||
filter_class = GST_GL_FILTER_GET_CLASS (filter);
|
filter_class = GST_GL_FILTER_GET_CLASS (filter);
|
||||||
|
|
||||||
if (!gst_gl_upload_perform_with_buffer (filter->upload, inbuf, &in_tex, NULL))
|
if (filter->uploaded_buffer) {
|
||||||
|
gst_buffer_unref (filter->uploaded_buffer);
|
||||||
|
filter->uploaded_buffer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gst_gl_upload_perform_with_buffer (filter->upload, inbuf, &in_tex,
|
||||||
|
&filter->uploaded_buffer))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (outbuf, 0));
|
to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (outbuf, 0));
|
||||||
|
|
|
@ -77,6 +77,8 @@ struct _GstGLFilter
|
||||||
GstGLUpload *upload;
|
GstGLUpload *upload;
|
||||||
GstGLDownload *download;
|
GstGLDownload *download;
|
||||||
|
|
||||||
|
GstBuffer *uploaded_buffer;
|
||||||
|
|
||||||
/* <private> */
|
/* <private> */
|
||||||
GLuint in_tex_id;
|
GLuint in_tex_id;
|
||||||
GLuint out_tex_id;
|
GLuint out_tex_id;
|
||||||
|
|
Loading…
Reference in a new issue