zoukankan      html  css  js  c++  java
  • QCamera

    QCamera

    Header: #include <QCamera>
    qmake: QT += multimedia
    Inherits: QMediaObject

    Public Types

    class FrameRateRange
    enum CaptureMode { CaptureViewfinder, CaptureStillImage, CaptureVideo }
    flags CaptureModes
    enum Error { NoError, CameraError, InvalidRequestError, ServiceMissingError, NotSupportedFeatureError }
    enum LockChangeReason { UserRequest, LockAcquired, LockFailed, LockLost, LockTemporaryLost }
    enum LockStatus { Unlocked, Searching, Locked }
    enum LockType { NoLock, LockExposure, LockWhiteBalance, LockFocus }
    flags LockTypes
    enum Position { UnspecifiedPosition, BackFace, FrontFace }
    enum State { UnloadedState, LoadedState, ActiveState }
    enum Status { ActiveStatus, StartingStatus, StoppingStatus, StandbyStatus, ..., UnavailableStatus }
    Properties

    captureMode : QCamera::CaptureModes
    lockStatus : const QCamera::LockStatus
    state : const QCamera::State
    status : const QCamera::Status
    1 property inherited from QMediaObject
    1 property inherited from QObject
    Public Functions

    QCamera(QObject *parent = nullptr)
    QCamera(const QByteArray &deviceName, QObject *parent = nullptr)
    QCamera(const QCameraInfo &cameraInfo, QObject *parent = nullptr)
    QCamera(QCamera::Position position, QObject *parent = nullptr)
    virtual ~QCamera()
    QCamera::CaptureModes captureMode() const
    QCamera::Error error() const
    QString errorString() const
    QCameraExposure * exposure() const
    QCameraFocus * focus() const
    QCameraImageProcessing * imageProcessing() const
    bool isCaptureModeSupported(QCamera::CaptureModes mode) const
    QCamera::LockStatus lockStatus() const
    QCamera::LockStatus lockStatus(QCamera::LockType lockType) const
    QCamera::LockTypes requestedLocks() const
    void setViewfinder(QVideoWidget *viewfinder)
    void setViewfinder(QGraphicsVideoItem *viewfinder)
    void setViewfinder(QAbstractVideoSurface *surface)
    void setViewfinderSettings(const QCameraViewfinderSettings &settings)
    QCamera::State state() const
    QCamera::Status status() const
    QCamera::LockTypes supportedLocks() const
    QList<QCamera::FrameRateRange> supportedViewfinderFrameRateRanges(const QCameraViewfinderSettings &settings = QCameraViewfinderSettings()) const
    QList<QVideoFrame::PixelFormat> supportedViewfinderPixelFormats(const QCameraViewfinderSettings &settings = QCameraViewfinderSettings()) const
    QList<QSize> supportedViewfinderResolutions(const QCameraViewfinderSettings &settings = QCameraViewfinderSettings()) const
    QList<QCameraViewfinderSettings> supportedViewfinderSettings(const QCameraViewfinderSettings &settings = QCameraViewfinderSettings()) const
    QCameraViewfinderSettings viewfinderSettings() const
    Reimplemented Public Functions

    virtual QMultimedia::AvailabilityStatus availability() const override
    10 public functions inherited from QMediaObject
    34 public functions inherited from QObject
    Public Slots

    void load()
    void searchAndLock()
    void searchAndLock(QCamera::LockTypes locks)
    void setCaptureMode(QCamera::CaptureModes mode)
    void start()
    void stop()
    void unload()
    void unlock()
    void unlock(QCamera::LockTypes locks)
    1 public slot inherited from QObject
    Signals

    void captureModeChanged(QCamera::CaptureModes mode)
    void error(QCamera::Error value)
    void lockFailed()
    void lockStatusChanged(QCamera::LockStatus status, QCamera::LockChangeReason reason)
    void lockStatusChanged(QCamera::LockType lock, QCamera::LockStatus status, QCamera::LockChangeReason reason)
    void locked()
    void stateChanged(QCamera::State state)
    void statusChanged(QCamera::Status status)
    6 signals inherited from QMediaObject
    2 signals inherited from QObject
    Additional Inherited Members

    1 public variable inherited from QObject
    10 static public members inherited from QObject
    2 protected functions inherited from QMediaObject
    9 protected functions inherited from QObject
    2 protected variables inherited from QObject
    Detailed Description

    The QCamera class provides interface for system camera devices.

    QCamera can be used with QCameraViewfinder for viewfinder display, QMediaRecorder for video recording and QCameraImageCapture for image taking.

    You can use QCameraInfo to list available cameras and choose which one to use.

    QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
    foreach (const QCameraInfo &cameraInfo, cameras) {
        if (cameraInfo.deviceName() == "mycamera")
      { camera
    = new QCamera(cameraInfo); } }

    See the camera overview for more information.

    ################################

    QQ 3087438119
  • 相关阅读:
    linux查看公网ip的方法
    统计文件或文件夹个数
    python manage.py shell
    炒冷饭,对于数据库“删除”操作大家平时都是物理删除,还是逻辑删除啊?
    SQL表名,应该用表对应资源对象的复数形式还是单数形式
    git常用命令
    Django ORM中的模糊查询
    threading 学习笔记
    class类笔记整理
    函数笔记整理
  • 原文地址:https://www.cnblogs.com/herd/p/11156361.html
Copyright © 2011-2022 走看看