Answer the question
In order to leave comments, you need to log in
How to output video from GStreamer to QWidget?
Hello.
There is a working project on Qt, QWidgets. It is necessary to display the image from the GStreamer'a stream to the widget.
The setting is done as follows:
gst_init(nullptr, nullptr);
//source, sink, pipeline, описанные ниже - GstElement*
source = gst_element_factory_make("nvarguscamerasrc", "source");
sink = hst_element_factory_make("nv3dsink", "sink");
pipeline = gst_pipeline_new("pipeline");
gst_bin_add_many(GST_BIN(pipeline), source, sink, NULL);
gst_element_link(source, sink);
gst_element_set_state(pipeline, GST_STATE_READY);
//tmpwgt - QWidget*
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(sink), tmpwgt->winId());
gst_element_set_state(pipeline, GST_STATE_PLAYING);'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question