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

Side by Side Diff: Source/modules/mediasource/MediaSource.cpp

Issue 1055503002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 if (newDuration < oldDuration) { 435 if (newDuration < oldDuration) {
436 for (size_t i = 0; i < m_sourceBuffers->length(); ++i) 436 for (size_t i = 0; i < m_sourceBuffers->length(); ++i)
437 m_sourceBuffers->item(i)->remove(newDuration, oldDuration, ASSERT_NO _EXCEPTION); 437 m_sourceBuffers->item(i)->remove(newDuration, oldDuration, ASSERT_NO _EXCEPTION);
438 } 438 }
439 439
440 // 5. If a user agent is unable to partially render audio frames or text cue s that start before and end after the duration, then run the following steps: 440 // 5. If a user agent is unable to partially render audio frames or text cue s that start before and end after the duration, then run the following steps:
441 // NOTE: Currently we assume that the media engine is able to render partial frames/cues. If a media 441 // NOTE: Currently we assume that the media engine is able to render partial frames/cues. If a media
442 // engine gets added that doesn't support this, then we'll need to add logic to handle the substeps. 442 // engine gets added that doesn't support this, then we'll need to add logic to handle the substeps.
443 443
444 // 6. Update the media controller duration to new duration and run the HTMLM ediaElement duration change algorithm. 444 // 6. Update the media controller duration to new duration and run the HTMLM ediaElement duration change algorithm.
445 m_attachedElement->durationChanged(newDuration, requestSeek); 445 m_attachedElement->mediaPlayerDurationChanged(newDuration, requestSeek);
446 } 446 }
447 447
448 void MediaSource::setReadyState(const AtomicString& state) 448 void MediaSource::setReadyState(const AtomicString& state)
449 { 449 {
450 ASSERT(state == openKeyword() || state == closedKeyword() || state == endedK eyword()); 450 ASSERT(state == openKeyword() || state == closedKeyword() || state == endedK eyword());
451 451
452 AtomicString oldState = readyState(); 452 AtomicString oldState = readyState();
453 WTF_LOG(Media, "MediaSource::setReadyState() %p : %s -> %s", this, oldState. ascii().data(), state.ascii().data()); 453 WTF_LOG(Media, "MediaSource::setReadyState() %p : %s -> %s", this, oldState. ascii().data(), state.ascii().data());
454 454
455 if (state == closedKeyword()) { 455 if (state == closedKeyword()) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 m_asyncEventQueue->enqueueEvent(event.release()); 614 m_asyncEventQueue->enqueueEvent(event.release());
615 } 615 }
616 616
617 URLRegistry& MediaSource::registry() const 617 URLRegistry& MediaSource::registry() const
618 { 618 {
619 return MediaSourceRegistry::registry(); 619 return MediaSourceRegistry::registry();
620 } 620 }
621 621
622 } // namespace blink 622 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698