Rectangle clientRect = GetClientAreaBounds();
+ RecordingRotation recRotation = RECORDING_ROTATION_NONE;
+ VideoFrameExtractor extractor;
+ r = extractor.Construct(__pVideoPlayerPresentationModel->GetMediaPathName(), MEDIA_PIXEL_FORMAT_RGB565LE);
+ if (r == E_SUCCESS)
+ {
+ recRotation = extractor.GetRecordingRotation();
+ }
+
switch (mode)
{
case SCREEN_MODE_NORMAL:
{
Rectangle rect = Rectangle(X_NORMAL, Y_NORMAL, W_NORMAL, H_NORMAL);
+ if(recRotation == RECORDING_ROTATION_90 || recRotation == RECORDING_ROTATION_270)
+ {
+ rect.width = H_NORMAL;
+ rect.height = W_NORMAL;
+ }
+
if ((clientRect.width - rect.width) <= X_BASE)
{
rect.x = X_BASE;
rect.y = (clientRect.height - rect.height) / DIVIDE_BY_TWO;
}
- AppLogDebug("SCREEN_MODE_NORMAL : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
+ AppLogDebug("SCREEN_MODE_NORMAL : [%d][%d][%d][%d][rotation:%d]", rect.x, rect.y, rect.width, rect.height, recRotation);
if (destroyOverlay == true)
{
{
Rectangle rect = Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height);
- AppLogDebug("SCREEN_MODE_FULL : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
+ AppLogDebug("SCREEN_MODE_FULL : [%d][%d][%d][%d][rotation:%d]", rect.x, rect.y, rect.width, rect.height, recRotation);
if (destroyOverlay == true)
{
case SCREEN_MODE_FIT:
{
- Rectangle rect = __pVideoPlayerPresentationModel->GetVideoInfoN(
+ Rectangle videoRect = __pVideoPlayerPresentationModel->GetVideoInfoN(
__pVideoPlayerPresentationModel->GetMediaPathName());
+ Rectangle rect(0, 0, videoRect.width, videoRect.height);
+
+ if(recRotation == RECORDING_ROTATION_90 || recRotation == RECORDING_ROTATION_270)
+ {
+ rect.width = videoRect.height;
+ rect.height = videoRect.width;
+ }
+
if ((clientRect.width - rect.width) <= X_BASE)
{
rect.x = X_BASE;
rect.y = (clientRect.height - rect.height) / DIVIDE_BY_TWO;
}
- AppLogDebug("SCREEN_MODE_FIT : [%d][%d][%d][%d]", rect.x, rect.y, rect.width, rect.height);
+ AppLogDebug("SCREEN_MODE_FIT : [%d][%d][%d][%d][rotation:%d]", rect.x, rect.y, rect.width, rect.height, recRotation);
if (destroyOverlay == true)
{
__pAudioRouteManager = AudioRouteManager::GetInstance();
__pAudioRouteManager->SetAudioRouteEventListener(this);
- r = SetScreenMode(SCREEN_MODE_NORMAL, true);
- TryCatch(r == E_SUCCESS, , "SetScreenMode() failed:%s", GetErrorMessage(r));
-
__pVideoPlayerPresentationModel = VideoPlayerPresentationModel::GetInstance();
TryCatch(__pVideoPlayerPresentationModel != null, r = E_SYSTEM, "__pVideoPlayerPresentationModel is null");
+ r = SetScreenMode(SCREEN_MODE_NORMAL, true);
+ TryCatch(r == E_SUCCESS, , "SetScreenMode() failed:%s", GetErrorMessage(r));
+
__pVideoPlayerPresentationModel->SetOverlayPanel(__pOverlayPanel);
r = __pVideoPlayerPresentationModel->InitializePlayer();
void
VideoPlayerForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
{
- result r = E_FAILURE;
-
AppLogDebug("OnSceneActivatedN");
TryReturnVoid(__pVideoPlayerPresentationModel != null, "__pVideoPlayerPresentationModel is null");
- String totalTime;
-
CheckCallStatus();
CheckLowBatteryStatus();
- r = __pVideoPlayerPresentationModel->StartPlay();
- TryReturnVoid(r == E_SUCCESS, "__pVideoPlayerPresentationModel->StartPlay() failed:%s", GetErrorMessage(r));
-
- GetTotalTime(totalTime);
- AppLogDebug("totalTime [%ls]", totalTime.GetPointer());
-
- __pTotalTimeLabel->SetText(totalTime);
- __pTotalTimeLabel->Invalidate(true);
-
SetScreenModeButtonImage();
}