plugin: Handle premultiplied alpha in RAW frames

Add support for premultiplied alpha flag detection when creating GdkMemoryTextures.
Also check if overlays have premultiplied alpha and if they do set this flag for
their video info, so it will be detected when creating a GdkMemoryTexture out of them.

Fixes performance issues with karaoke subtitles, as now GTK does not have to perform
unnecessary multiplication.
This commit is contained in:
Rafał Dzięgiel
2022-05-12 17:55:38 +02:00
parent ae531db2b7
commit f351982067
3 changed files with 22 additions and 11 deletions

View File

@@ -30,8 +30,6 @@ G_BEGIN_DECLS
gpointer gst_gtk_invoke_on_main (GThreadFunc func, gpointer data);
GdkMemoryFormat gst_video_format_to_gdk_memory_format (GstVideoFormat format);
GdkTexture * gst_video_frame_into_gdk_texture (GstVideoFrame *frame);
G_END_DECLS