add ffmpeg mediacodec h264/h265 encode (#8028)

* Check available when app start from kotlin via get codec info
* For latency free, repeat encode 10 frame at most when capture return WouldBlock
* For changing quality, kotlin support but jni doesn't support, rerun video service when quality is manualy
  changed
* 3 or 6 times bitrate for mediacodec because its quality is poor

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2024-05-13 12:39:04 +08:00
committed by GitHub
parent 4c99b8c70e
commit a7499c2de8
13 changed files with 380 additions and 31 deletions

4
Cargo.lock generated
View File

@@ -3037,8 +3037,8 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hwcodec"
version = "0.4.9"
source = "git+https://github.com/21pages/hwcodec#7a52282267cb6aadbcd74c132bd4ecd43ab6f505"
version = "0.4.10"
source = "git+https://github.com/21pages/hwcodec#9cb895fdaea198dd72bd75980109dbd05a059a60"
dependencies = [
"bindgen 0.59.2",
"cc",