| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 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 "bindings/core/v8/ActiveScriptWrappable.h" | 34 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 35 #include "core/dom/ActiveDOMObject.h" | 35 #include "core/dom/SuspendableObject.h" |
| 36 #include "modules/EventTargetModules.h" | 36 #include "modules/EventTargetModules.h" |
| 37 #include "modules/mediasource/TrackDefaultList.h" | 37 #include "modules/mediasource/TrackDefaultList.h" |
| 38 #include "platform/AsyncMethodRunner.h" | 38 #include "platform/AsyncMethodRunner.h" |
| 39 #include "platform/weborigin/KURL.h" | 39 #include "platform/weborigin/KURL.h" |
| 40 #include "public/platform/WebSourceBufferClient.h" | 40 #include "public/platform/WebSourceBufferClient.h" |
| 41 #include "wtf/text/WTFString.h" | 41 #include "wtf/text/WTFString.h" |
| 42 #include <memory> | 42 #include <memory> |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class AudioTrackList; | 46 class AudioTrackList; |
| 47 class DOMArrayBuffer; | 47 class DOMArrayBuffer; |
| 48 class DOMArrayBufferView; | 48 class DOMArrayBufferView; |
| 49 class ExceptionState; | 49 class ExceptionState; |
| 50 class GenericEventQueue; | 50 class GenericEventQueue; |
| 51 class MediaSource; | 51 class MediaSource; |
| 52 class TimeRanges; | 52 class TimeRanges; |
| 53 class VideoTrackList; | 53 class VideoTrackList; |
| 54 class WebSourceBuffer; | 54 class WebSourceBuffer; |
| 55 | 55 |
| 56 class SourceBuffer final : public EventTargetWithInlineData, | 56 class SourceBuffer final : public EventTargetWithInlineData, |
| 57 public ActiveScriptWrappable, | 57 public ActiveScriptWrappable, |
| 58 public ActiveDOMObject, | 58 public SuspendableObject, |
| 59 public WebSourceBufferClient { | 59 public WebSourceBufferClient { |
| 60 USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); | 60 USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); |
| 61 DEFINE_WRAPPERTYPEINFO(); | 61 DEFINE_WRAPPERTYPEINFO(); |
| 62 USING_PRE_FINALIZER(SourceBuffer, dispose); | 62 USING_PRE_FINALIZER(SourceBuffer, dispose); |
| 63 | 63 |
| 64 public: | 64 public: |
| 65 static SourceBuffer* create(std::unique_ptr<WebSourceBuffer>, | 65 static SourceBuffer* create(std::unique_ptr<WebSourceBuffer>, |
| 66 MediaSource*, | 66 MediaSource*, |
| 67 GenericEventQueue*); | 67 GenericEventQueue*); |
| 68 static const AtomicString& segmentsKeyword(); | 68 static const AtomicString& segmentsKeyword(); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 95 | 95 |
| 96 AudioTrackList& audioTracks(); | 96 AudioTrackList& audioTracks(); |
| 97 VideoTrackList& videoTracks(); | 97 VideoTrackList& videoTracks(); |
| 98 | 98 |
| 99 void removedFromMediaSource(); | 99 void removedFromMediaSource(); |
| 100 double highestPresentationTimestamp(); | 100 double highestPresentationTimestamp(); |
| 101 | 101 |
| 102 // ScriptWrappable | 102 // ScriptWrappable |
| 103 bool hasPendingActivity() const final; | 103 bool hasPendingActivity() const final; |
| 104 | 104 |
| 105 // ActiveDOMObject | 105 // SuspendableObject |
| 106 void suspend() override; | 106 void suspend() override; |
| 107 void resume() override; | 107 void resume() override; |
| 108 void contextDestroyed() override; | 108 void contextDestroyed() override; |
| 109 | 109 |
| 110 // EventTarget interface | 110 // EventTarget interface |
| 111 ExecutionContext* getExecutionContext() const override; | 111 ExecutionContext* getExecutionContext() const override; |
| 112 const AtomicString& interfaceName() const override; | 112 const AtomicString& interfaceName() const override; |
| 113 | 113 |
| 114 // WebSourceBufferClient interface | 114 // WebSourceBufferClient interface |
| 115 bool initializationSegmentReceived(const WebVector<MediaTrackInfo>&) override; | 115 bool initializationSegmentReceived(const WebVector<MediaTrackInfo>&) override; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Member<AsyncMethodRunner<SourceBuffer>> m_appendBufferAsyncPartRunner; | 168 Member<AsyncMethodRunner<SourceBuffer>> m_appendBufferAsyncPartRunner; |
| 169 | 169 |
| 170 double m_pendingRemoveStart; | 170 double m_pendingRemoveStart; |
| 171 double m_pendingRemoveEnd; | 171 double m_pendingRemoveEnd; |
| 172 Member<AsyncMethodRunner<SourceBuffer>> m_removeAsyncPartRunner; | 172 Member<AsyncMethodRunner<SourceBuffer>> m_removeAsyncPartRunner; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace blink | 175 } // namespace blink |
| 176 | 176 |
| 177 #endif // SourceBuffer_h | 177 #endif // SourceBuffer_h |
| OLD | NEW |