mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +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;
|
||||
}
|
||||
|
||||
if (filter->uploaded_buffer) {
|
||||
gst_buffer_unref (filter->uploaded_buffer);
|
||||
filter->uploaded_buffer = NULL;
|
||||
}
|
||||
|
||||
if (filter->context) {
|
||||
if (filter_class->onReset)
|
||||
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);
|
||||
|
||||
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;
|
||||
|
||||
to_download |= !gst_is_gl_memory (gst_buffer_peek_memory (outbuf, 0));
|
||||
|
|
|
@ -77,6 +77,8 @@ struct _GstGLFilter
|
|||
GstGLUpload *upload;
|
||||
GstGLDownload *download;
|
||||
|
||||
GstBuffer *uploaded_buffer;
|
||||
|
||||
/* <private> */
|
||||
GLuint in_tex_id;
|
||||
GLuint out_tex_id;
|
||||
|
|
Loading…
Reference in a new issue