| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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 "core/html/track/AudioTrackList.h" |
| 37 #include "core/html/track/VideoTrackList.h" |
| 36 #include "modules/EventTargetModules.h" | 38 #include "modules/EventTargetModules.h" |
| 37 #include "modules/mediasource/TrackDefaultList.h" | 39 #include "modules/mediasource/TrackDefaultList.h" |
| 38 #include "platform/AsyncMethodRunner.h" | 40 #include "platform/AsyncMethodRunner.h" |
| 39 #include "platform/weborigin/KURL.h" | 41 #include "platform/weborigin/KURL.h" |
| 40 #include "public/platform/WebSourceBufferClient.h" | 42 #include "public/platform/WebSourceBufferClient.h" |
| 41 #include "wtf/RefCounted.h" | 43 #include "wtf/RefCounted.h" |
| 42 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 43 | 45 |
| 44 namespace blink { | 46 namespace blink { |
| 45 | 47 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 68 | 70 |
| 69 ~SourceBuffer() override; | 71 ~SourceBuffer() override; |
| 70 | 72 |
| 71 // SourceBuffer.idl methods | 73 // SourceBuffer.idl methods |
| 72 const AtomicString& mode() const { return m_mode; } | 74 const AtomicString& mode() const { return m_mode; } |
| 73 void setMode(const AtomicString&, ExceptionState&); | 75 void setMode(const AtomicString&, ExceptionState&); |
| 74 bool updating() const { return m_updating; } | 76 bool updating() const { return m_updating; } |
| 75 TimeRanges* buffered(ExceptionState&) const; | 77 TimeRanges* buffered(ExceptionState&) const; |
| 76 double timestampOffset() const; | 78 double timestampOffset() const; |
| 77 void setTimestampOffset(double, ExceptionState&); | 79 void setTimestampOffset(double, ExceptionState&); |
| 80 AudioTrackList& audioTracks(); |
| 81 VideoTrackList& videoTracks(); |
| 78 void appendBuffer(PassRefPtr<DOMArrayBuffer> data, ExceptionState&); | 82 void appendBuffer(PassRefPtr<DOMArrayBuffer> data, ExceptionState&); |
| 79 void appendBuffer(PassRefPtr<DOMArrayBufferView> data, ExceptionState&); | 83 void appendBuffer(PassRefPtr<DOMArrayBufferView> data, ExceptionState&); |
| 80 void appendStream(Stream*, ExceptionState&); | 84 void appendStream(Stream*, ExceptionState&); |
| 81 void appendStream(Stream*, unsigned long long maxSize, ExceptionState&); | 85 void appendStream(Stream*, unsigned long long maxSize, ExceptionState&); |
| 82 void abort(ExceptionState&); | 86 void abort(ExceptionState&); |
| 83 void remove(double start, double end, ExceptionState&); | 87 void remove(double start, double end, ExceptionState&); |
| 84 double appendWindowStart() const; | 88 double appendWindowStart() const; |
| 85 void setAppendWindowStart(double, ExceptionState&); | 89 void setAppendWindowStart(double, ExceptionState&); |
| 86 double appendWindowEnd() const; | 90 double appendWindowEnd() const; |
| 87 void setAppendWindowEnd(double, ExceptionState&); | 91 void setAppendWindowEnd(double, ExceptionState&); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 Member<TrackDefaultList> m_trackDefaults; | 142 Member<TrackDefaultList> m_trackDefaults; |
| 139 RawPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; | 143 RawPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; |
| 140 | 144 |
| 141 AtomicString m_mode; | 145 AtomicString m_mode; |
| 142 bool m_updating; | 146 bool m_updating; |
| 143 double m_timestampOffset; | 147 double m_timestampOffset; |
| 144 double m_appendWindowStart; | 148 double m_appendWindowStart; |
| 145 double m_appendWindowEnd; | 149 double m_appendWindowEnd; |
| 146 bool m_firstInitializationSegmentReceived; | 150 bool m_firstInitializationSegmentReceived; |
| 147 | 151 |
| 152 Member<AudioTrackList> m_audioTracks; |
| 153 Member<VideoTrackList> m_videoTracks; |
| 154 |
| 148 Vector<unsigned char> m_pendingAppendData; | 155 Vector<unsigned char> m_pendingAppendData; |
| 149 size_t m_pendingAppendDataOffset; | 156 size_t m_pendingAppendDataOffset; |
| 150 Member<AsyncMethodRunner<SourceBuffer>> m_appendBufferAsyncPartRunner; | 157 Member<AsyncMethodRunner<SourceBuffer>> m_appendBufferAsyncPartRunner; |
| 151 | 158 |
| 152 double m_pendingRemoveStart; | 159 double m_pendingRemoveStart; |
| 153 double m_pendingRemoveEnd; | 160 double m_pendingRemoveEnd; |
| 154 Member<AsyncMethodRunner<SourceBuffer>> m_removeAsyncPartRunner; | 161 Member<AsyncMethodRunner<SourceBuffer>> m_removeAsyncPartRunner; |
| 155 | 162 |
| 156 bool m_streamMaxSizeValid; | 163 bool m_streamMaxSizeValid; |
| 157 unsigned long long m_streamMaxSize; | 164 unsigned long long m_streamMaxSize; |
| 158 Member<AsyncMethodRunner<SourceBuffer>> m_appendStreamAsyncPartRunner; | 165 Member<AsyncMethodRunner<SourceBuffer>> m_appendStreamAsyncPartRunner; |
| 159 Member<Stream> m_stream; | 166 Member<Stream> m_stream; |
| 160 OwnPtr<FileReaderLoader> m_loader; | 167 OwnPtr<FileReaderLoader> m_loader; |
| 161 }; | 168 }; |
| 162 | 169 |
| 163 } // namespace blink | 170 } // namespace blink |
| 164 | 171 |
| 165 #endif // SourceBuffer_h | 172 #endif // SourceBuffer_h |
| OLD | NEW |