| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/bitstream_buffer.h" | 5 #include "media/base/bitstream_buffer.h" |
| 6 | 6 |
| 7 namespace media { | 7 namespace media { |
| 8 | 8 |
| 9 BitstreamBuffer::BitstreamBuffer(int32 id, | 9 BitstreamBuffer::BitstreamBuffer(int32 id, |
| 10 base::SharedMemoryHandle handle, | 10 base::SharedMemoryHandle handle, |
| 11 size_t size) | 11 size_t size) |
| 12 : id_(id), | 12 : BitstreamBuffer(id, handle, size, 0, kNoTimestamp()) {} |
| 13 handle_(handle), | 13 |
| 14 size_(size), | 14 BitstreamBuffer::BitstreamBuffer(int32 id, |
| 15 presentation_timestamp_(kNoTimestamp()) {} | 15 base::SharedMemoryHandle handle, |
| 16 size_t size, |
| 17 off_t offset) |
| 18 : BitstreamBuffer(id, handle, size, offset, kNoTimestamp()) {} |
| 16 | 19 |
| 17 BitstreamBuffer::BitstreamBuffer(int32 id, | 20 BitstreamBuffer::BitstreamBuffer(int32 id, |
| 18 base::SharedMemoryHandle handle, | 21 base::SharedMemoryHandle handle, |
| 19 size_t size, | 22 size_t size, |
| 20 base::TimeDelta presentation_timestamp) | 23 base::TimeDelta presentation_timestamp) |
| 24 : BitstreamBuffer(id, handle, size, 0, presentation_timestamp) {} |
| 25 |
| 26 BitstreamBuffer::BitstreamBuffer(int32 id, |
| 27 base::SharedMemoryHandle handle, |
| 28 size_t size, |
| 29 off_t offset, |
| 30 base::TimeDelta presentation_timestamp) |
| 21 : id_(id), | 31 : id_(id), |
| 22 handle_(handle), | 32 handle_(handle), |
| 23 size_(size), | 33 size_(size), |
| 34 offset_(offset), |
| 24 presentation_timestamp_(presentation_timestamp) {} | 35 presentation_timestamp_(presentation_timestamp) {} |
| 25 | 36 |
| 26 BitstreamBuffer::~BitstreamBuffer() {} | 37 BitstreamBuffer::~BitstreamBuffer() {} |
| 27 | 38 |
| 28 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { | 39 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { |
| 29 key_id_ = decrypt_config.key_id(); | 40 key_id_ = decrypt_config.key_id(); |
| 30 iv_ = decrypt_config.iv(); | 41 iv_ = decrypt_config.iv(); |
| 31 subsamples_ = decrypt_config.subsamples(); | 42 subsamples_ = decrypt_config.subsamples(); |
| 32 } | 43 } |
| 33 | 44 |
| 34 } // namespace media | 45 } // namespace media |
| OLD | NEW |