Chromium Code Reviews
DescriptionMediaRecorder: handle libwebm::Segment::AddFrame() errors and wire up to Blink
libwebm::Segment::AddFrame() can and will return false on error
conditions, but the return value is currently, sadly, ignored.
This CL handles the return value and wires it to Blink's
onError() callback.
Unittests are beefed up, in particular:
- Added WebmMuxer::ForceOneLibWebmErrorForTesting(), and using it
in WebmMuxerTest to force errors and then
EXPECT_FALSE(...OnEncodedVideo/OnEncodedAudio)
- Thanks to scheib@ insistence in testing, I found an unreachable
code and a bug (!) in WebmMuxer:
-- the dumping of |encoded_frames_queue_| [1] is not reachable
because the said deque is emptied in OnEncodedAudio() (left a
DCHECK() instead).
-- the bug, introduced in this very CL, was the use-after-free
during emptying the same deque, when retrying emptying it after an
error.
- MediaRecorderHandlerTest adds a test case to verify that a
muxer error causes an onError() to be bubbled up to Blink.
All in all, testing FTW!
[1] https://cs.chromium.org/chromium/src/media/muxers/webm_muxer.cc?q=webm_muxer.cc&sq=package:chromium&dr&l=162
BUG=675521
Review-Url: https://codereview.chromium.org/2633623002
Cr-Commit-Position: refs/heads/master@{#443780}
Committed: https://chromium.googlesource.com/chromium/src/+/ed7c87b8816f37e73f640e3b7c5c93fad0dbd29a
Patch Set 1 : #Patch Set 2 : I can haz moar testing? #
Messages
Total messages: 19 (13 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||