[gtk/matthiasc/color-profiles: 109/111] media: Use the new GL texture constructor
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/color-profiles: 109/111] media: Use the new GL texture constructor
- Date: Wed, 6 Oct 2021 06:20:01 +0000 (UTC)
commit be2aaae7a93fd311e943a0a90eba2f571209fb2e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 3 16:35:39 2021 -0400
media: Use the new GL texture constructor
Use GdkGLTextureFlags in the gstreamer backend
to tell gsk that the buffers are unpremultiplied,
non-linear sRGB.
modules/media/gtkgstsink.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/modules/media/gtkgstsink.c b/modules/media/gtkgstsink.c
index 72183278ba..a70f817464 100644
--- a/modules/media/gtkgstsink.c
+++ b/modules/media/gtkgstsink.c
@@ -292,12 +292,14 @@ gtk_gst_sink_texture_from_buffer (GtkGstSink *self,
gst_gl_sync_meta_wait (sync_meta, self->gst_context);
}
- texture = gdk_gl_texture_new (self->gdk_context,
- *(guint *) frame->data[0],
- frame->info.width,
- frame->info.height,
- (GDestroyNotify) video_frame_free,
- frame);
+ texture = gdk_gl_texture_new_with_color_profile (self->gdk_context,
+ *(guint *) frame->data[0],
+ frame->info.width,
+ frame->info.height,
+ 0, /* Neither premultiplied nor flipped */
+ gdk_color_profile_get_srgb (),
+ (GDestroyNotify) video_frame_free,
+ frame);
*pixel_aspect_ratio = ((double) frame->info.par_n) / ((double) frame->info.par_d);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]