QT Mobility Camera Example on QWS



  • I tried to execute Camera example from qt Mobility on arm-based platform with qt-embedded. I use QWS as window system. But when I run program, there appears message "not compatible codecs and container format", then another message "Failed to build media capture pipeline" and also there is text on stderr:
    "
    (<unknown>:7557): GStreamer-WARNING **: Element video-preview-bin is not in bin media-capture-pipeline

    (<unknown>:7557): GStreamer-WARNING **: Element video-preview-queue is not in bin media-capture-pipeline

    (<unknown>:7557): GStreamer-WARNING **: Element video-preview-tee is not in bin media-capture-pipeline".
    Example works fine on my Desktop computer.
    I use Qt 4.7.3 and the latest snapshot of Qt Mobility from "official gitorious source tree":http://qt.gitorious.org/qt-mobility/.
    The camera is found by the kernel. There's dmesg log:
    "[ 1616.393951] usb 2-2.3: new high speed USB device using ehci-omap and address 7
    [ 1616.550567] usb 2-2.3: New USB device found, idVendor=0c45, idProduct=62e0
    [ 1616.557647] usb 2-2.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
    [ 1616.565093] usb 2-2.3: Product: USB 2.0 Camera
    [ 1616.569641] usb 2-2.3: Manufacturer: Sonix Technology Co., Ltd.
    [ 1616.578735] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:62e0)
    [ 1616.591430] input: USB 2.0 Camera as /devices/platform/ehci-omap.0/usb2/2-2/2-2.3/2-2.3:1.0/input/input6"



  • Did you solve this? I have the same problem. Thanks!



  • You have to install gstreamer libraries and mediaservice plugins for Qt. But qt Mobility very slow. I use instead QtGStreamer and build gstreamer pipeline manually.



  • Can you explain a little more on how you build gstreamer pipeline manually? Did you build the mediaservice plugins, or were they installed with opkg/apt-get?

    I ended up copying some of the mediaservice plugins from my OE build, but I still get the following errors:

    GStreamer-WARNING **: Element 'video-preview-bin' is not in bin 'media-capture-pipeline'

    GStreamer-WARNING **: Element 'video-preview-queue' is not in bin 'media-capture-pipeline'

    GStreamer-WARNING **: Element 'video-preview-tee' is not in bin 'media-capture-pipeline'



  • bq. I ended up copying some of the mediaservice plugins from my OE build, but I still get the following errors

    Do you install gstreamer libraries?

    bq. Can you explain a little more on how you build gstreamer pipeline manually?

    There's my code to build gstreamer pipeline with QtGStreamer:
    @bool makeTestPipeline(QGraphicsView *view)
    {
    m_surface = new QGst::Ui::GraphicsVideoSurface(view);
    if (!m_surface)
    {
    qCritical() << func << "Can't create surface.";
    return false;
    }

    m_pipeline = QGst::Pipeline::create();
    
    m_src = QGst::ElementFactory::make("videotestsrc");
    

    // m_testSrc->setProperty("pattern", 1);

    // m_src = QGst::ElementFactory::make("v4l2src");
    // m_src->setProperty("device", "/dev/video0");

    m_convcolor = QGst::ElementFactory::make("ffmpegcolorspace");
    
    m_videoSink = m_surface->videoSink();
    
    if (m_pipeline && m_src && m_convcolor && m_videoSink)
    {
        m_pipeline->add(m_src, m_convcolor, m_videoSink);
        m_src->link(m_convcolor);
        m_convcolor->link(m_videoSink,
                    QGst::Caps::fromString("video/x-raw-rgb,"
                                           "framerate=(fraction)20/1,"
                                           "width=320,height=240"));
    
        return true; // successfully initiated
    }
    else
        return false; // something wrong
    

    }@

    @http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/index.html@ - QtGStreamer API Reference


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.