mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Move MediaFormat creation
For code clarity. PR #6766 <https://github.com/Genymobile/scrcpy/pull/6766>
This commit is contained in:
parent
fd6536b34a
commit
f54cf8b336
1 changed files with 1 additions and 2 deletions
|
|
@ -67,6 +67,7 @@ public class SurfaceEncoder implements AsyncProcessor {
|
|||
private void streamCapture() throws IOException, ConfigurationException {
|
||||
Codec codec = streamer.getCodec();
|
||||
MediaCodec mediaCodec = createMediaCodec(codec, encoderName);
|
||||
MediaFormat format = createFormat(codec.getMimeType(), videoBitRate, maxFps, codecOptions);
|
||||
|
||||
MediaCodecInfo.VideoCapabilities caps = mediaCodec.getCodecInfo().getCapabilitiesForType(codec.getMimeType())
|
||||
.getVideoCapabilities();
|
||||
|
|
@ -77,8 +78,6 @@ public class SurfaceEncoder implements AsyncProcessor {
|
|||
Ln.d("Actual video size alignment: " + alignment + "px");
|
||||
}
|
||||
|
||||
MediaFormat format = createFormat(codec.getMimeType(), videoBitRate, maxFps, codecOptions);
|
||||
|
||||
capture.init(reset, alignment);
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue