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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 newDuration < oldDuration) { | 564 newDuration < oldDuration) { |
565 // Deprecated behavior: if the new duration is less than old duration, | 565 // Deprecated behavior: if the new duration is less than old duration, |
566 // then call remove(new duration, old duration) on all all objects in | 566 // then call remove(new duration, old duration) on all all objects in |
567 // sourceBuffers. | 567 // sourceBuffers. |
568 for (size_t i = 0; i < m_sourceBuffers->length(); ++i) | 568 for (size_t i = 0; i < m_sourceBuffers->length(); ++i) |
569 m_sourceBuffers->item(i)->remove(newDuration, oldDuration, | 569 m_sourceBuffers->item(i)->remove(newDuration, oldDuration, |
570 ASSERT_NO_EXCEPTION); | 570 ASSERT_NO_EXCEPTION); |
571 } | 571 } |
572 | 572 |
573 // 5. If a user agent is unable to partially render audio frames or text cues | 573 // 5. If a user agent is unable to partially render audio frames or text cues |
574 // that start before and end after the duration, then run the following ste
ps: | 574 // that start before and end after the duration, then run the following |
| 575 // steps: |
575 // NOTE: Currently we assume that the media engine is able to render | 576 // NOTE: Currently we assume that the media engine is able to render |
576 // partial frames/cues. If a media engine gets added that doesn't support | 577 // partial frames/cues. If a media engine gets added that doesn't support |
577 // this, then we'll need to add logic to handle the substeps. | 578 // this, then we'll need to add logic to handle the substeps. |
578 | 579 |
579 // 6. Update the media controller duration to new duration and run the | 580 // 6. Update the media controller duration to new duration and run the |
580 // HTMLMediaElement duration change algorithm. | 581 // HTMLMediaElement duration change algorithm. |
581 m_attachedElement->durationChanged(newDuration, requestSeek); | 582 m_attachedElement->durationChanged(newDuration, requestSeek); |
582 } | 583 } |
583 | 584 |
584 void MediaSource::setReadyState(const AtomicString& state) { | 585 void MediaSource::setReadyState(const AtomicString& state) { |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 event->setTarget(this); | 815 event->setTarget(this); |
815 | 816 |
816 m_asyncEventQueue->enqueueEvent(event); | 817 m_asyncEventQueue->enqueueEvent(event); |
817 } | 818 } |
818 | 819 |
819 URLRegistry& MediaSource::registry() const { | 820 URLRegistry& MediaSource::registry() const { |
820 return MediaSourceRegistry::registry(); | 821 return MediaSourceRegistry::registry(); |
821 } | 822 } |
822 | 823 |
823 } // namespace blink | 824 } // namespace blink |
OLD | NEW |