diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-02-07 14:20:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-04 17:53:18 +0100 |
commit | 9a55f5ce5746fa1df6daa62a7111cb2d5ff5138d (patch) | |
tree | beb13b03600a530a6820017dafa33cb0af364c6f /src/plugins/avfoundation/camera/avfcamerainfocontrol.mm | |
parent | 70415c3d9752e357e8d49633cdd8e82d3519e59b (diff) | |
download | qtmultimedia-9a55f5ce5746fa1df6daa62a7111cb2d5ff5138d.tar.gz |
AVFoundation: implement QCameraInfoControl.
Change-Id: I05f3daa5c4acb90e046e26d6d577ae40dfed0e30
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcamerainfocontrol.mm')
-rw-r--r-- | src/plugins/avfoundation/camera/avfcamerainfocontrol.mm | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/plugins/avfoundation/camera/avfcamerainfocontrol.mm b/src/plugins/avfoundation/camera/avfcamerainfocontrol.mm new file mode 100644 index 000000000..8ae908ada --- /dev/null +++ b/src/plugins/avfoundation/camera/avfcamerainfocontrol.mm @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "avfcamerainfocontrol.h" +#include "avfcamerasession.h" + +QT_BEGIN_NAMESPACE + +AVFCameraInfoControl::AVFCameraInfoControl(QObject *parent) + : QCameraInfoControl(parent) +{ +} + +QCamera::Position AVFCameraInfoControl::cameraPosition(const QString &deviceName) const +{ + return AVFCameraSession::cameraDeviceInfo(deviceName.toUtf8()).position; +} + +int AVFCameraInfoControl::cameraOrientation(const QString &deviceName) const +{ + return AVFCameraSession::cameraDeviceInfo(deviceName.toUtf8()).orientation; +} + +QT_END_NAMESPACE |