VT: Some parameters not provided to encoder if source is surface.

[Problem] Encoded video rotated 270 degrees after apply camera api2.
[Cause] encoding-rotation feature was applied only if
  source type was camera.
[Solution] provides VT specific parameters regardless source type.

Bug: 148889911
Bug: 165061754
Merged-in: Ic777e8252f373a92fb5595750cb4a899135b29a2
Change-Id: Ic777e8252f373a92fb5595750cb4a899135b29a2
Signed-off-by: Byeongjo Park <bjo.park@samsung.com>
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index f6a3728..5d7ce06 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -1970,10 +1970,6 @@
         format->setInt32("stride", stride);
         format->setInt32("slice-height", sliceHeight);
         format->setInt32("color-format", colorFormat);
-        if (mOutputFormat == OUTPUT_FORMAT_RTP_AVP) {
-            // This indicates that a raw image provided to encoder needs to be rotated.
-            format->setInt32("rotation-degrees", mRotationDegrees);
-        }
     } else {
         format->setInt32("width", mVideoWidth);
         format->setInt32("height", mVideoHeight);
@@ -1991,6 +1987,11 @@
         }
     }
 
+    if (mOutputFormat == OUTPUT_FORMAT_RTP_AVP) {
+        // This indicates that a raw image provided to encoder needs to be rotated.
+        format->setInt32("rotation-degrees", mRotationDegrees);
+    }
+
     format->setInt32("bitrate", mVideoBitRate);
     format->setInt32("bitrate-mode", mVideoBitRateMode);
     format->setInt32("frame-rate", mFrameRate);