RESOLVED FIXED 104581
Update MediaSource to allow append() calls in "ended" state.
https://bugs.webkit.org/show_bug.cgi?id=104581
Summary Update MediaSource to allow append() calls in "ended" state.
Aaron Colwell
Reported 2012-12-10 11:52:17 PST
The October 1st update to the Media Source Extensions spec changed the SourceBuffer.append() behavior to allow calls in the "ended" state. These calls will trigger a transition to "open" and allow data to be appended instead of throwing an exception. The current WebKit implementation needs to be updated to reflect this new behavior.
Attachments
Patch (13.23 KB, patch)
2012-12-11 07:09 PST, Aaron Colwell
no flags
Rebase (13.20 KB, patch)
2012-12-11 08:18 PST, Aaron Colwell
no flags
Added 0-byte append test (17.15 KB, patch)
2012-12-11 09:45 PST, Aaron Colwell
no flags
Aaron Colwell
Comment 1 2012-12-11 07:09:34 PST
Aaron Colwell
Comment 2 2012-12-11 07:13:49 PST
Comment on attachment 178796 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178796&action=review > Source/WebCore/Modules/mediasource/MediaSource.cpp:-289 > - if (!data->length()) Chromium player implementation was updated to handle this case. m_player needs to see these appends now so that it can properly mirror the state transition.
WebKit Review Bot
Comment 3 2012-12-11 07:52:13 PST
Comment on attachment 178796 [details] Patch Attachment 178796 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15280102 New failing tests: http/tests/media/media-source/video-media-source-append-in-ended-state.html http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html
Aaron Colwell
Comment 4 2012-12-11 08:18:25 PST
Eric Carlson
Comment 5 2012-12-11 09:10:50 PST
Comment on attachment 178809 [details] Rebase View in context: https://bugs.webkit.org/attachment.cgi?id=178809&action=review > Source/WebCore/Modules/mediasource/MediaSource.cpp:293 > + if (m_readyState == endedKeyword()) > + setReadyState(openKeyword()); > > if (!m_player->sourceAppend(id, data->data(), data->length())) { > ec = SYNTAX_ERR; Is it necessary to call to m_player->sourceAppend() when data->length() is zero? It is probably worth having an explicit test for calling append() with no data when state is "ended".
Aaron Colwell
Comment 6 2012-12-11 09:38:56 PST
Comment on attachment 178809 [details] Rebase View in context: https://bugs.webkit.org/attachment.cgi?id=178809&action=review >> Source/WebCore/Modules/mediasource/MediaSource.cpp:293 >> ec = SYNTAX_ERR; > > Is it necessary to call to m_player->sourceAppend() when data->length() is zero? > > It is probably worth having an explicit test for calling append() with no data when state is "ended". The call on m_player is necessary so the player implementation can keep its state in sync with m_readyState. Added a test for the 0-byte case.
Aaron Colwell
Comment 7 2012-12-11 09:45:40 PST
Created attachment 178822 [details] Added 0-byte append test
WebKit Review Bot
Comment 8 2012-12-11 10:24:46 PST
Comment on attachment 178822 [details] Added 0-byte append test Clearing flags on attachment: 178822 Committed r137332: <http://trac.webkit.org/changeset/137332>
WebKit Review Bot
Comment 9 2012-12-11 10:24:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.