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

Commit 2219f720 authored by Biswarup Pal's avatar Biswarup Pal
Browse files

Remove hardcoded framerate from MediaTranscodeManager

Replace hardcoded framerate and use from MediaFormat in
MediaTranscodeManager.

Test: m
Bug: 176940364
Change-Id: Ic4e035755aca2e2fd8f9160b7e3bc8b3d1335669
parent 3b82486c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1023,13 +1023,11 @@ public final class MediaTranscodeManager {
                            "Source Width and height must be larger than 0");
                }

                // TODO(hkuang): Remove the hardcoded frameRate after b/176940364 is fixed.
                float frameRate = (float) 30.0;
                /*mSrcVideoFormatHint.getFloat(MediaFormat.KEY_FRAME_RATE, frameRate);
                float frameRate = mSrcVideoFormatHint.getFloat(MediaFormat.KEY_FRAME_RATE);
                if (frameRate <= 0) {
                    throw new IllegalArgumentException(
                            "frameRate must be larger than 0");
                }*/
                }

                int bitrate = getAVCBitrate(width, height, frameRate);
                videoTrackFormat.setInteger(MediaFormat.KEY_BIT_RATE, bitrate);