Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT Mobility Camera Example on QWS
Forum Updated to NodeBB v4.3 + New Features

QT Mobility Camera Example on QWS

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kostya111
    wrote on last edited by
    #1

    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"

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brents1
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kostya111
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          brents1
          wrote on last edited by
          #4

          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'

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kostya111
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved