MediaCodec 하드웨어 인코딩 추가

h264_mediacodec 사용
추후 hevc_mediacodec 활용 가능
This commit is contained in:
ritoseo 2025-06-26 00:57:57 +09:00
parent ccd62d913b
commit 9a912c467e
8 changed files with 9 additions and 2 deletions

View File

@ -40,6 +40,8 @@ module vumeter.so
module_app account.so module_app account.so
module_app debug_cmd.so module_app debug_cmd.so
module_app mwi.so module_app mwi.so
avcodec_h264enc h264_mediacodec
video_fps 30
evdev_device /dev/input/event0 evdev_device /dev/input/event0
opus_samplerate 48000 opus_samplerate 48000
opus_stereo no opus_stereo no

View File

@ -1420,6 +1420,7 @@ class BaresipService: Service() {
val ua = UserAgent.ofUap(uap) val ua = UserAgent.ofUap(uap)
val aor = ua?.account?.aor val aor = ua?.account?.aor
Log.w(TAG, "[RITO] got uaEvent $event/$aor/$callp")
Log.d(TAG, "got uaEvent $event/$aor/$callp") Log.d(TAG, "got uaEvent $event/$aor/$callp")
if (ua == null) { if (ua == null) {

View File

@ -191,7 +191,7 @@ object Config {
val cameraManager: CameraManager = ctx.getSystemService(Context.CAMERA_SERVICE) as CameraManager val cameraManager: CameraManager = ctx.getSystemService(Context.CAMERA_SERVICE) as CameraManager
//val defaultSizes = arrayListOf("320x240", "640x480", "720x480", "960x720", "1280x720", "1920x1080") //val defaultSizes = arrayListOf("320x240", "640x480", "720x480", "960x720", "1280x720", "1920x1080")
val defaultSizes = arrayListOf("720x480", "1280x720", "1920x1080") val defaultSizes = arrayListOf("640x480", "960x540", "1280x720", "1920x1080")
/* /*
for (id in cameraManager.cameraIdList) { for (id in cameraManager.cameraIdList) {
val cameraCharacteristics = cameraManager.getCameraCharacteristics(id) val cameraCharacteristics = cameraManager.getCameraCharacteristics(id)
@ -224,6 +224,7 @@ object Config {
Size(videoSize.substringBefore("x").toInt(), Size(videoSize.substringBefore("x").toInt(),
videoSize.substringAfter("x").toInt()) videoSize.substringAfter("x").toInt())
} }
//BaresipService.videoSize = Size(640, 480)
config = "${config}video_size " + config = "${config}video_size " +
"${BaresipService.videoSize.width}x${BaresipService.videoSize.height}\n" "${BaresipService.videoSize.width}x${BaresipService.videoSize.height}\n"

View File

@ -2201,6 +2201,7 @@ class MainActivity : AppCompatActivity() {
private fun handleIntent(intent: Intent, action: String) { private fun handleIntent(intent: Intent, action: String) {
Log.d(TAG, "Handling intent '$action'") Log.d(TAG, "Handling intent '$action'")
Log.w(TAG, "<RITO> Handling intent '$action'")
val ev = action.split(",") val ev = action.split(",")
when (ev[0]) { when (ev[0]) {
"no network" -> { // 네트워크 안잡힌 경우 "no network" -> { // 네트워크 안잡힌 경우
@ -2264,7 +2265,9 @@ class MainActivity : AppCompatActivity() {
resumeCall = call resumeCall = call
if(ev[0] == "call answer") { if(ev[0] == "call answer") {
videoButton.performClick() Handler(Looper.getMainLooper()).postDelayed({
videoButton.performClick()
}, 1000)
} }
} }
"call missed" -> { "call missed" -> {