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

Issue 1652373004: MediaRecorder: add and wire read {video,audio}BitsPerSecond props (Closed)

Created:
4 years, 10 months ago by mcasas
Modified:
4 years, 10 months ago
CC:
blink-reviews, chromium-reviews, Peter Beverloo
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MediaRecorder: add and wire read {video,audio}BitsPerSecond props This CL follows [1] and adds these two fellas: readonly attribute unsigned long videoBitsPerSecond; readonly attribute unsigned long audioBitsPerSecond; to the MR idl, and wires them to reflect the configured or calculated bit rates. Added Layout Tests to double check the current allocation scheme. [1] https://github.com/w3c/mediacapture-record/issues/43 BUG=575301, 548290 Committed: https://crrev.com/e608797d019863e635cfdcac30d44f6304f81904 Cr-Commit-Position: refs/heads/master@{#373989}

Patch Set 1 #

Total comments: 12

Patch Set 2 : reviewers@ comments #

Total comments: 22

Patch Set 3 : philipj@opera.com comments #

Total comments: 19

Patch Set 4 : philipj@ second round of comments #

Total comments: 5

Patch Set 5 : philipj@ nits #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -136 lines) Patch
M third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html View 1 2 3 chunks +6 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html View 1 2 3 4 1 chunk +64 lines, -26 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-creation.html View 1 2 1 chunk +7 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-events-and-exceptions.html View 1 2 2 chunks +2 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-requestData.html View 1 2 3 2 chunks +13 lines, -27 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp View 1 2 3 4 5 chunks +31 lines, -35 lines 1 comment Download
M third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.idl View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (12 generated)
mcasas
avayvod@ PTAL (peter@ FYI).
4 years, 10 months ago (2016-02-02 20:02:49 UTC) #2
whywhat
lgtm with nits I'm afraid I'm not an OWNER here yet (Peter?) It seems like ...
4 years, 10 months ago (2016-02-02 22:19:54 UTC) #3
Peter Beverloo
As far as I can see only audioBitsPerSecond and videoBitsPerSecond are exposed (which makes sense, ...
4 years, 10 months ago (2016-02-02 22:43:51 UTC) #5
mcasas
philipj@opera.com: PTAL at the added two r/o attributes, following the discussion in the mentioned bug. ...
4 years, 10 months ago (2016-02-03 02:49:59 UTC) #9
philipj_slow
https://codereview.chromium.org/1652373004/diff/20001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html File third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html (right): https://codereview.chromium.org/1652373004/diff/20001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html#newcode19 third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html:19: assert_throws("NotSupportedError", The spec doesn't allow for NotSupportedError to be ...
4 years, 10 months ago (2016-02-03 03:31:05 UTC) #10
philipj_slow
On 2016/02/03 02:49:59, mcasas wrote: > mailto:philipj@opera.com: PTAL at the added two r/o attributes, > ...
4 years, 10 months ago (2016-02-03 03:40:23 UTC) #11
mcasas
philipj@opera.com PTAL Still pending blink-dev post OK -- or lack of NOKs :) Will follow ...
4 years, 10 months ago (2016-02-03 23:50:27 UTC) #13
philipj_slow
https://codereview.chromium.org/1652373004/diff/20001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html File third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html (right): https://codereview.chromium.org/1652373004/diff/20001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html#newcode19 third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html:19: assert_throws("NotSupportedError", On 2016/02/03 23:50:26, mcasas wrote: > On 2016/02/03 ...
4 years, 10 months ago (2016-02-04 03:03:10 UTC) #14
mcasas
philipj@ PTAL https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-requestData.html File third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-requestData.html (right): https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-requestData.html#newcode26 third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-requestData.html:26: async_test(function(test) { On 2016/02/04 03:03:10, philipj_UTC7 wrote: ...
4 years, 10 months ago (2016-02-05 02:39:15 UTC) #15
philipj_slow
LGTM % asserts and, if you like, dictionary member default values https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp File third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp (right): ...
4 years, 10 months ago (2016-02-05 07:48:49 UTC) #17
mcasas
https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp File third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp (right): https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp#newcode99 third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp:99: if ((options.videoBitsPerSecond() > 0 || overallBps > 0) && ...
4 years, 10 months ago (2016-02-06 00:26:25 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1652373004/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1652373004/140001
4 years, 10 months ago (2016-02-06 02:07:31 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 10 months ago (2016-02-06 02:36:38 UTC) #24
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/e608797d019863e635cfdcac30d44f6304f81904 Cr-Commit-Position: refs/heads/master@{#373989}
4 years, 10 months ago (2016-02-06 02:37:28 UTC) #26
philipj_slow
I have filed https://code.google.com/p/chromium/issues/detail?id=585059 for the failing asserts. https://codereview.chromium.org/1652373004/diff/100001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp File third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp (right): https://codereview.chromium.org/1652373004/diff/100001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp#newcode59 third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp:59: ASSERT(options.bitsPerSecond() ...
4 years, 10 months ago (2016-02-08 09:34:12 UTC) #27
philipj_slow
https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp File third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp (right): https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp#newcode99 third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp:99: if ((options.videoBitsPerSecond() > 0 || overallBps > 0) && ...
4 years, 10 months ago (2016-02-08 09:39:44 UTC) #28
mcasas
4 years, 10 months ago (2016-02-08 21:54:40 UTC) #29
Message was sent while issue was closed.
Oops, let's follow this dangling items in 
https://codereview.chromium.org/1682483002/

https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp (right):

https://codereview.chromium.org/1652373004/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp:99: if
((options.videoBitsPerSecond() > 0 || overallBps > 0) && (videoBps <
kSmallestPossibleVpxBitRate)) {
On 2016/02/08 09:39:44, philipj_UTC7 wrote:
> On 2016/02/06 00:26:25, mcasas wrote:
> > On 2016/02/05 07:48:49, philipj_UTC7 wrote:
> > > On 2016/02/05 02:39:14, mcasas wrote:
> > > > On 2016/02/04 03:03:10, philipj_UTC7 wrote:
> > > > > Look at videoBps here instead? It'd be nice to deal with the options
> dict
> > at
> > > > the
> > > > > top only.
> > > > 
> > > > In this case the idea is to check if the original 
> > > > options.videoBitsPerSecond() is set, indicating
> > > > that the user has explicited the video bitRate.
> > > > This is to prevent clamping the |videoBps| to
> > > > kSmallestPossibleVpxBitRate when the user 
> > > > has passed no explicit |videoBitsPerSecond|.
> > > > 
> > > > So, have to look at the original |videoBitsPerSecond|.
> > > 
> > > Oh, I see. If the IDL matched the spec and didn't have default values for
> > > *BitsPerSecond, this would become something involving
> > > options.hasVideoBitsPerSecond() instead. Add a TODO in
> > MediaRecorderOptions.idl
> > > or fix now?
> > 
> > Using hasVideoBitsPerSecond().
> 
> This bit is still using options.videoBitsPerSecond() in what landed, did you
> forget to upload a change? It still seems to me that it should simply look at
> videoBps since that is what is being clamped. Is it about avoiding the console
> message, perhaps? Since the clamped bitrate can be observed in the
MediaRecorder
> instance, foregoing the console message completely seems fine to me, it cannot
> be preserved if you sync the MediaRecorderOptions.idl with the spec.

Darn, something was missing indeed.
What I (think I) wrote is that here:
a) cannot use hasVideoBitsPerSecond() since that 
would not give me the case in which the user sets
an explicit videoBitsPerSecond=0
b) the extra |options.videoBitsPerSecond > 0| is
there to prevent clamping the video bit rate to a 
minimum when the user has not set it or has set 
it to zero (meaning: let the platform decide).

Powered by Google App Engine
This is Rietveld 408576698