Implementing webcam application using gtk4 and gstreamer

I am trying to implement a webcam application using gtk4 and gstreamer. I got a code but it is in gtk3 and in that code it is using “gtksink” element. I tried to modify the code into gtk4 using the same element, but I am not getting the output.

Is there any other process to implement the webcam application using gtk4. I am here using an usb camera.

Thank you in advance.

gtksink is for GTK3. You have to use gtk4paintablesink if you’re using GTK4.

There’s a Rust and Python example in the repository: video/gtk4/examples · main · GStreamer / gst-plugins-rs · GitLab

1 Like