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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 : public RefCounted<SourceBuffer>, public ActiveDOMObject, pu
blic EventTargetWithInlineData, public ScriptWrappable, public FileReaderLoaderC
lient { | 60 class SourceBuffer : public RefCounted<SourceBuffer>, public ActiveDOMObject, pu
blic EventTargetWithInlineData, public ScriptWrappable, public FileReaderLoaderC
lient { |
61 REFCOUNTED_EVENT_TARGET(SourceBuffer); | 61 REFCOUNTED_EVENT_TARGET(SourceBuffer); |
62 public: | 62 public: |
63 static PassRefPtr<SourceBuffer> create(PassOwnPtr<blink::WebSourceBuffer>, M
ediaSource*, GenericEventQueue*); | 63 static PassRefPtr<SourceBuffer> create(PassOwnPtr<blink::WebSourceBuffer>, M
ediaSource*, GenericEventQueue*); |
| 64 static const AtomicString& segmentsKeyword(); |
| 65 static const AtomicString& sequenceKeyword(); |
64 | 66 |
65 virtual ~SourceBuffer(); | 67 virtual ~SourceBuffer(); |
66 | 68 |
67 // SourceBuffer.idl methods | 69 // SourceBuffer.idl methods |
| 70 const AtomicString& mode() const { return m_mode; } |
| 71 void setMode(const AtomicString&, ExceptionState&); |
68 bool updating() const { return m_updating; } | 72 bool updating() const { return m_updating; } |
69 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; | 73 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; |
70 double timestampOffset() const; | 74 double timestampOffset() const; |
71 void setTimestampOffset(double, ExceptionState&); | 75 void setTimestampOffset(double, ExceptionState&); |
72 void appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionState&); | 76 void appendBuffer(PassRefPtr<ArrayBuffer> data, ExceptionState&); |
73 void appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionState&); | 77 void appendBuffer(PassRefPtr<ArrayBufferView> data, ExceptionState&); |
74 void appendStream(PassRefPtr<Stream>, ExceptionState&); | 78 void appendStream(PassRefPtr<Stream>, ExceptionState&); |
75 void appendStream(PassRefPtr<Stream>, unsigned long long maxSize, ExceptionS
tate&); | 79 void appendStream(PassRefPtr<Stream>, unsigned long long maxSize, ExceptionS
tate&); |
76 void abort(ExceptionState&); | 80 void abort(ExceptionState&); |
77 void remove(double start, double end, ExceptionState&); | 81 void remove(double start, double end, ExceptionState&); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // FileReaderLoaderClient interface | 116 // FileReaderLoaderClient interface |
113 virtual void didStartLoading() OVERRIDE; | 117 virtual void didStartLoading() OVERRIDE; |
114 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; | 118 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; |
115 virtual void didFinishLoading() OVERRIDE; | 119 virtual void didFinishLoading() OVERRIDE; |
116 virtual void didFail(FileError::ErrorCode) OVERRIDE; | 120 virtual void didFail(FileError::ErrorCode) OVERRIDE; |
117 | 121 |
118 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; | 122 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; |
119 MediaSource* m_source; | 123 MediaSource* m_source; |
120 GenericEventQueue* m_asyncEventQueue; | 124 GenericEventQueue* m_asyncEventQueue; |
121 | 125 |
| 126 AtomicString m_mode; |
122 bool m_updating; | 127 bool m_updating; |
123 double m_timestampOffset; | 128 double m_timestampOffset; |
124 double m_appendWindowStart; | 129 double m_appendWindowStart; |
125 double m_appendWindowEnd; | 130 double m_appendWindowEnd; |
126 | 131 |
127 Vector<unsigned char> m_pendingAppendData; | 132 Vector<unsigned char> m_pendingAppendData; |
128 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; | 133 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; |
129 | 134 |
130 double m_pendingRemoveStart; | 135 double m_pendingRemoveStart; |
131 double m_pendingRemoveEnd; | 136 double m_pendingRemoveEnd; |
132 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; | 137 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; |
133 | 138 |
134 bool m_streamMaxSizeValid; | 139 bool m_streamMaxSizeValid; |
135 unsigned long long m_streamMaxSize; | 140 unsigned long long m_streamMaxSize; |
136 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; | 141 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; |
137 RefPtr<Stream> m_stream; | 142 RefPtr<Stream> m_stream; |
138 OwnPtr<FileReaderLoader> m_loader; | 143 OwnPtr<FileReaderLoader> m_loader; |
139 }; | 144 }; |
140 | 145 |
141 } // namespace WebCore | 146 } // namespace WebCore |
142 | 147 |
143 #endif | 148 #endif |
OLD | NEW |