From 36082212d639f8ba332cea7884b897a92507dde9 Mon Sep 17 00:00:00 2001 From: "eojin.ham" Date: Thu, 11 Apr 2013 12:00:05 +0900 Subject: [PATCH] Don't rotate camera view during getUserMedia logic when running web app. [Title] Don't rotate camera view during getUserMedia logic when running web app. [Problem] The direciton of camera view is incorrect when rotate device during running 'Self Camera' app. (https://tizendev.org/bugs/browse/N_SE-33737) [Cause] Even if 'auto-rotate' is turned on 'Self Camera' doesn't rotate window. [Solution] getUserMedia don't know whether the web app will rotate window. So don't rotate camera view when running web app. If necessary the web app should implement it. Change-Id: I4c3db52ab6a3a1ee48d55249da72658e9c5ba887 --- .../gstreamer/tizen/WebKitCameraSourceGStreamerTizen.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/WebCore/platform/graphics/gstreamer/tizen/WebKitCameraSourceGStreamerTizen.cpp b/Source/WebCore/platform/graphics/gstreamer/tizen/WebKitCameraSourceGStreamerTizen.cpp index c47e6f8..285e9ca 100644 --- a/Source/WebCore/platform/graphics/gstreamer/tizen/WebKitCameraSourceGStreamerTizen.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/tizen/WebKitCameraSourceGStreamerTizen.cpp @@ -28,6 +28,10 @@ #include #include +#if ENABLE(TIZEN_EXTENSIBLE_API) +#include "TizenExtensibleAPI.h" +#endif + #define RADIAN_VALUE (57.2957) #define VCAPS "video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1" @@ -466,14 +470,18 @@ static void webKitCameraSrcUriHandlerInit(gpointer gIface, gpointer ifaceData) iface->set_uri = webKitCameraSrcSetUri; } -RotationManager::RotationManager(WebKitCameraSrc* src) : m_src(src) +RotationManager::RotationManager(WebKitCameraSrc* src) : m_src(src), m_handle(0) { - registerRotationCallback(); +#if ENABLE(TIZEN_EXTENSIBLE_API) + if (TizenExtensibleAPI::extensibleAPI().rotateCameraView()) + registerRotationCallback(); +#endif } RotationManager::~RotationManager() { - unregisterRotationCallback(); + if (m_handle) + unregisterRotationCallback(); } void RotationManager::onRotationChanged(unsigned long long timeStamp, sensor_data_accuracy_e accuracy, float x, float y, float z, void* userData) -- 2.7.4