Skip to content
Snippets Groups Projects
Commit ad74c0a9 authored by Adrien Béraud's avatar Adrien Béraud Committed by Maxime Callet
Browse files

requestKeyFrame: adapt for API changes

Change-Id: I0575361fba597333c7bfa35cef4da86c2bc47163
parent fa90a645
No related branches found
No related tags found
No related merge requests found
......@@ -491,14 +491,12 @@ class CameraService internal constructor(c: Context) {
return Pair(codec, encoderInput)
}
fun requestKeyFrame() {
Log.w(TAG, "requestKeyFrame()")
fun requestKeyFrame(camId: String) {
Log.w(TAG, "requestKeyFrame() $camId")
try {
/*if (currentCodec != null) {
val params = Bundle()
params.putInt(MediaCodec.PARAMETER_KEY_REQUEST_SYNC_FRAME, 0)
currentCodec!!.setParameters(params)
}*/
mParams[camId]?.mediaCodec?.setParameters(Bundle().apply {
putInt(MediaCodec.PARAMETER_KEY_REQUEST_SYNC_FRAME, 0)
})
} catch (e: IllegalStateException) {
Log.w(TAG, "Can't send keyframe request", e)
}
......
......@@ -468,8 +468,8 @@ class HardwareServiceImpl(
videoEvents.onNext(VideoEvent(started = false))
}
override fun requestKeyFrame() {
cameraService.requestKeyFrame()
override fun requestKeyFrame(camId: String) {
cameraService.requestKeyFrame(camId)
}
override fun setBitrate(camId: String, bitrate: Int) {
......
......@@ -303,7 +303,7 @@ class DaemonService(
}
override fun requestKeyFrame(camId: String) {
mHardwareService.requestKeyFrame()
mHardwareService.requestKeyFrame(camId)
}
override fun setBitrate(camId: String, bitrate: Int) {
......
......@@ -95,7 +95,7 @@ abstract class HardwareService(
abstract fun startCapture(camId: String?)
abstract fun stopCapture(camId: String)
abstract fun hasMicrophone(): Boolean
abstract fun requestKeyFrame()
abstract fun requestKeyFrame(camId: String)
abstract fun setBitrate(camId: String, bitrate: Int)
abstract fun addVideoSurface(id: String, holder: Any)
abstract fun updateVideoSurfaceId(currentId: String, newId: String)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment