diff options
Diffstat (limited to 'libvideoeditor/lvpp/PreviewPlayer.cpp')
-rwxr-xr-x | libvideoeditor/lvpp/PreviewPlayer.cpp | 76 |
1 files changed, 5 insertions, 71 deletions
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp index f94e2b3..b70ff4a 100755 --- a/libvideoeditor/lvpp/PreviewPlayer.cpp +++ b/libvideoeditor/lvpp/PreviewPlayer.cpp @@ -1632,78 +1632,12 @@ status_t PreviewPlayer::setMediaRenderingMode( /* reset boolean for each clip*/ mVideoResizedOrCropped = false; - switch(outputVideoSize) { - case M4VIDEOEDITING_kSQCIF: - mOutputVideoWidth = 128; - mOutputVideoHeight = 96; - break; - - case M4VIDEOEDITING_kQQVGA: - mOutputVideoWidth = 160; - mOutputVideoHeight = 120; - break; - - case M4VIDEOEDITING_kQCIF: - mOutputVideoWidth = 176; - mOutputVideoHeight = 144; - break; - - case M4VIDEOEDITING_kQVGA: - mOutputVideoWidth = 320; - mOutputVideoHeight = 240; - break; - - case M4VIDEOEDITING_kCIF: - mOutputVideoWidth = 352; - mOutputVideoHeight = 288; - break; - - case M4VIDEOEDITING_kVGA: - mOutputVideoWidth = 640; - mOutputVideoHeight = 480; - break; - - case M4VIDEOEDITING_kWVGA: - mOutputVideoWidth = 800; - mOutputVideoHeight = 480; - break; - - case M4VIDEOEDITING_kNTSC: - mOutputVideoWidth = 720; - mOutputVideoHeight = 480; - break; + status_t err = OK; + /* get the video width and height by resolution */ + err = getVideoSizeByResolution(outputVideoSize, + &mOutputVideoWidth, &mOutputVideoHeight); - case M4VIDEOEDITING_k640_360: - mOutputVideoWidth = 640; - mOutputVideoHeight = 360; - break; - - case M4VIDEOEDITING_k854_480: - mOutputVideoWidth = 854; - mOutputVideoHeight = 480; - break; - - case M4VIDEOEDITING_kHD1280: - mOutputVideoWidth = 1280; - mOutputVideoHeight = 720; - break; - - case M4VIDEOEDITING_kHD1080: - mOutputVideoWidth = 1080; - mOutputVideoHeight = 720; - break; - - case M4VIDEOEDITING_kHD960: - mOutputVideoWidth = 960; - mOutputVideoHeight = 720; - break; - - default: - LOGE("unsupported output video size set"); - return BAD_VALUE; - } - - return OK; + return err; } M4OSA_ERR PreviewPlayer::doMediaRendering() { |