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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 353 |
354 void SourceBuffer::appendBuffer(DOMArrayBuffer* data, | 354 void SourceBuffer::appendBuffer(DOMArrayBuffer* data, |
355 ExceptionState& exceptionState) { | 355 ExceptionState& exceptionState) { |
356 BLINK_SBLOG << __func__ << " this=" << this << " size=" << data->byteLength(); | 356 BLINK_SBLOG << __func__ << " this=" << this << " size=" << data->byteLength(); |
357 // Section 3.2 appendBuffer() | 357 // Section 3.2 appendBuffer() |
358 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sourc
e.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data | 358 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sourc
e.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data |
359 appendBufferInternal(static_cast<const unsigned char*>(data->data()), | 359 appendBufferInternal(static_cast<const unsigned char*>(data->data()), |
360 data->byteLength(), exceptionState); | 360 data->byteLength(), exceptionState); |
361 } | 361 } |
362 | 362 |
363 void SourceBuffer::appendBuffer(DOMArrayBufferView* data, | 363 void SourceBuffer::appendBuffer(const NotShared<DOMArrayBufferView>& data, |
364 ExceptionState& exceptionState) { | 364 ExceptionState& exceptionState) { |
365 BLINK_SBLOG << __func__ << " this=" << this << " size=" << data->byteLength(); | 365 BLINK_SBLOG << __func__ << " this=" << this |
| 366 << " size=" << data.view()->byteLength(); |
366 // Section 3.2 appendBuffer() | 367 // Section 3.2 appendBuffer() |
367 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sourc
e.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data | 368 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-sourc
e.html#widl-SourceBuffer-appendBuffer-void-ArrayBufferView-data |
368 appendBufferInternal(static_cast<const unsigned char*>(data->baseAddress()), | 369 appendBufferInternal( |
369 data->byteLength(), exceptionState); | 370 static_cast<const unsigned char*>(data.view()->baseAddress()), |
| 371 data.view()->byteLength(), exceptionState); |
370 } | 372 } |
371 | 373 |
372 void SourceBuffer::abort(ExceptionState& exceptionState) { | 374 void SourceBuffer::abort(ExceptionState& exceptionState) { |
373 BLINK_SBLOG << __func__ << " this=" << this; | 375 BLINK_SBLOG << __func__ << " this=" << this; |
374 // http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void | 376 // http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void |
375 // 1. If this object has been removed from the sourceBuffers attribute of the | 377 // 1. If this object has been removed from the sourceBuffers attribute of the |
376 // parent media source then throw an InvalidStateError exception and abort | 378 // parent media source then throw an InvalidStateError exception and abort |
377 // these steps. | 379 // these steps. |
378 // 2. If the readyState attribute of the parent media source is not in the | 380 // 2. If the readyState attribute of the parent media source is not in the |
379 // "open" state then throw an InvalidStateError exception and abort these | 381 // "open" state then throw an InvalidStateError exception and abort these |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 visitor->trace(m_asyncEventQueue); | 1301 visitor->trace(m_asyncEventQueue); |
1300 visitor->trace(m_appendBufferAsyncPartRunner); | 1302 visitor->trace(m_appendBufferAsyncPartRunner); |
1301 visitor->trace(m_removeAsyncPartRunner); | 1303 visitor->trace(m_removeAsyncPartRunner); |
1302 visitor->trace(m_audioTracks); | 1304 visitor->trace(m_audioTracks); |
1303 visitor->trace(m_videoTracks); | 1305 visitor->trace(m_videoTracks); |
1304 EventTargetWithInlineData::trace(visitor); | 1306 EventTargetWithInlineData::trace(visitor); |
1305 SuspendableObject::trace(visitor); | 1307 SuspendableObject::trace(visitor); |
1306 } | 1308 } |
1307 | 1309 |
1308 } // namespace blink | 1310 } // namespace blink |
OLD | NEW |