Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: media/base/bitstream_buffer.cc

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments and rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/bitstream_buffer.h ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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() 9 BitstreamBuffer::BitstreamBuffer()
10 : id_(-1), size_(0), presentation_timestamp_(kNoTimestamp()) {} 10 : BitstreamBuffer(-1, base::SharedMemoryHandle(), 0) {}
11
12 BitstreamBuffer::BitstreamBuffer(int32_t id,
13 base::SharedMemoryHandle handle,
14 size_t size)
15 : id_(id),
16 handle_(handle),
17 size_(size),
18 presentation_timestamp_(kNoTimestamp()) {}
19 11
20 BitstreamBuffer::BitstreamBuffer(int32_t id, 12 BitstreamBuffer::BitstreamBuffer(int32_t id,
21 base::SharedMemoryHandle handle, 13 base::SharedMemoryHandle handle,
22 size_t size, 14 size_t size,
15 off_t offset,
23 base::TimeDelta presentation_timestamp) 16 base::TimeDelta presentation_timestamp)
24 : id_(id), 17 : id_(id),
25 handle_(handle), 18 handle_(handle),
26 size_(size), 19 size_(size),
20 offset_(offset),
27 presentation_timestamp_(presentation_timestamp) {} 21 presentation_timestamp_(presentation_timestamp) {}
28 22
29 BitstreamBuffer::BitstreamBuffer(const BitstreamBuffer& other) = default; 23 BitstreamBuffer::BitstreamBuffer(const BitstreamBuffer& other) = default;
30 24
31 BitstreamBuffer::~BitstreamBuffer() {} 25 BitstreamBuffer::~BitstreamBuffer() {}
32 26
33 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { 27 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) {
34 key_id_ = decrypt_config.key_id(); 28 key_id_ = decrypt_config.key_id();
35 iv_ = decrypt_config.iv(); 29 iv_ = decrypt_config.iv();
36 subsamples_ = decrypt_config.subsamples(); 30 subsamples_ = decrypt_config.subsamples();
37 } 31 }
38 32
39 } // namespace media 33 } // namespace media
OLDNEW
« no previous file with comments | « media/base/bitstream_buffer.h ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698