| 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 17 matching lines...) Expand all Loading... |
| 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 MediaSource_h | 31 #ifndef MediaSource_h |
| 32 #define MediaSource_h | 32 #define MediaSource_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/ActiveDOMObject.h" |
| 36 #include "core/events/EventTarget.h" | 36 #include "core/events/EventTarget.h" |
| 37 #include "core/html/HTMLMediaSource.h" | 37 #include "core/html/HTMLMediaSource.h" |
| 38 #include "core/html/TimeRanges.h" |
| 38 #include "core/html/URLRegistry.h" | 39 #include "core/html/URLRegistry.h" |
| 39 #include "modules/mediasource/SourceBuffer.h" | 40 #include "modules/mediasource/SourceBuffer.h" |
| 40 #include "modules/mediasource/SourceBufferList.h" | 41 #include "modules/mediasource/SourceBufferList.h" |
| 41 #include "public/platform/WebMediaSource.h" | 42 #include "public/platform/WebMediaSource.h" |
| 42 #include "wtf/Vector.h" | 43 #include "wtf/Vector.h" |
| 43 #include <memory> | 44 #include <memory> |
| 44 | 45 |
| 45 namespace blink { | 46 namespace blink { |
| 46 | 47 |
| 47 class ExceptionState; | 48 class ExceptionState; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 | 68 |
| 68 // MediaSource.idl methods | 69 // MediaSource.idl methods |
| 69 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } | 70 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } |
| 70 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get()
; } | 71 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get()
; } |
| 71 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&); | 72 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&); |
| 72 void removeSourceBuffer(SourceBuffer*, ExceptionState&); | 73 void removeSourceBuffer(SourceBuffer*, ExceptionState&); |
| 73 void setDuration(double, ExceptionState&); | 74 void setDuration(double, ExceptionState&); |
| 74 const AtomicString& readyState() const { return m_readyState; } | 75 const AtomicString& readyState() const { return m_readyState; } |
| 75 void endOfStream(const AtomicString& error, ExceptionState&); | 76 void endOfStream(const AtomicString& error, ExceptionState&); |
| 76 void endOfStream(ExceptionState&); | 77 void endOfStream(ExceptionState&); |
| 78 void setLiveSeekableRange(double start, double end, ExceptionState&); |
| 79 void clearLiveSeekableRange(ExceptionState&); |
| 80 |
| 77 static bool isTypeSupported(const String& type); | 81 static bool isTypeSupported(const String& type); |
| 78 | 82 |
| 79 // HTMLMediaSource | 83 // HTMLMediaSource |
| 80 bool attachToElement(HTMLMediaElement*) override; | 84 bool attachToElement(HTMLMediaElement*) override; |
| 81 void setWebMediaSourceAndOpen(std::unique_ptr<WebMediaSource>) override; | 85 void setWebMediaSourceAndOpen(std::unique_ptr<WebMediaSource>) override; |
| 82 void close() override; | 86 void close() override; |
| 83 bool isClosed() const override; | 87 bool isClosed() const override; |
| 84 double duration() const override; | 88 double duration() const override; |
| 85 TimeRanges* buffered() const override; | 89 TimeRanges* buffered() const override; |
| 86 TimeRanges* seekable() const override; | 90 TimeRanges* seekable() const override; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void durationChangeAlgorithm(double newDuration); | 131 void durationChangeAlgorithm(double newDuration); |
| 128 | 132 |
| 129 std::unique_ptr<WebMediaSource> m_webMediaSource; | 133 std::unique_ptr<WebMediaSource> m_webMediaSource; |
| 130 AtomicString m_readyState; | 134 AtomicString m_readyState; |
| 131 Member<GenericEventQueue> m_asyncEventQueue; | 135 Member<GenericEventQueue> m_asyncEventQueue; |
| 132 WeakMember<HTMLMediaElement> m_attachedElement; | 136 WeakMember<HTMLMediaElement> m_attachedElement; |
| 133 | 137 |
| 134 Member<SourceBufferList> m_sourceBuffers; | 138 Member<SourceBufferList> m_sourceBuffers; |
| 135 Member<SourceBufferList> m_activeSourceBuffers; | 139 Member<SourceBufferList> m_activeSourceBuffers; |
| 136 | 140 |
| 141 Member<TimeRanges> m_liveSeekableRange; |
| 142 |
| 137 bool m_isAddedToRegistry; | 143 bool m_isAddedToRegistry; |
| 138 }; | 144 }; |
| 139 | 145 |
| 140 } // namespace blink | 146 } // namespace blink |
| 141 | 147 |
| 142 #endif // MediaSource_h | 148 #endif // MediaSource_h |
| OLD | NEW |