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