Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 2633623002: MediaRecorder: handle libwebm::Segment::AddFrame() errors and wire up to Blink (Closed)

Created:
3 years, 11 months ago by mcasas
Modified:
3 years, 11 months ago
Reviewers:
scheib
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaRecorder: 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? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -63 lines) Patch
M content/renderer/media/media_recorder_handler.cc View 2 chunks +12 lines, -4 lines 0 comments Download
M content/renderer/media/media_recorder_handler_unittest.cc View 1 2 chunks +53 lines, -0 lines 0 comments Download
M media/muxers/webm_muxer.h View 1 3 chunks +9 lines, -5 lines 0 comments Download
M media/muxers/webm_muxer.cc View 1 6 chunks +32 lines, -26 lines 0 comments Download
M media/muxers/webm_muxer_unittest.cc View 1 10 chunks +48 lines, -28 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
mcasas
scheib@ ptal fresh pair of eyes for an easy CL
3 years, 11 months ago (2017-01-13 02:37:59 UTC) #3
scheib
Can we add any tests for scenarios expected to fail?
3 years, 11 months ago (2017-01-13 18:07:20 UTC) #8
mcasas
ptal
3 years, 11 months ago (2017-01-14 01:46:32 UTC) #13
scheib
LGTM
3 years, 11 months ago (2017-01-14 02:36:20 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2633623002/100001
3 years, 11 months ago (2017-01-14 02:52:05 UTC) #16
commit-bot: I haz the power
3 years, 11 months ago (2017-01-14 03:40:25 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ed7c87b8816f37e73f640e3b7c5c...

Powered by Google App Engine
This is Rietveld 408576698