利用媒体codeC与createInputSurface力时,I帧 [英] force i-frame when using mediacodec with createInputSurface
问题描述
有可能使用表面作为输入时,触发EN codeR发送I帧?
我知道它可能在排队的时候输入缓冲器,但我没有找到一个方法来做到这一点使用createInputSurface时。
is it possible to trigger the encoder to send i-frames when using a surface as the input ? I know its possible when when queuing input buffers, but I didnt find a way to do so when using createInputSurface .
推荐答案
您不能设置缓冲区标志。这也影响 BUFFER_FLAG_END_OF_STREAM
,但您有 signalEndOfInputStream()
电话。
You can't set flags on the buffers. This also affects BUFFER_FLAG_END_OF_STREAM
, but for that you have the signalEndOfInputStream()
call.
I帧将每 KEY_FRAME_RATE * KEY_I_FRAME_INTERVAL
缓冲区发送。 (我不知道怎么公司,是 - 我怀疑他们可能在实践中经常出现更多或更少)
I frames will be sent every KEY_FRAME_RATE * KEY_I_FRAME_INTERVAL
buffers. (I don't know how firm that is -- I suspect they might appear more or less often in practice.)
这篇关于利用媒体codeC与createInputSurface力时,I帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!