fix for issue 4142219
Don't hard code platform-specific limitations
engine part.

Change-Id: Ibc8a539e5bbac738f60ef935670a333b7017e20e
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 @@
     /* reset boolean for each clip*/
     mVideoResizedOrCropped = false;
 
-    switch(outputVideoSize) {
-        case M4VIDEOEDITING_kSQCIF:
-            mOutputVideoWidth = 128;
-            mOutputVideoHeight = 96;
-            break;
+    status_t err = OK;
+    /* get the video width and height by resolution */
+    err = getVideoSizeByResolution(outputVideoSize,
+              &mOutputVideoWidth, &mOutputVideoHeight);
 
-        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;
-
-        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() {