Skip to content

Commit

Permalink
更新V12.1.1
Browse files Browse the repository at this point in the history
修复无法连接时崩溃bug
  • Loading branch information
mingzhixian committed Jul 9, 2023
1 parent 5e16a77 commit f5c5074
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions scrcpy_android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "top.saymzx.scrcpy.android"
minSdk 23
targetSdk 33
versionCode 121
versionName "12.1"
versionCode 1211
versionName "12.1.1"
resConfigs "zh"
resConfigs "xhdpi"
ndk {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ class Scrcpy(private val device: Device) {
} catch (e: Exception) {
stop("连接错误", e)
}
// try {
alert.cancel()
// 配置视频解码
setVideoDecodec()
// 配置音频解码
setAudioDecodec()
// 配置音频播放
if (canAudio) setAudioTrack()
// 设置被控端熄屏(默认投屏后熄屏)
setPowerOff()
// } catch (e: Exception) {
// stop("启动错误", e)
// }
try {
alert.cancel()
// 配置视频解码
setVideoDecodec()
// 配置音频解码
setAudioDecodec()
// 配置音频播放
if (canAudio) setAudioTrack()
// 设置被控端熄屏(默认投屏后熄屏)
setPowerOff()
} catch (e: Exception) {
stop("启动错误", e)
}
// 投屏中
device.status = 1
// 视频解码
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private void streamScreen() throws IOException, ConfigurationException {
if (codeInfo.getCapabilitiesForType(codec.getMimeType()).getEncoderCapabilities().isBitrateModeSupported(MediaCodecInfo.EncoderCapabilities.BITRATE_MODE_CBR)) {
format.setInteger(MediaFormat.KEY_BITRATE_MODE, MediaCodecInfo.EncoderCapabilities.BITRATE_MODE_CBR);
}
// format.setInteger(MediaFormat.KEY_COLOR_FORMAT, COLOR_FormatYUV420Flexible);

Surface surface = null;
try {
Expand Down

0 comments on commit f5c5074

Please sign in to comment.