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