diff options
Diffstat (limited to 'src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp')
-rw-r--r-- | src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp b/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp index b5a8f4c11..b8f4cf4e7 100644 --- a/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp +++ b/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2013 Research In Motion -** Contact: http://www.qt-project.org/legal +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** 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. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** 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 +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -37,14 +37,11 @@ #include <QDebug> #include <QUrl> -#ifndef Q_OS_BLACKBERRY_TABLET #include <audio/audio_manager_device.h> #include <audio/audio_manager_volume.h> -#endif QT_BEGIN_NAMESPACE -#ifndef Q_OS_BLACKBERRY_TABLET static audio_manager_device_t currentAudioInputDevice() { audio_manager_device_t device = AUDIO_DEVICE_HEADSET; @@ -57,7 +54,6 @@ static audio_manager_device_t currentAudioInputDevice() return device; } -#endif BbCameraMediaRecorderControl::BbCameraMediaRecorderControl(BbCameraSession *session, QObject *parent) : QMediaRecorderControl(parent) @@ -99,13 +95,12 @@ bool BbCameraMediaRecorderControl::isMuted() const { bool muted = false; -#ifndef Q_OS_BLACKBERRY_TABLET const int result = audio_manager_get_input_mute(currentAudioInputDevice(), &muted); if (result != EOK) { emit const_cast<BbCameraMediaRecorderControl*>(this)->error(QMediaRecorder::ResourceError, tr("Unable to retrieve mute status")); return false; } -#endif + return muted; } @@ -113,13 +108,11 @@ qreal BbCameraMediaRecorderControl::volume() const { double level = 0.0; -#ifndef Q_OS_BLACKBERRY_TABLET const int result = audio_manager_get_input_level(currentAudioInputDevice(), &level); if (result != EOK) { emit const_cast<BbCameraMediaRecorderControl*>(this)->error(QMediaRecorder::ResourceError, tr("Unable to retrieve audio input volume")); return 0.0; } -#endif return (level / 100); } @@ -136,26 +129,22 @@ void BbCameraMediaRecorderControl::setState(QMediaRecorder::State state) void BbCameraMediaRecorderControl::setMuted(bool muted) { -#ifndef Q_OS_BLACKBERRY_TABLET const int result = audio_manager_set_input_mute(currentAudioInputDevice(), muted); if (result != EOK) { emit error(QMediaRecorder::ResourceError, tr("Unable to set mute status")); } else { emit mutedChanged(muted); } -#endif } void BbCameraMediaRecorderControl::setVolume(qreal volume) { -#ifndef Q_OS_BLACKBERRY_TABLET const int result = audio_manager_set_input_level(currentAudioInputDevice(), (volume * 100)); if (result != EOK) { emit error(QMediaRecorder::ResourceError, tr("Unable to set audio input volume")); } else { emit volumeChanged(volume); } -#endif } QT_END_NAMESPACE |