New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 658349 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Simplify the initialization flow in RTCVideoDecoder

Project Member Reported by s...@chromium.org, Oct 21 2016

Issue description

RTCVideoDecoder will soon shim webrtc::VideoDecoder calls to media::VideoDecoder:
https://codereview.chromium.org/2418613002

Currently, the assumption used widely in webrtc is that if a codec is not supported, then a nullptr will be returned from RTCVideoDecoder::Create(). This requires querying the underlying decoder capabilities inside Create(), which was easily done with a VideoDecodeAccelerator, but is not supported by media::VideoDecoder.

The workaround for this is to call Initialize() on the media::VideoDecoder after constructing it in Create(), and wait for the result to come back before returning. If the decoder initializes successfully, we return the decoder, else we return nullptr, so the caller knows to fallback to software right away. Then, in InitDecode(), if the webrtc::codecSettings differ from the codec settings used to initialize the decoder (namely: the size of the video), then we issue *another* blocking Initialize() call before returning.

As part of the VDAv2 effort, we will add synchronous capability query methods to VideoDecoder. When the interface has been updated, replace the Initialize() call in Create() with a capability query. 
 

Comment 1 by guidou@chromium.org, Mar 13 2018

Components: -Blink>WebRTC Blink>WebRTC>Video

Sign in to add a comment