OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 if (!m_source->isOpen()) { | 314 if (!m_source->isOpen()) { |
315 exceptionState.throwDOMException(InvalidStateError, "The parent media so
urce's readyState is not 'open'."); | 315 exceptionState.throwDOMException(InvalidStateError, "The parent media so
urce's readyState is not 'open'."); |
316 return; | 316 return; |
317 } | 317 } |
318 | 318 |
319 // 3. If the sourceBuffer.updating attribute equals true, then run the follo
wing steps: ... | 319 // 3. If the sourceBuffer.updating attribute equals true, then run the follo
wing steps: ... |
320 abortIfUpdating(); | 320 abortIfUpdating(); |
321 | 321 |
322 // 4. Run the reset parser state algorithm. | 322 // 4. Run the reset parser state algorithm. |
323 m_webSourceBuffer->abort(); | 323 m_webSourceBuffer->resetParserState(); |
324 | 324 |
325 // 5. Set appendWindowStart to 0. | 325 // 5. Set appendWindowStart to 0. |
326 setAppendWindowStart(0, exceptionState); | 326 setAppendWindowStart(0, exceptionState); |
327 | 327 |
328 // 6. Set appendWindowEnd to positive Infinity. | 328 // 6. Set appendWindowEnd to positive Infinity. |
329 setAppendWindowEnd(std::numeric_limits<double>::infinity(), exceptionState); | 329 setAppendWindowEnd(std::numeric_limits<double>::infinity(), exceptionState); |
330 } | 330 } |
331 | 331 |
332 void SourceBuffer::remove(double start, double end, ExceptionState& exceptionSta
te) | 332 void SourceBuffer::remove(double start, double end, ExceptionState& exceptionSta
te) |
333 { | 333 { |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 m_loader.clear(); | 766 m_loader.clear(); |
767 m_stream = nullptr; | 767 m_stream = nullptr; |
768 } | 768 } |
769 | 769 |
770 void SourceBuffer::appendError(bool decodeError) | 770 void SourceBuffer::appendError(bool decodeError) |
771 { | 771 { |
772 // Section 3.5.3 Append Error Algorithm | 772 // Section 3.5.3 Append Error Algorithm |
773 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sou
rce.html#sourcebuffer-append-error | 773 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sou
rce.html#sourcebuffer-append-error |
774 | 774 |
775 // 1. Run the reset parser state algorithm. | 775 // 1. Run the reset parser state algorithm. |
776 m_webSourceBuffer->abort(); | 776 m_webSourceBuffer->resetParserState(); |
777 | 777 |
778 // 2. Set the updating attribute to false. | 778 // 2. Set the updating attribute to false. |
779 m_updating = false; | 779 m_updating = false; |
780 | 780 |
781 // 3. Queue a task to fire a simple event named error at this SourceBuffer o
bject. | 781 // 3. Queue a task to fire a simple event named error at this SourceBuffer o
bject. |
782 scheduleEvent(EventTypeNames::error); | 782 scheduleEvent(EventTypeNames::error); |
783 | 783 |
784 // 4. Queue a task to fire a simple event named updateend at this SourceBuff
er object. | 784 // 4. Queue a task to fire a simple event named updateend at this SourceBuff
er object. |
785 scheduleEvent(EventTypeNames::updateend); | 785 scheduleEvent(EventTypeNames::updateend); |
786 | 786 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 { | 835 { |
836 visitor->trace(m_source); | 836 visitor->trace(m_source); |
837 visitor->trace(m_stream); | 837 visitor->trace(m_stream); |
838 visitor->trace(m_trackDefaults); | 838 visitor->trace(m_trackDefaults); |
839 visitor->trace(m_asyncEventQueue); | 839 visitor->trace(m_asyncEventQueue); |
840 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis
itor); | 840 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis
itor); |
841 ActiveDOMObject::trace(visitor); | 841 ActiveDOMObject::trace(visitor); |
842 } | 842 } |
843 | 843 |
844 } // namespace blink | 844 } // namespace blink |
OLD | NEW |