Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QCameraImageCapture在Windows下很多接口返回不正确

    Chinese
    4
    4
    3366
    Loading More Posts
    • 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.
    • L
      l4ever last edited by

      我最近在Windows 7上用QCameraImageCapture做一些摄像头视频抓图,基本上是基于QT5.2中自带的示例camera,但在设置一些属性时,发现很多接口都不支持。如imagecapture->supportedBufferFormats(),imagecapture->supportedImageCodecs(),imagecapture->supportedImageCodecs()这几个返回的列表都是空的,设置抓图到缓冲区imageCapture->setCaptureDestination(QCameraImageCapture::CaptureToFile)的调用也是失败的等。我想请问一下各位,是不是QCamera没有实现这些接口?我查看源代码,发现QCameraImageCaptureControl等控制类的实现都是纯虚函数,不知道这其中的原理是怎样的?谢谢解答!

      F 1 Reply Last reply Reply Quote 0
      • F
        Ferryun @l4ever last edited by

        @l4ever 是啊,最近我也碰到这些问题,你后来搞定了么,官方提供的这个Demo很不完善,camera->isCaptureModeSupported(QCamera::CaptureVideo)这个函数在windows下面工作不正常,一直返回false,苹果下面是true
        你最近还有搞camera方面的开发么,希望多交流

        1 Reply Last reply Reply Quote 0
        • jiancaiyang
          jiancaiyang last edited by

          看换成Qt 5.5 beta能否解决问题?

          我们自己的论坛:http://qtdream.com
          擅长三维角色仿真动画。

          1 Reply Last reply Reply Quote 0
          • Z
            zhxt last edited by

            1. Qt Multimedia功能在window平台主要有两个插件实现: DirectShow(Microsoft DirectShow API, )和 WMF (Windows Media Foundation)框架。
              这两个实现目前都不完善。 WMF没有提供Camera backend。 DirectShow的Camera backend仅有很少的基本功能实现。
              详见:
              http://doc.qt.io/qt-5/qtmultimedia-windows.html
              https://wiki.qt.io/Qt_Multimedia_Backends

            2. controls 是通过service的 requestControl() 来获取对应backend实现的。

            Qt Developer

            1 Reply Last reply Reply Quote 0
            • First post
              Last post