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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class ExceptionState; | 46 class ExceptionState; |
47 class FileReaderLoader; | 47 class FileReaderLoader; |
48 class GenericEventQueue; | 48 class GenericEventQueue; |
49 class MediaSource; | 49 class MediaSource; |
50 class Stream; | 50 class Stream; |
51 class TimeRanges; | 51 class TimeRanges; |
52 class WebSourceBuffer; | 52 class WebSourceBuffer; |
53 | 53 |
54 class SourceBuffer FINAL : public RefCountedGarbageCollectedWillBeGarbageCollect
edFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineD
ata, public FileReaderLoaderClient, public WebSourceBufferClient { | 54 class SourceBuffer final : public RefCountedGarbageCollectedWillBeGarbageCollect
edFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineD
ata, public FileReaderLoaderClient, public WebSourceBufferClient { |
55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBuffer>); | 55 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBuffer>); |
56 DEFINE_WRAPPERTYPEINFO(); | 56 DEFINE_WRAPPERTYPEINFO(); |
57 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); | 57 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); |
58 public: | 58 public: |
59 static SourceBuffer* create(PassOwnPtr<WebSourceBuffer>, MediaSource*, Gener
icEventQueue*); | 59 static SourceBuffer* create(PassOwnPtr<WebSourceBuffer>, MediaSource*, Gener
icEventQueue*); |
60 static const AtomicString& segmentsKeyword(); | 60 static const AtomicString& segmentsKeyword(); |
61 static const AtomicString& sequenceKeyword(); | 61 static const AtomicString& sequenceKeyword(); |
62 | 62 |
63 virtual ~SourceBuffer(); | 63 virtual ~SourceBuffer(); |
64 | 64 |
(...skipping 12 matching lines...) Expand all Loading... |
77 void remove(double start, double end, ExceptionState&); | 77 void remove(double start, double end, ExceptionState&); |
78 double appendWindowStart() const; | 78 double appendWindowStart() const; |
79 void setAppendWindowStart(double, ExceptionState&); | 79 void setAppendWindowStart(double, ExceptionState&); |
80 double appendWindowEnd() const; | 80 double appendWindowEnd() const; |
81 void setAppendWindowEnd(double, ExceptionState&); | 81 void setAppendWindowEnd(double, ExceptionState&); |
82 | 82 |
83 void abortIfUpdating(); | 83 void abortIfUpdating(); |
84 void removedFromMediaSource(); | 84 void removedFromMediaSource(); |
85 | 85 |
86 // ActiveDOMObject interface | 86 // ActiveDOMObject interface |
87 virtual bool hasPendingActivity() const OVERRIDE; | 87 virtual bool hasPendingActivity() const override; |
88 virtual void suspend() OVERRIDE; | 88 virtual void suspend() override; |
89 virtual void resume() OVERRIDE; | 89 virtual void resume() override; |
90 virtual void stop() OVERRIDE; | 90 virtual void stop() override; |
91 | 91 |
92 // EventTarget interface | 92 // EventTarget interface |
93 virtual ExecutionContext* executionContext() const OVERRIDE; | 93 virtual ExecutionContext* executionContext() const override; |
94 virtual const AtomicString& interfaceName() const OVERRIDE; | 94 virtual const AtomicString& interfaceName() const override; |
95 | 95 |
96 // WebSourceBufferClient interface | 96 // WebSourceBufferClient interface |
97 virtual void initializationSegmentReceived() OVERRIDE; | 97 virtual void initializationSegmentReceived() override; |
98 | 98 |
99 virtual void trace(Visitor*) OVERRIDE; | 99 virtual void trace(Visitor*) override; |
100 | 100 |
101 private: | 101 private: |
102 SourceBuffer(PassOwnPtr<WebSourceBuffer>, MediaSource*, GenericEventQueue*); | 102 SourceBuffer(PassOwnPtr<WebSourceBuffer>, MediaSource*, GenericEventQueue*); |
103 | 103 |
104 bool isRemoved() const; | 104 bool isRemoved() const; |
105 void scheduleEvent(const AtomicString& eventName); | 105 void scheduleEvent(const AtomicString& eventName); |
106 | 106 |
107 void appendBufferInternal(const unsigned char*, unsigned, ExceptionState&); | 107 void appendBufferInternal(const unsigned char*, unsigned, ExceptionState&); |
108 void appendBufferAsyncPart(); | 108 void appendBufferAsyncPart(); |
109 | 109 |
110 void removeAsyncPart(); | 110 void removeAsyncPart(); |
111 | 111 |
112 void appendStreamInternal(PassRefPtrWillBeRawPtr<Stream>, ExceptionState&); | 112 void appendStreamInternal(PassRefPtrWillBeRawPtr<Stream>, ExceptionState&); |
113 void appendStreamAsyncPart(); | 113 void appendStreamAsyncPart(); |
114 void appendStreamDone(bool success); | 114 void appendStreamDone(bool success); |
115 void clearAppendStreamState(); | 115 void clearAppendStreamState(); |
116 | 116 |
117 // FileReaderLoaderClient interface | 117 // FileReaderLoaderClient interface |
118 virtual void didStartLoading() OVERRIDE; | 118 virtual void didStartLoading() override; |
119 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; | 119 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
override; |
120 virtual void didFinishLoading() OVERRIDE; | 120 virtual void didFinishLoading() override; |
121 virtual void didFail(FileError::ErrorCode) OVERRIDE; | 121 virtual void didFail(FileError::ErrorCode) override; |
122 | 122 |
123 OwnPtr<WebSourceBuffer> m_webSourceBuffer; | 123 OwnPtr<WebSourceBuffer> m_webSourceBuffer; |
124 Member<MediaSource> m_source; | 124 Member<MediaSource> m_source; |
125 GenericEventQueue* m_asyncEventQueue; | 125 GenericEventQueue* m_asyncEventQueue; |
126 | 126 |
127 AtomicString m_mode; | 127 AtomicString m_mode; |
128 bool m_updating; | 128 bool m_updating; |
129 double m_timestampOffset; | 129 double m_timestampOffset; |
130 double m_appendWindowStart; | 130 double m_appendWindowStart; |
131 double m_appendWindowEnd; | 131 double m_appendWindowEnd; |
(...skipping 10 matching lines...) Expand all Loading... |
142 bool m_streamMaxSizeValid; | 142 bool m_streamMaxSizeValid; |
143 unsigned long long m_streamMaxSize; | 143 unsigned long long m_streamMaxSize; |
144 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; | 144 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; |
145 RefPtrWillBeMember<Stream> m_stream; | 145 RefPtrWillBeMember<Stream> m_stream; |
146 OwnPtr<FileReaderLoader> m_loader; | 146 OwnPtr<FileReaderLoader> m_loader; |
147 }; | 147 }; |
148 | 148 |
149 } // namespace blink | 149 } // namespace blink |
150 | 150 |
151 #endif // SourceBuffer_h | 151 #endif // SourceBuffer_h |
OLD | NEW |