diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2015-02-12 08:04:11 -0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-02-18 15:44:42 +0000 |
commit | e5ffc6a876631bf27feee793734209271db82bd9 (patch) | |
tree | b8b8218bcdf0fedcf963d208f03e86e9afd41f3d | |
parent | 178c0401685a56541995ca1ac9b5f6a4b543626d (diff) | |
download | qtmultimedia-e5ffc6a876631bf27feee793734209271db82bd9.tar.gz |
Remove BlackBerry PlayBook support.
Change-Id: I21f9c21bd3badd30f3a989ce3412c9ad03f5f21d
Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
-rw-r--r-- | src/plugins/qnx/camera/bbcameraexposurecontrol.cpp | 6 | ||||
-rw-r--r-- | src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp | 13 | ||||
-rw-r--r-- | src/plugins/qnx/camera/bbcameraorientationhandler.cpp | 5 | ||||
-rw-r--r-- | src/plugins/qnx/camera/bbcamerasession.cpp | 15 | ||||
-rw-r--r-- | src/plugins/qnx/camera/bbcameraviewfindersettingscontrol.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qnx/camera/camera.pri | 5 | ||||
-rw-r--r-- | src/plugins/qnx/common/windowgrabber.cpp | 24 |
7 files changed, 6 insertions, 64 deletions
diff --git a/src/plugins/qnx/camera/bbcameraexposurecontrol.cpp b/src/plugins/qnx/camera/bbcameraexposurecontrol.cpp index 4ecaed2ba..bd747ef61 100644 --- a/src/plugins/qnx/camera/bbcameraexposurecontrol.cpp +++ b/src/plugins/qnx/camera/bbcameraexposurecontrol.cpp @@ -131,7 +131,6 @@ QVariant BbCameraExposureControl::requestedValue(ExposureParameter parameter) co QVariant BbCameraExposureControl::actualValue(ExposureParameter parameter) const { -#ifndef Q_OS_BLACKBERRY_TABLET if (parameter != QCameraExposureControl::ExposureMode) // no other parameter supported by BB10 API at the moment return QVariantList(); @@ -161,11 +160,10 @@ QVariant BbCameraExposureControl::actualValue(ExposureParameter parameter) const case CAMERA_SCENE_NIGHT: return QVariant::fromValue(QCameraExposure::ExposureNight); default: - return QVariant(); + break; } -#else + return QVariant(); -#endif } bool BbCameraExposureControl::setValue(ExposureParameter parameter, const QVariant& value) diff --git a/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp b/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp index f5c04c21b..b8f4cf4e7 100644 --- a/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp +++ b/src/plugins/qnx/camera/bbcameramediarecordercontrol.cpp @@ -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 diff --git a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp index 110df73f2..e3345f6ab 100644 --- a/src/plugins/qnx/camera/bbcameraorientationhandler.cpp +++ b/src/plugins/qnx/camera/bbcameraorientationhandler.cpp @@ -63,11 +63,9 @@ BbCameraOrientationHandler::BbCameraOrientationHandler(QObject *parent) BbCameraOrientationHandler::~BbCameraOrientationHandler() { -#ifndef Q_OS_BLACKBERRY_TABLET const int result = orientation_stop_events(0); if (result == BPS_FAILURE) qWarning() << "Unable to unregister for orientation change events"; -#endif QCoreApplication::eventDispatcher()->removeNativeEventFilter(this); } @@ -80,10 +78,9 @@ bool BbCameraOrientationHandler::nativeEventFilter(const QByteArray&, void *mess const int angle = orientation_event_get_angle(event); if (angle != m_orientation) { -#ifndef Q_OS_BLACKBERRY_TABLET if (angle == 180) // The screen does not rotate at 180 degrees return false; -#endif + m_orientation = angle; emit orientationChanged(m_orientation); } diff --git a/src/plugins/qnx/camera/bbcamerasession.cpp b/src/plugins/qnx/camera/bbcamerasession.cpp index d10f4e836..66243187b 100644 --- a/src/plugins/qnx/camera/bbcamerasession.cpp +++ b/src/plugins/qnx/camera/bbcamerasession.cpp @@ -83,7 +83,6 @@ static QString errorToString(camera_error_t error) return QLatin1String("Callback registration failed"); case CAMERA_EMICINUSE: return QLatin1String("Microphone in use already"); -#ifndef Q_OS_BLACKBERRY_TABLET case CAMERA_ENODATA: return QLatin1String("Data does not exist"); case CAMERA_EBUSY: @@ -98,7 +97,6 @@ static QString errorToString(camera_error_t error) return QLatin1String("3A have been locked"); // case CAMERA_EVIEWFINDERFROZEN: // not yet available in 10.2 NDK // return QLatin1String("Freeze flag set"); -#endif default: return QLatin1String("Unknown error"); } @@ -561,7 +559,6 @@ void BbCameraSession::applyVideoSettings() const QSize resolution = m_videoEncoderSettings.resolution(); -#ifndef Q_OS_BLACKBERRY_TABLET QString videoCodec = m_videoEncoderSettings.codec(); if (videoCodec.isEmpty()) videoCodec = QLatin1String("h264"); @@ -599,11 +596,6 @@ void BbCameraSession::applyVideoSettings() CAMERA_IMGPROP_ROTATION, rotationAngle, CAMERA_IMGPROP_VIDEOCODEC, cameraVideoCodec, CAMERA_IMGPROP_AUDIOCODEC, cameraAudioCodec); -#else - result = camera_set_video_property(m_handle, - CAMERA_IMGPROP_WIDTH, resolution.width(), - CAMERA_IMGPROP_HEIGHT, resolution.height()); -#endif if (result != CAMERA_EOK) { qWarning() << "Unable to apply video settings:" << result; @@ -864,13 +856,10 @@ static void viewFinderStatusCallback(camera_handle_t handle, camera_devstatus_t BbCameraSession *session = static_cast<BbCameraSession*>(context); QMetaObject::invokeMethod(session, "focusStatusChanged", Qt::QueuedConnection, Q_ARG(int, value)); return; - } -#ifndef Q_OS_BLACKBERRY_TABLET - else if (status == CAMERA_STATUS_POWERUP) { + } else if (status == CAMERA_STATUS_POWERUP) { BbCameraSession *session = static_cast<BbCameraSession*>(context); QMetaObject::invokeMethod(session, "handleCameraPowerUp", Qt::QueuedConnection); } -#endif } bool BbCameraSession::startViewFinder() @@ -1027,7 +1016,6 @@ static void videoRecordingStatusCallback(camera_handle_t handle, camera_devstatu Q_UNUSED(handle) Q_UNUSED(value) -#ifndef Q_OS_BLACKBERRY_TABLET if (status == CAMERA_STATUS_VIDEO_PAUSE) { BbCameraSession *session = static_cast<BbCameraSession*>(context); QMetaObject::invokeMethod(session, "handleVideoRecordingPaused", Qt::QueuedConnection); @@ -1035,7 +1023,6 @@ static void videoRecordingStatusCallback(camera_handle_t handle, camera_devstatu BbCameraSession *session = static_cast<BbCameraSession*>(context); QMetaObject::invokeMethod(session, "handleVideoRecordingResumed", Qt::QueuedConnection); } -#endif } bool BbCameraSession::startVideoRecording() diff --git a/src/plugins/qnx/camera/bbcameraviewfindersettingscontrol.cpp b/src/plugins/qnx/camera/bbcameraviewfindersettingscontrol.cpp index 6aa18464b..678e02549 100644 --- a/src/plugins/qnx/camera/bbcameraviewfindersettingscontrol.cpp +++ b/src/plugins/qnx/camera/bbcameraviewfindersettingscontrol.cpp @@ -148,12 +148,10 @@ QVariant BbCameraViewfinderSettingsControl::viewfinderParameter(ViewfinderParame return QVideoFrame::Format_Invalid; case CAMERA_FRAMETYPE_CBYCRY: return QVideoFrame::Format_Invalid; -#ifndef Q_OS_BLACKBERRY_TABLET case CAMERA_FRAMETYPE_COMPRESSEDVIDEO: return QVideoFrame::Format_Invalid; case CAMERA_FRAMETYPE_COMPRESSEDAUDIO: return QVideoFrame::Format_Invalid; -#endif default: return QVideoFrame::Format_Invalid; } diff --git a/src/plugins/qnx/camera/camera.pri b/src/plugins/qnx/camera/camera.pri index 7e5fbeb34..886351862 100644 --- a/src/plugins/qnx/camera/camera.pri +++ b/src/plugins/qnx/camera/camera.pri @@ -48,8 +48,5 @@ SOURCES += \ $$PWD/bbvideodeviceselectorcontrol.cpp \ $$PWD/bbvideorenderercontrol.cpp -LIBS += -lcamapi +LIBS += -lcamapi -laudio_manager -!blackberry-playbook { - LIBS += -laudio_manager -} diff --git a/src/plugins/qnx/common/windowgrabber.cpp b/src/plugins/qnx/common/windowgrabber.cpp index b8b6b3220..51ce0dbf4 100644 --- a/src/plugins/qnx/common/windowgrabber.cpp +++ b/src/plugins/qnx/common/windowgrabber.cpp @@ -127,30 +127,6 @@ void WindowGrabber::start() int result = 0; -#ifdef Q_OS_BLACKBERRY_TABLET - - // HACK: On the Playbook, screen_read_window() will fail for invisible windows. - // To workaround this, make the window visible again, but set a global - // alpha of less than 255. The global alpha makes the window completely invisible - // (due to a bug?), but screen_read_window() will work again. - - errno = 0; - int val = 200; // anything less than 255 - result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val); - if (result != 0) { - qWarning() << "WindowGrabber: unable to set global alpha:" << strerror(errno); - return; - } - - errno = 0; - val = 1; - result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val); - if (result != 0) { - qWarning() << "WindowGrabber: unable to make window visible:" << strerror(errno); - return; - } -#endif - result = screen_create_context(&m_screenContext, SCREEN_APPLICATION_CONTEXT); if (result != 0) { qWarning() << "WindowGrabber: cannot create screen context:" << strerror(errno); |