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

Unified Diff: Source/modules/mediasource/SourceBuffer.h

Issue 552943002: MSE: Start letting SourceBuffer begin to do initialization segment received algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated WIP Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/mediasource/SourceBuffer.h
diff --git a/Source/modules/mediasource/SourceBuffer.h b/Source/modules/mediasource/SourceBuffer.h
index 29e44d129a8b7b9e3b9f1e5c91a00d243d876fc4..5e1a79c0e9ecdd4a0fbc43365dae27d79b0b56d5 100644
--- a/Source/modules/mediasource/SourceBuffer.h
+++ b/Source/modules/mediasource/SourceBuffer.h
@@ -36,6 +36,7 @@
#include "modules/EventTargetModules.h"
#include "platform/AsyncMethodRunner.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/WebSourceBufferClient.h"
#include "wtf/Forward.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
@@ -50,7 +51,7 @@ class Stream;
class TimeRanges;
class WebSourceBuffer;
-class SourceBuffer FINAL : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoaderClient {
+class SourceBuffer FINAL : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoaderClient, public WebSourceBufferClient {
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<SourceBuffer>);
DEFINE_WRAPPERTYPEINFO();
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer);
@@ -92,6 +93,9 @@ public:
virtual ExecutionContext* executionContext() const OVERRIDE;
virtual const AtomicString& interfaceName() const OVERRIDE;
+ // WebSourceBufferClient interface
+ virtual void initializationSegmentReceived() OVERRIDE;
+
virtual void trace(Visitor*) OVERRIDE;
private:
@@ -126,6 +130,9 @@ private:
double m_appendWindowStart;
double m_appendWindowEnd;
+ // Tracks whether the first initialization segment has been received.
+ bool m_firstInitializationSegment;
+
Vector<unsigned char> m_pendingAppendData;
size_t m_pendingAppendDataOffset;
AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner;

Powered by Google App Engine
This is Rietveld 408576698