Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Fro me, QCamera failed to work when start it.
Forum Updated to NodeBB v4.3 + New Features

Fro me, QCamera failed to work when start it.

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 2.8k Views 2 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.
  • jerome_isAviableJ Offline
    jerome_isAviableJ Offline
    jerome_isAviable
    wrote on last edited by
    #1

    https://gist.github.com/jerome-diver/ef131edae3d1385386d558927d6a1663

    I try with QWidget, and on that code with QGraphicsView.
    So, with QWidget, no light goes On on camera... with QGraphicsView, camera goes on (light goes ON), but no images out of the QGraphicsView viewer. If i make code for record, there is a perfect recording from camera, the problem is only for show images from camera to screen directly (and then i think: THE VIEWFINDER member function of Qt-5.6).

    Also, what's strange is that from QCamera example (official code from Qt) same problem, but from QML code, that works (some people try it and have no problem... that is more strange again).
    I don't want to use QML code because i need to do more than just a little game for children. Then i want to use C++ code. But... also why QML code do the job and not QCamera ? I read post about something has been change and broken after qt-5.2.1 (regression ?).
    I not see what's wrong in my code (but i hope the problem is from my code... i follow the API, but i may be wrong), my camera is working with many different soft (i'm under linux), in fact, all of soft who use camera is working (so it is not my camera).

    Now 7 month of research and ask and no one really know.

    I'm searching for someone who know something (and really experimented) about Qt and QCamera use with C++. Maybe related links i failed to find too...
    Maybe Qt is not the good choice or need to use something more (i don't know, a plugin or something who can works)... i pain to find solution on that. I pain to find help too.

    Please, help.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi

      What OS are you running on ? What kind of camera is it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      jerome_isAviableJ 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi

        What OS are you running on ? What kind of camera is it ?

        jerome_isAviableJ Offline
        jerome_isAviableJ Offline
        jerome_isAviable
        wrote on last edited by
        #3

        @SGaist Hi,
        archlinux_x86_64 with gcc-multilib
        usb standard webcam recognized as "USB 2.0 Camera". Works with all other softs and with QML code.
        lsusb show this:
        Bus 003 Device 004: ID 0c45:6340 Microdia Camera

        if you want more detail from camera, tell me wich command line should give you more. But, do you have an idea about what this works with QML code and not with C++ code ?
        Also, remember that i give an important information to consider: "recording is working," so it is only the view from setViewFinder who seems to failed (maybe). When i try setViewfinder on a QWidgetVideo, nothing happens (same error on unvalid arguments), when i use (like in this code) for a QGraphicsView, error happens, but camera goes ON (light ON).
        All of this is strange: works partially with C++ code, but only for QGraphicsView,, work with QML... i can not understand what i do wrong.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Ok, then which version of GStreamer are you currently using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          jerome_isAviableJ 1 Reply Last reply
          0
          • SGaistS SGaist

            Ok, then which version of GStreamer are you currently using ?

            jerome_isAviableJ Offline
            jerome_isAviableJ Offline
            jerome_isAviable
            wrote on last edited by jerome_isAviable
            #5

            @SGaist GStreamer-1.0
            and because this happen from long time and i never find a solution, also no one from Qt devs find (i think in the storry, only me and you was searching), i'm trying to use Qt5-gstreamer Qt5-gstreamerUi instead. But... if you have an idea, welcome.

            1 Reply Last reply
            0
            • Ni.SumiN Offline
              Ni.SumiN Offline
              Ni.Sumi
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Can you post the error you are seeing when using the widget view finder ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                jerome_isAviableJ 1 Reply Last reply
                0
                • SGaistS SGaist

                  Can you post the error you are seeing when using the widget view finder ?

                  jerome_isAviableJ Offline
                  jerome_isAviableJ Offline
                  jerome_isAviable
                  wrote on last edited by
                  #8

                  @SGaist yes. There is no error shown on console or anywhere.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Enable the QtMultimedia logging category to see if there's anything giving you a hint.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    jerome_isAviableJ 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Enable the QtMultimedia logging category to see if there's anything giving you a hint.

                      jerome_isAviableJ Offline
                      jerome_isAviableJ Offline
                      jerome_isAviable
                      wrote on last edited by
                      #10

                      @SGaist, @pauldd find the solution (in an other post)
                      have to remove gstreamer-vaapi plugin and then works fine.

                      1 Reply Last reply
                      3

                      • Login

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