OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // an InvalidStateError exception and abort these steps. | 129 // an InvalidStateError exception and abort these steps. |
130 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) | 130 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) |
131 return; | 131 return; |
132 | 132 |
133 // 5. If the readyState attribute of media source is in the "ended" state th
en run the following steps: | 133 // 5. If the readyState attribute of media source is in the "ended" state th
en run the following steps: |
134 // 5.1. Set the readyState attribute of media source to "open" | 134 // 5.1. Set the readyState attribute of media source to "open" |
135 // 5.2. Queue a task to fire a simple event named sourceopen at media source
. | 135 // 5.2. Queue a task to fire a simple event named sourceopen at media source
. |
136 m_source->openIfInEndedState(); | 136 m_source->openIfInEndedState(); |
137 | 137 |
138 // Steps 6 & beyond are handled by m_webSourceBuffer. | 138 // Steps 6 & beyond are handled by m_webSourceBuffer. |
139 m_webSourceBuffer->append(data->data(), data->length()); | 139 |
| 140 // Use null for |timestampOffset| parameter because the prefixed API does no
t allow appends |
| 141 // to update timestampOffset. |
| 142 m_webSourceBuffer->append(data->data(), data->length(), 0); |
140 } | 143 } |
141 | 144 |
142 void WebKitSourceBuffer::abort(ExceptionState& exceptionState) | 145 void WebKitSourceBuffer::abort(ExceptionState& exceptionState) |
143 { | 146 { |
144 // Section 3.2 abort() method steps. | 147 // Section 3.2 abort() method steps. |
145 // 1. If this object has been removed from the sourceBuffers attribute of th
e parent media source | 148 // 1. If this object has been removed from the sourceBuffers attribute of th
e parent media source |
146 // then throw an InvalidStateError exception and abort these steps. | 149 // then throw an InvalidStateError exception and abort these steps. |
147 // 2. If the readyState attribute of the parent media source is not in the "
open" state | 150 // 2. If the readyState attribute of the parent media source is not in the "
open" state |
148 // then throw an InvalidStateError exception and abort these steps. | 151 // then throw an InvalidStateError exception and abort these steps. |
149 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) | 152 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) |
(...skipping 20 matching lines...) Expand all Loading... |
170 { | 173 { |
171 return !m_source; | 174 return !m_source; |
172 } | 175 } |
173 | 176 |
174 void WebKitSourceBuffer::trace(Visitor* visitor) | 177 void WebKitSourceBuffer::trace(Visitor* visitor) |
175 { | 178 { |
176 visitor->trace(m_source); | 179 visitor->trace(m_source); |
177 } | 180 } |
178 | 181 |
179 } // namespace WebCore | 182 } // namespace WebCore |
OLD | NEW |