[Bug 781816] Red artifact on visualizing rtsp stream via gstreamer and qt5

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Apr 27 08:34:44 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=781816

--- Comment #2 from toonheyrman at hotmail.com ---
I don't know if it's a duplicate of the other thread.

Maybe for clarification a code snippet,

/* Creating elements for the pipeline */
_pipeline = QGst::Pipeline::create();
_pipeline_elements.insert("src", QGst::ElementFactory::make("videotestsrc"));
_pipeline_elements.insert("caps", QGst::ElementFactory::make("capsfilter"));
_pipeline_elements.insert("sink",
QGst::ElementFactory::make("qt5glvideosink")); // When changing this to
qt5videosink, the colors are good

/* Adding elements to the pipeline */
for (QMap<QString, QGst::ElementPtr>::const_iterator el_it =
_pipeline_elements.constBegin(); el_it != _pipeline_elements.constEnd();
++el_it){
    assert(el_it.value());
    _pipeline->add(el_it.value());
}

/* Linking pipeline together */
_pipeline_elements["src"]->link(_pipeline_elements["caps"]);
_pipeline_elements["caps"]->link(_pipeline_elements["sink"]);

/* Configuring the pipeline elements */
QGst::CapsPtr caps = QGst::Caps::fromString("video/x-raw, width=1280,
height=720, framerate=30/1");
_pipeline_elements["caps"]->setProperty("caps", caps);
_pipeline_elements["sink"]->setProperty("sync", false);
_pipeline_elements["sink"]->setProperty("max-buffers", 20);
_pipeline_elements["sink"]->setProperty("emit-signals", true);
_pipeline_elements["sink"]->setProperty("drop", true);

/* Initialize the scroll views */
_central_views = new QStackedWidget();
_widget_stream_hd = new QGst::Ui::VideoWidget();
_central_views->addWidget(_widget_stream_hd);

/* Creating the widgets and managing the layout of the UI */
_widget_central = new QWidget(); // Tried QOpenGLWidget too
_layout_hd_and_side_buttons = new QBoxLayout(QBoxLayout::LeftToRight,
_widget_central);
_layout_hd_and_side_buttons->addWidget(_central_views);

/* Starting the video stream */
_widget_stream_hd->setVideoSink(_pipeline_elements["sink"]);
QGst::State current_state;
_pipeline->getState(&current_state, NULL, 0);
if (current_state != QGst::StatePlaying) {
    _pipeline->setState(QGst::StatePlaying);
}


I hope this will help to descibe the problem.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list