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

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

Issue 1013923002: Fix MSE GC, make it less aggressive, more spec-compliant (Blink CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR feedback Created 5 years, 5 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 size_t insertPosition = 0; 511 size_t insertPosition = 0;
512 while (insertPosition < m_activeSourceBuffers->length() 512 while (insertPosition < m_activeSourceBuffers->length()
513 && m_sourceBuffers->find(m_activeSourceBuffers->item(insertPosition)) < indexInSourceBuffers) { 513 && m_sourceBuffers->find(m_activeSourceBuffers->item(insertPosition)) < indexInSourceBuffers) {
514 ++insertPosition; 514 ++insertPosition;
515 } 515 }
516 516
517 m_activeSourceBuffers->insert(insertPosition, sourceBuffer); 517 m_activeSourceBuffers->insert(insertPosition, sourceBuffer);
518 } 518 }
519 519
520 HTMLMediaElement* MediaSource::mediaElement() const
521 {
522 return m_attachedElement;
philipj_slow 2015/07/08 12:47:44 The getters inlined in the header have .get(), can
servolk 2015/07/08 19:03:47 You are right. Changed to .get() for consistency w
523 }
524
520 bool MediaSource::isClosed() const 525 bool MediaSource::isClosed() const
521 { 526 {
522 return readyState() == closedKeyword(); 527 return readyState() == closedKeyword();
523 } 528 }
524 529
525 void MediaSource::close() 530 void MediaSource::close()
526 { 531 {
527 setReadyState(closedKeyword()); 532 setReadyState(closedKeyword());
528 } 533 }
529 534
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 605
601 m_asyncEventQueue->enqueueEvent(event.release()); 606 m_asyncEventQueue->enqueueEvent(event.release());
602 } 607 }
603 608
604 URLRegistry& MediaSource::registry() const 609 URLRegistry& MediaSource::registry() const
605 { 610 {
606 return MediaSourceRegistry::registry(); 611 return MediaSourceRegistry::registry();
607 } 612 }
608 613
609 } // namespace blink 614 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698