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

Issue 130523002: Preliminary work for unprefixed MSE SourceBuffer.mode manipulation (Closed)

Created:
6 years, 11 months ago by wolenetz
Modified:
6 years, 11 months ago
CC:
blink-reviews, feature-media-reviews_chromium.org, philipj_slow
Visibility:
Public.

Description

Preliminary work for unprefixed MSE SourceBuffer.mode manipulation Adds the SourceBuffer.mode attribute and basic layout tests. Later changes will plumb this through to correctly process 'segments' and 'sequence' append modes. R=acolwell@chromium.org TEST=On Linux, new layout tests pass with no other mediasource layout test regression. SourceBuffer.mode attribute's implementation is correctly hidden: new tests fail in Chromium without --enable-experimental-web-platform-features. BUG=249422 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164919

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add WebSourceBuffer::setMode interface method, restrict mode attribute to experimental web platform… #

Total comments: 2

Patch Set 3 : Prefix public Blink API AppendMode enum values with AppendMode #

Total comments: 1

Patch Set 4 : Use assert_equals instead of assert_true(...==...) #

Total comments: 4

Patch Set 5 : Fix nits #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -4 lines) Patch
A LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode.html View 1 2 3 1 chunk +86 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/modules/mediasource/SourceBuffer.h View 2 chunks +5 lines, -0 lines 0 comments Download
M Source/modules/mediasource/SourceBuffer.cpp View 1 2 3 4 3 chunks +53 lines, -4 lines 1 comment Download
M Source/modules/mediasource/SourceBuffer.idl View 1 1 chunk +4 lines, -0 lines 0 comments Download
M public/platform/WebSourceBuffer.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
wolenetz
Additional verification of parsing state and actual support for the distinct sequence mode are currently ...
6 years, 11 months ago (2014-01-09 02:12:55 UTC) #1
acolwell GONE FROM CHROMIUM
This looks good so far. Just add the necessary changes to WebSourceBuffer and I think ...
6 years, 11 months ago (2014-01-09 02:53:57 UTC) #2
jamesr
https://codereview.chromium.org/130523002/diff/90001/public/platform/WebSourceBuffer.h File public/platform/WebSourceBuffer.h (right): https://codereview.chromium.org/130523002/diff/90001/public/platform/WebSourceBuffer.h#newcode40 public/platform/WebSourceBuffer.h:40: enum AppendMode { please read http://www.chromium.org/blink/public-c-api - this enum ...
6 years, 11 months ago (2014-01-09 21:31:25 UTC) #3
wolenetz
On 2014/01/09 21:31:25, jamesr wrote: > https://codereview.chromium.org/130523002/diff/90001/public/platform/WebSourceBuffer.h > File public/platform/WebSourceBuffer.h (right): > > https://codereview.chromium.org/130523002/diff/90001/public/platform/WebSourceBuffer.h#newcode40 > ...
6 years, 11 months ago (2014-01-09 21:37:29 UTC) #4
wolenetz
PTAL @ patch set 3 https://codereview.chromium.org/130523002/diff/1/Source/modules/mediasource/SourceBuffer.cpp File Source/modules/mediasource/SourceBuffer.cpp (right): https://codereview.chromium.org/130523002/diff/1/Source/modules/mediasource/SourceBuffer.cpp#newcode130 Source/modules/mediasource/SourceBuffer.cpp:130: // TODO(wolenetz): Figure out ...
6 years, 11 months ago (2014-01-09 21:43:10 UTC) #5
wolenetz
On 2014/01/09 21:43:10, wolenetz wrote: > PTAL @ patch set 3 > > https://codereview.chromium.org/130523002/diff/1/Source/modules/mediasource/SourceBuffer.cpp > ...
6 years, 11 months ago (2014-01-09 21:47:45 UTC) #6
jamesr
https://codereview.chromium.org/130523002/diff/200001/public/platform/WebSourceBuffer.h File public/platform/WebSourceBuffer.h (right): https://codereview.chromium.org/130523002/diff/200001/public/platform/WebSourceBuffer.h#newcode47 public/platform/WebSourceBuffer.h:47: // FIXME: Remove default implementation once Chromium setMode() implementation ...
6 years, 11 months ago (2014-01-09 22:15:36 UTC) #7
wolenetz
On 2014/01/09 22:15:36, jamesr wrote: > https://codereview.chromium.org/130523002/diff/200001/public/platform/WebSourceBuffer.h > File public/platform/WebSourceBuffer.h (right): > > https://codereview.chromium.org/130523002/diff/200001/public/platform/WebSourceBuffer.h#newcode47 > ...
6 years, 11 months ago (2014-01-09 22:21:14 UTC) #8
jamesr
It could be at least as real as this stub.
6 years, 11 months ago (2014-01-09 22:21:50 UTC) #9
wolenetz
On 2014/01/09 22:21:50, jamesr wrote: > It could be at least as real as this ...
6 years, 11 months ago (2014-01-09 22:39:02 UTC) #10
jamesr
Ah, good point. Tricksy. lgtm
6 years, 11 months ago (2014-01-09 22:45:31 UTC) #11
wolenetz
On 2014/01/09 22:45:31, jamesr wrote: > Ah, good point. Tricksy. lgtm Thank you. acolwell: As ...
6 years, 11 months ago (2014-01-10 20:41:22 UTC) #12
wolenetz
acolwell, please review patch set 4 now that I fixed those nits I noticed and ...
6 years, 11 months ago (2014-01-10 20:59:40 UTC) #13
acolwell GONE FROM CHROMIUM
lgtm % nits https://codereview.chromium.org/130523002/diff/330001/Source/modules/mediasource/SourceBuffer.cpp File Source/modules/mediasource/SourceBuffer.cpp (right): https://codereview.chromium.org/130523002/diff/330001/Source/modules/mediasource/SourceBuffer.cpp#newcode131 Source/modules/mediasource/SourceBuffer.cpp:131: // FIXME: Remove default no-op implementation ...
6 years, 11 months ago (2014-01-10 22:09:34 UTC) #14
wolenetz
Thank you acolwell@ and jamesr@. I fixed the nits and am sending patch set 5 ...
6 years, 11 months ago (2014-01-10 23:06:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wolenetz@chromium.org/130523002/380002
6 years, 11 months ago (2014-01-10 23:11:07 UTC) #16
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=7207
6 years, 11 months ago (2014-01-11 00:06:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wolenetz@chromium.org/130523002/380002
6 years, 11 months ago (2014-01-11 00:13:05 UTC) #18
commit-bot: I haz the power
Change committed as 164919
6 years, 11 months ago (2014-01-11 01:45:19 UTC) #19
Mike West
https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasource/SourceBuffer.cpp File Source/modules/mediasource/SourceBuffer.cpp (right): https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasource/SourceBuffer.cpp#newcode112 Source/modules/mediasource/SourceBuffer.cpp:112: exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessError); Hello, friendly engineer! Please don't add new exceptions ...
6 years, 11 months ago (2014-01-13 11:56:20 UTC) #20
wolenetz
On 2014/01/13 11:56:20, Mike West wrote: > https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasource/SourceBuffer.cpp > File Source/modules/mediasource/SourceBuffer.cpp (right): > > https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasource/SourceBuffer.cpp#newcode112 ...
6 years, 11 months ago (2014-01-13 18:42:37 UTC) #21
Mike West
6 years, 11 months ago (2014-01-13 19:19:26 UTC) #22
Message was sent while issue was closed.
On 2014/01/13 18:42:37, wolenetz wrote:
> On 2014/01/13 11:56:20, Mike West wrote:
> >
>
https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasou...
> > File Source/modules/mediasource/SourceBuffer.cpp (right):
> > 
> >
>
https://codereview.chromium.org/130523002/diff/380002/Source/modules/mediasou...
> > Source/modules/mediasource/SourceBuffer.cpp:112:
> > exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessError);
> > Hello, friendly engineer!
> > 
> > Please don't add new exceptions which are uninformative and generic. I'm
> working
> > on driving these to zero so I can remove the method entirely. Adding more
> makes
> > that more difficult. :)
> > 
> > Thanks!
> > 
> > -mike
> 
> Hi Mike -
> Sorry, I was unaware of your effort and followed the example of other existing
> pieces of the MediaSource API spec implementation in Blink that similarly
throw
> exceptions this way. For my future reference, do you have an example where
> InvalidStateError or InvalidAccessError are thrown the way you recommend?
> 
> Thanks,
> Matt

Thanks Matt!

You'd throw the error exactly the same way, you'd simply use
`throwDOMException([type], [reason])` instead of
`throwUninformativeAndGenericDOMException([type])`. The first of these
exceptions might be something like:

    exceptionState.throwDOMException(InvalidAccessError, "The mode provided ('"
+ newMode + "') is neither 'segments' nor 'sequence'.");

Something like that. I'd love to review CLs to that effect!

-mike

Powered by Google App Engine
This is Rietveld 408576698