MediaCodec 하드웨어 인코딩 끊김 증상 개선

h264_mediacodec 사용
This commit is contained in:
ritoseo 2025-07-24 15:25:28 +09:00
parent 9a912c467e
commit 4ca03bc1c9
3 changed files with 6 additions and 5 deletions

View File

@ -191,7 +191,8 @@ object Config {
val cameraManager: CameraManager = ctx.getSystemService(Context.CAMERA_SERVICE) as CameraManager
//val defaultSizes = arrayListOf("320x240", "640x480", "720x480", "960x720", "1280x720", "1920x1080")
val defaultSizes = arrayListOf("640x480", "960x540", "1280x720", "1920x1080")
//val defaultSizes = arrayListOf("640x480", "960x540", "1280x720", "1920x1080")
val defaultSizes = arrayListOf("640x480", "960x540", "1280x720")
/*
for (id in cameraManager.cameraIdList) {
val cameraCharacteristics = cameraManager.getCameraCharacteristics(id)
@ -229,9 +230,9 @@ object Config {
"${BaresipService.videoSize.width}x${BaresipService.videoSize.height}\n"
/* Added by ritoseo */
config = "${config}video_bitrate 4000000\n"
config = "${config}video_bitrate 60000000\n"
config = "${config}rtp_video_tos 184\n"
config = "${config}rtp_bandwidth 512-4096\n"
config = "${config}rtp_bandwidth 512-8192\n"
/********************/
if (Utils.supportedCameras(ctx).isNotEmpty()) {
@ -244,10 +245,10 @@ object Config {
}
val videoFps = previousVariable("video_fps")
config = if (videoFps != "" && videoFps != "60.0")
config = if (videoFps != "" && videoFps != "30.0")
"${config}video_fps $videoFps\n"
else
"${config}video_fps 60\n"
"${config}video_fps 30\n"
val toneCountry = previousVariable("tone_country")
if (toneCountry != "")