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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 namespace WebCore { | 48 namespace WebCore { |
49 | 49 |
50 class ExceptionState; | 50 class ExceptionState; |
51 class FileReaderLoader; | 51 class FileReaderLoader; |
52 class GenericEventQueue; | 52 class GenericEventQueue; |
53 class MediaSource; | 53 class MediaSource; |
54 class Stream; | 54 class Stream; |
55 class TimeRanges; | 55 class TimeRanges; |
56 | 56 |
57 class SourceBuffer FINAL : public RefCountedWillBeRefCountedGarbageCollected<Sou
rceBuffer>, public ActiveDOMObject, public EventTargetWithInlineData, public Scr
iptWrappable, public FileReaderLoaderClient { | 57 class SourceBuffer FINAL : public RefCountedGarbageCollectedWillBeGarbageCollect
edFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineD
ata, public ScriptWrappable, public FileReaderLoaderClient { |
58 REFCOUNTED_EVENT_TARGET(SourceBuffer); | 58 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBuffer>); |
59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); | 59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); |
60 public: | 60 public: |
61 static PassRefPtrWillBeRawPtr<SourceBuffer> create(PassOwnPtr<blink::WebSour
ceBuffer>, MediaSource*, GenericEventQueue*); | 61 static SourceBuffer* create(PassOwnPtr<blink::WebSourceBuffer>, MediaSource*
, GenericEventQueue*); |
62 static const AtomicString& segmentsKeyword(); | 62 static const AtomicString& segmentsKeyword(); |
63 static const AtomicString& sequenceKeyword(); | 63 static const AtomicString& sequenceKeyword(); |
64 | 64 |
65 virtual ~SourceBuffer(); | 65 virtual ~SourceBuffer(); |
66 | 66 |
67 // SourceBuffer.idl methods | 67 // SourceBuffer.idl methods |
68 const AtomicString& mode() const { return m_mode; } | 68 const AtomicString& mode() const { return m_mode; } |
69 void setMode(const AtomicString&, ExceptionState&); | 69 void setMode(const AtomicString&, ExceptionState&); |
70 bool updating() const { return m_updating; } | 70 bool updating() const { return m_updating; } |
71 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; | 71 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void appendStreamDone(bool success); | 113 void appendStreamDone(bool success); |
114 void clearAppendStreamState(); | 114 void clearAppendStreamState(); |
115 | 115 |
116 // FileReaderLoaderClient interface | 116 // FileReaderLoaderClient interface |
117 virtual void didStartLoading() OVERRIDE; | 117 virtual void didStartLoading() OVERRIDE; |
118 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; | 118 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; |
119 virtual void didFinishLoading() OVERRIDE; | 119 virtual void didFinishLoading() OVERRIDE; |
120 virtual void didFail(FileError::ErrorCode) OVERRIDE; | 120 virtual void didFail(FileError::ErrorCode) OVERRIDE; |
121 | 121 |
122 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; | 122 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; |
123 RawPtrWillBeMember<MediaSource> m_source; | 123 Member<MediaSource> m_source; |
124 GenericEventQueue* m_asyncEventQueue; | 124 GenericEventQueue* m_asyncEventQueue; |
125 | 125 |
126 AtomicString m_mode; | 126 AtomicString m_mode; |
127 bool m_updating; | 127 bool m_updating; |
128 double m_timestampOffset; | 128 double m_timestampOffset; |
129 double m_appendWindowStart; | 129 double m_appendWindowStart; |
130 double m_appendWindowEnd; | 130 double m_appendWindowEnd; |
131 | 131 |
132 Vector<unsigned char> m_pendingAppendData; | 132 Vector<unsigned char> m_pendingAppendData; |
133 size_t m_pendingAppendDataOffset; | 133 size_t m_pendingAppendDataOffset; |
134 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; | 134 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; |
135 | 135 |
136 double m_pendingRemoveStart; | 136 double m_pendingRemoveStart; |
137 double m_pendingRemoveEnd; | 137 double m_pendingRemoveEnd; |
138 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; | 138 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; |
139 | 139 |
140 bool m_streamMaxSizeValid; | 140 bool m_streamMaxSizeValid; |
141 unsigned long long m_streamMaxSize; | 141 unsigned long long m_streamMaxSize; |
142 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; | 142 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; |
143 RefPtrWillBeMember<Stream> m_stream; | 143 RefPtrWillBeMember<Stream> m_stream; |
144 OwnPtr<FileReaderLoader> m_loader; | 144 OwnPtr<FileReaderLoader> m_loader; |
145 }; | 145 }; |
146 | 146 |
147 } // namespace WebCore | 147 } // namespace WebCore |
148 | 148 |
149 #endif | 149 #endif |
OLD | NEW |