Usage of the qtglvideosink
pfarmer
flacone at gmx.de
Tue Mar 26 16:02:16 PDT 2013
Thank a lot for trying the code! And thanks a lot for the help!
Mandeep Sandhu wrote
> sink->setProperty("glcontext"...) call. I have a Ubuntu 12.10, 32-bit pc
> with QtGstreamer compiled.
> I've not used QtGstreamer this way, so can;t say anything immediately.
> This
> will need further investigation.
Well, i am using qtgtreamer from the repositories (version: 0.10.2-2ubuntu1)
with Kubunuu.
The sig fault is a bit irritating to me since its pretty similar to the
example given in
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html
Mandeep Sandhu wrote
> If using QtGstreamer, you don't have to create the
> qtvideosink/qtglvideosink element explicitly. The docs mention that one
> will be created for you internally.
>
> From the video surface class docs:
>
> "This class internally creates and uses either a "qtglvideosink" or a
> "qtvideosink" element. This element is created the first time it is
> requested and a reference is kept internally."
>
> So in case using "with QtGstreamer", the previous example that worked
> seems
> to be the right approach.
>
> HTH,
> -mandeep
The problem is that the video surface class can only be used in conjunction
with a QGraphicsScene. Since its not always desirable to use an QGraphics
environment I wanted to know how to use the QGst::Ui::VideoWidget class with
openGL acceleration. Because I left it it out so far: I can get the
QGst::Ui::VideoWidget class easily be run without openGL support:
qtgstvideowidget.pro:
QT += core gui testlib
TARGET = qtgstvideowidget
TEMPLATE = app
SOURCES += main.cpp
unix: CONFIG += link_pkgconfig
unix: PKGCONFIG += QtGStreamer-0.10 QtGStreamerUi-0.10
main.cpp:
#include <QGst/Init>
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
#include <QGst/Ui/VideoWidget>
#include <QApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QGst::init(&argc, &argv);
QGst::ElementPtr source = QGst::ElementFactory::make("videotestsrc");
QGst::ElementPtr sink = QGst::ElementFactory::make("qtvideosink");
QGst::Ui::VideoWidget* widget = new QGst::Ui::VideoWidget();
widget->setVideoSink(sink);
QGst::PipelinePtr pipeline = QGst::Pipeline::create();
pipeline->add(source);
pipeline->add(sink);
source->link(sink);
widget->show();
pipeline->setState(QGst::StatePlaying);
return app.exec();
}
The question remains: How to get openGL support within a
QGst::Ui::VideoWidget?
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Usage-of-the-qtglvideosink-tp4659243p4659277.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list