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() |
| 10 : id_(-1), size_(0), presentation_timestamp_(kNoTimestamp()) {} |
| 11 |
9 BitstreamBuffer::BitstreamBuffer(int32_t id, | 12 BitstreamBuffer::BitstreamBuffer(int32_t id, |
10 base::SharedMemoryHandle handle, | 13 base::SharedMemoryHandle handle, |
11 size_t size) | 14 size_t size) |
12 : id_(id), | 15 : id_(id), |
13 handle_(handle), | 16 handle_(handle), |
14 size_(size), | 17 size_(size), |
15 presentation_timestamp_(kNoTimestamp()) {} | 18 presentation_timestamp_(kNoTimestamp()) {} |
16 | 19 |
17 BitstreamBuffer::BitstreamBuffer(int32_t id, | 20 BitstreamBuffer::BitstreamBuffer(int32_t 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) |
21 : id_(id), | 24 : id_(id), |
22 handle_(handle), | 25 handle_(handle), |
23 size_(size), | 26 size_(size), |
24 presentation_timestamp_(presentation_timestamp) {} | 27 presentation_timestamp_(presentation_timestamp) {} |
25 | 28 |
26 BitstreamBuffer::BitstreamBuffer(const BitstreamBuffer& other) = default; | 29 BitstreamBuffer::BitstreamBuffer(const BitstreamBuffer& other) = default; |
27 | 30 |
28 BitstreamBuffer::~BitstreamBuffer() {} | 31 BitstreamBuffer::~BitstreamBuffer() {} |
29 | 32 |
30 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { | 33 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { |
31 key_id_ = decrypt_config.key_id(); | 34 key_id_ = decrypt_config.key_id(); |
32 iv_ = decrypt_config.iv(); | 35 iv_ = decrypt_config.iv(); |
33 subsamples_ = decrypt_config.subsamples(); | 36 subsamples_ = decrypt_config.subsamples(); |
34 } | 37 } |
35 | 38 |
36 } // namespace media | 39 } // namespace media |
OLD | NEW |