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

Side by Side Diff: Source/modules/mediasource/SourceBuffer.h

Issue 754463008: MSE: Implement SourceBuffer.trackDefaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Implement_TrackDefaultList_object
Patch Set: Created 6 years 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SourceBuffer_h 31 #ifndef SourceBuffer_h
32 #define SourceBuffer_h 32 #define SourceBuffer_h
33 33
34 #include "core/dom/ActiveDOMObject.h" 34 #include "core/dom/ActiveDOMObject.h"
35 #include "core/fileapi/FileReaderLoaderClient.h" 35 #include "core/fileapi/FileReaderLoaderClient.h"
36 #include "modules/EventTargetModules.h" 36 #include "modules/EventTargetModules.h"
37 #include "modules/mediasource/TrackDefaultList.h"
37 #include "platform/AsyncMethodRunner.h" 38 #include "platform/AsyncMethodRunner.h"
38 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
39 #include "public/platform/WebSourceBufferClient.h" 40 #include "public/platform/WebSourceBufferClient.h"
40 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
41 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class DOMArrayBuffer; 46 class DOMArrayBuffer;
46 class DOMArrayBufferView; 47 class DOMArrayBufferView;
(...skipping 26 matching lines...) Expand all
73 void appendBuffer(PassRefPtr<DOMArrayBuffer> data, ExceptionState&); 74 void appendBuffer(PassRefPtr<DOMArrayBuffer> data, ExceptionState&);
74 void appendBuffer(PassRefPtr<DOMArrayBufferView> data, ExceptionState&); 75 void appendBuffer(PassRefPtr<DOMArrayBufferView> data, ExceptionState&);
75 void appendStream(PassRefPtrWillBeRawPtr<Stream>, ExceptionState&); 76 void appendStream(PassRefPtrWillBeRawPtr<Stream>, ExceptionState&);
76 void appendStream(PassRefPtrWillBeRawPtr<Stream>, unsigned long long maxSize , ExceptionState&); 77 void appendStream(PassRefPtrWillBeRawPtr<Stream>, unsigned long long maxSize , ExceptionState&);
77 void abort(ExceptionState&); 78 void abort(ExceptionState&);
78 void remove(double start, double end, ExceptionState&); 79 void remove(double start, double end, ExceptionState&);
79 double appendWindowStart() const; 80 double appendWindowStart() const;
80 void setAppendWindowStart(double, ExceptionState&); 81 void setAppendWindowStart(double, ExceptionState&);
81 double appendWindowEnd() const; 82 double appendWindowEnd() const;
82 void setAppendWindowEnd(double, ExceptionState&); 83 void setAppendWindowEnd(double, ExceptionState&);
84 TrackDefaultList* trackDefaults() const { return m_trackDefaults.get(); }
85 void setTrackDefaults(TrackDefaultList*, ExceptionState&);
83 86
84 void abortIfUpdating(); 87 void abortIfUpdating();
85 void removedFromMediaSource(); 88 void removedFromMediaSource();
86 89
87 // ActiveDOMObject interface 90 // ActiveDOMObject interface
88 virtual bool hasPendingActivity() const override; 91 virtual bool hasPendingActivity() const override;
89 virtual void suspend() override; 92 virtual void suspend() override;
90 virtual void resume() override; 93 virtual void resume() override;
91 virtual void stop() override; 94 virtual void stop() override;
92 95
(...skipping 23 matching lines...) Expand all
116 void clearAppendStreamState(); 119 void clearAppendStreamState();
117 120
118 // FileReaderLoaderClient interface 121 // FileReaderLoaderClient interface
119 virtual void didStartLoading() override; 122 virtual void didStartLoading() override;
120 virtual void didReceiveDataForClient(const char* data, unsigned dataLength) override; 123 virtual void didReceiveDataForClient(const char* data, unsigned dataLength) override;
121 virtual void didFinishLoading() override; 124 virtual void didFinishLoading() override;
122 virtual void didFail(FileError::ErrorCode) override; 125 virtual void didFail(FileError::ErrorCode) override;
123 126
124 OwnPtr<WebSourceBuffer> m_webSourceBuffer; 127 OwnPtr<WebSourceBuffer> m_webSourceBuffer;
125 Member<MediaSource> m_source; 128 Member<MediaSource> m_source;
129 Member<TrackDefaultList> m_trackDefaults;
126 GenericEventQueue* m_asyncEventQueue; 130 GenericEventQueue* m_asyncEventQueue;
127 131
128 AtomicString m_mode; 132 AtomicString m_mode;
129 bool m_updating; 133 bool m_updating;
130 double m_timestampOffset; 134 double m_timestampOffset;
131 double m_appendWindowStart; 135 double m_appendWindowStart;
132 double m_appendWindowEnd; 136 double m_appendWindowEnd;
133 bool m_firstInitializationSegmentReceived; 137 bool m_firstInitializationSegmentReceived;
134 138
135 Vector<unsigned char> m_pendingAppendData; 139 Vector<unsigned char> m_pendingAppendData;
136 size_t m_pendingAppendDataOffset; 140 size_t m_pendingAppendDataOffset;
137 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; 141 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner;
138 142
139 double m_pendingRemoveStart; 143 double m_pendingRemoveStart;
140 double m_pendingRemoveEnd; 144 double m_pendingRemoveEnd;
141 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; 145 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner;
142 146
143 bool m_streamMaxSizeValid; 147 bool m_streamMaxSizeValid;
144 unsigned long long m_streamMaxSize; 148 unsigned long long m_streamMaxSize;
145 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; 149 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner;
146 RefPtrWillBeMember<Stream> m_stream; 150 RefPtrWillBeMember<Stream> m_stream;
147 OwnPtr<FileReaderLoader> m_loader; 151 OwnPtr<FileReaderLoader> m_loader;
148 }; 152 };
149 153
150 } // namespace blink 154 } // namespace blink
151 155
152 #endif // SourceBuffer_h 156 #endif // SourceBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698