QT-gstreamer ERROR: failed to create painter for given format

sriraman sri_ravi04 at yahoo.com
Fri Sep 18 03:14:42 PDT 2015


Hi,
I have been trying to play video on QT widget on EGLFS platform, for this
purpose i am using QT-Gstreamer 1.2v. I have successfully build and
installed the QTGstreamer libraries.

I am able to show videos successfully in X11 system but the problem is there
when i use EGLFS platform.

I am using qt5videosink as the sink for my gstreamer pipeline.

And trying to display it with the following code. It works well with
videotestsrc but when i specify the filesrc as an mp4 file i get an error
message saying : ERROR: failed to create painter for given format.

Any help regarding this would be really helpful.

#include <QGst/Init>
#include <QGst/Pipeline>
#include <QGst/ElementFactory>
#include <QGst/Ui/VideoWidget>
#include <QApplication>
#include <QDebug>
#include <QGlib/Connect>

int main(int argc, char *argv[])
{
        QApplication app(argc, argv);
        QGst::init(&argc, &argv);

        //QGst::ElementPtr source =
QGst::ElementFactory::make("videotestsrc");
	QGst::ElementPtr source = QGst::ElementFactory::make("filesrc");
        source->setProperty("location","/home/root/mini.mp4");
	//add in a videoconvert
    	QGst::ElementPtr videoConvertElement =
QGst::ElementFactory::make("videoconvert");
   	
        QGst::ElementPtr sink = QGst::ElementFactory::make("qt5videosink");

        QGst::Ui::VideoWidget* widget = new QGst::Ui::VideoWidget();
	
        QGst::PipelinePtr pipeline = QGst::Pipeline::create();
        pipeline->add(source);
        pipeline->add(sink);
        if(source->link(sink) == false)
                qDebug("Link failed");
	pipeline->add(videoConvertElement);
        pipeline->setState(QGst::StatePlaying);
	widget->setVideoSink(sink);
        widget->show();

        return app.exec();
}


Board : imx6q
QT5.5 application
Platform : EGLFS
gstreamer version 1.4



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/QT-gstreamer-ERROR-failed-to-create-painter-for-given-format-tp4673708.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list