QWidget on top of gstreamer
Marco Trapanese
marcotrapanese at gmail.com
Sat Jun 1 08:29:04 PDT 2013
Il 31/05/2013 15:06, George Kiagiadakis ha scritto:
> Transparency is not going to work with XOverlay. Qt needs to be aware
> of the rendered content of all its sub-surfaces in order to composite
> them and with XOverlay this is not the case. You need to use
> qtglvideosink or qwidgetvideosink (from qt-gstreamer) instead.
Well, I've ended up with this code, placed in a QWidget with a
QGst::Ui::VideoWidget inheritance:
QGst::ElementPtr source =
QGst::ElementFactory::make("filesrc");
source->setProperty("location", "/home/marco/Video/video.mp4");
QGst::ElementPtr sink =
QGst::ElementFactory::make("qwidgetvideosink");
QGst::Ui::VideoWidget::setVideoSink(sink);
m_pipeline = QGst::Pipeline::create();
m_pipeline->add(source);
m_pipeline->add(sink);
source->link(sink);
QGst::BusPtr bus = m_pipeline->bus();
bus->addSignalWatch();
QGlib::connect(bus, "message", this, &Player::onBusMessage);
m_pipeline->setState(QGst::StatePlaying);
I get the error: "Failed to create a painter for the given format"
Again, changing the source to "videotestsrc" leads the video test to
show into the widget with the transparency enabled for any widget on top.
I searched for that error without find any doc about. What does that
mean? What I have to change in the pipeline?
Thanks!
Marco
More information about the gstreamer-devel
mailing list