| 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& exception_state) { | 355 ExceptionState& exception_state) { |
| 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(), exception_state); | 360 data->ByteLength(), exception_state); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void SourceBuffer::appendBuffer(DOMArrayBufferView* data, | 363 void SourceBuffer::appendBuffer(NotShared<DOMArrayBufferView> data, |
| 364 ExceptionState& exception_state) { | 364 ExceptionState& exception_state) { |
| 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(), exception_state); | 370 static_cast<const unsigned char*>(data.View()->BaseAddress()), |
| 371 data.View()->byteLength(), exception_state); |
| 370 } | 372 } |
| 371 | 373 |
| 372 void SourceBuffer::abort(ExceptionState& exception_state) { | 374 void SourceBuffer::abort(ExceptionState& exception_state) { |
| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 visitor->Trace(async_event_queue_); | 1306 visitor->Trace(async_event_queue_); |
| 1305 visitor->Trace(append_buffer_async_part_runner_); | 1307 visitor->Trace(append_buffer_async_part_runner_); |
| 1306 visitor->Trace(remove_async_part_runner_); | 1308 visitor->Trace(remove_async_part_runner_); |
| 1307 visitor->Trace(audio_tracks_); | 1309 visitor->Trace(audio_tracks_); |
| 1308 visitor->Trace(video_tracks_); | 1310 visitor->Trace(video_tracks_); |
| 1309 EventTargetWithInlineData::Trace(visitor); | 1311 EventTargetWithInlineData::Trace(visitor); |
| 1310 SuspendableObject::Trace(visitor); | 1312 SuspendableObject::Trace(visitor); |
| 1311 } | 1313 } |
| 1312 | 1314 |
| 1313 } // namespace blink | 1315 } // namespace blink |
| OLD | NEW |