Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0864615 authored by Byeongjo Park's avatar Byeongjo Park Committed by Lajos Molnar
Browse files

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: default avatarByeongjo Park <bjo.park@samsung.com>
parent 44aff3af
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1970,10 +1970,6 @@ status_t StagefrightRecorder::setupVideoEncoder(
        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 @@ status_t StagefrightRecorder::setupVideoEncoder(
        }
    }

    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);