mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
tests: update for recent glupload changes
GstGLUploadMeta object is now the GstVideoGLTextureUploadMeta provider.
This commit is contained in:
parent
738ebcaaba
commit
1f48a074be
1 changed files with 6 additions and 1 deletions
|
@ -301,6 +301,7 @@ GST_START_TEST (test_upload_meta_producer)
|
||||||
GstVideoInfo in_info;
|
GstVideoInfo in_info;
|
||||||
GstVideoGLTextureUploadMeta *gl_upload_meta;
|
GstVideoGLTextureUploadMeta *gl_upload_meta;
|
||||||
guint tex_ids[] = { 0, 0, 0, 0 };
|
guint tex_ids[] = { 0, 0, 0, 0 };
|
||||||
|
GstGLUploadMeta *upload_meta;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
gint i = 0;
|
gint i = 0;
|
||||||
|
|
||||||
|
@ -315,10 +316,13 @@ GST_START_TEST (test_upload_meta_producer)
|
||||||
gst_gl_context_gen_texture (context, &tex_ids[0], GST_VIDEO_FORMAT_RGBA,
|
gst_gl_context_gen_texture (context, &tex_ids[0], GST_VIDEO_FORMAT_RGBA,
|
||||||
WIDTH, HEIGHT);
|
WIDTH, HEIGHT);
|
||||||
|
|
||||||
|
upload_meta = gst_gl_upload_meta_new (context);
|
||||||
|
gst_gl_upload_meta_set_format (upload_meta, &in_info);
|
||||||
|
|
||||||
gst_gl_upload_set_format (upload, &in_info);
|
gst_gl_upload_set_format (upload, &in_info);
|
||||||
gst_buffer_add_video_meta_full (buffer, 0, GST_VIDEO_FORMAT_RGBA, WIDTH,
|
gst_buffer_add_video_meta_full (buffer, 0, GST_VIDEO_FORMAT_RGBA, WIDTH,
|
||||||
HEIGHT, 1, in_info.offset, in_info.stride);
|
HEIGHT, 1, in_info.offset, in_info.stride);
|
||||||
gst_gl_upload_add_video_gl_texture_upload_meta (upload, buffer);
|
gst_gl_upload_meta_add_to_buffer (upload_meta, buffer);
|
||||||
|
|
||||||
gl_upload_meta = gst_buffer_get_video_gl_texture_upload_meta (buffer);
|
gl_upload_meta = gst_buffer_get_video_gl_texture_upload_meta (buffer);
|
||||||
fail_if (gl_upload_meta == NULL, "Failed to add GstVideoGLTextureUploadMeta"
|
fail_if (gl_upload_meta == NULL, "Failed to add GstVideoGLTextureUploadMeta"
|
||||||
|
@ -337,6 +341,7 @@ GST_START_TEST (test_upload_meta_producer)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_object_unref (upload_meta);
|
||||||
gst_gl_context_del_texture (context, &tex_ids[0]);
|
gst_gl_context_del_texture (context, &tex_ids[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue