Failed to resume webrtc video call: HardwareVideoEncoder: deliverOutput failed

499 views
Skip to first unread message

Antonis Tsakiridis

unread,
Jan 2, 2018, 2:15:58 PM1/2/18
to discuss-webrtc
Hello All,

We 're working on an Android App employing webrtc for video calls and got this exception when trying to resume video after the App changed from another App screen back to video call screen:

01-02 20:50:56.200 20168-21281/org.restcomm.android.olympus.premium.debug E/HardwareVideoEncoder: HardwareVideoEncoder: java.lang.IllegalStateException
                                                                                                      at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
                                                                                                      at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2568)
                                                                                                      at org.webrtc.HardwareVideoEncoder.deliverEncodedImage(HardwareVideoEncoder.java:476)
                                                                                                      at org.webrtc.HardwareVideoEncoder.access$100(HardwareVideoEncoder.java:33)
                                                                                                      at org.webrtc.HardwareVideoEncoder$1.run(HardwareVideoEncoder.java:465)
01-02 20:50:56.200 20168-21281/org.restcomm.android.olympus.premium.debug E/HardwareVideoEncoder: HardwareVideoEncoder: deliverOutput failed


Any idea what might be wrong?

Some additional details:

In order to be able to pause video when the user leaves the video call screen to go to another App screen (while audio keeps flowing), and resume later using new views for video rendering (since Android destroys old activity views) we used this technique:
  • When pausing: stop rendering and remove local and remote previous renderers from respective video tracks
  • When resuming: start rending and add new renderers to previous tracks
Notice that the effect is that all UI elements are destroyed and recreated, while PeerConnection + original video tracks stay alive to be reused when the user comes back to call screen

IMPORTANT: this issue occurs some of the times, around 50%. The other half everything works and the video is resumed properly

Thanks in advance,
Antonis Tsakiridis

P.S. I can provide more details but didn't want to overwhelm you with details right off the bat

dmeln...@telepado.com

unread,
Feb 14, 2018, 3:30:44 AM2/14/18
to discuss-webrtc
Hi Antonis,

Did you have any update related your issue?

Thanks,
Dmitry M 

Antonis Tsakiridis

unread,
Feb 20, 2018, 6:11:30 AM2/20/18
to discuss-webrtc
Hello Dmitry,

At some point this issue stopped to occur, I think the issue was with the ordering of the calls on disabling tracks, removing sink and renderer (when leaving the activity), and enabling tracks and re-adding sink and renderer (when coming back to the activity). If you can add some more details on what is failing for you we might be able to assist more

Best regards,
Antonis Tsakiridis
Reply all
Reply to author
Forward
0 new messages