I got a sample video application in gtk using gstreamer from their official site (https://gstreamer.freedesktop.org/documentation/tutorials/basic/toolkit-integration.html?gi-language=c). When I maximize the window, video didn't get resized. When I tried the same using d3dvideosink, video get resized but it was transparent.Attached screenshot for both. Any suggestion is really appreciated.
Asked
Active
Viewed 152 times
1 Answers
2
Finally I resolved issue by upgrading gstreamer plugin in GTK and use configure event Use d3d11videosink for video streaming which allow "gst_video_overlay_set_render_rectangle" api in the latest release(1.20.0). d3dvideosink has transparency issue so do not use that. Add a configure event for video window(Gtk::DrawingArea). video_window->signal_configure_event().connect(sigc::mem_fun(this, &example::example_function),false); In configure event do the following
video_window(GdkEventConfigure *event) { gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(video_sink), 0, 0, event->width, event->height);
}
where "video_sink" is the GST_TYPE_VIDEO_OVERLAY for pipeline. Please ensure it is not null (need to null initial), else it leads to application crash.
This is for windows application.Please check this link for more details

Kavitha K T
- 119
- 8
-
You can accept your own answer if it solved your issue! It would help other users! – BobMorane Feb 21 '22 at 01:20