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