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

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: fix compiling errors on android Created 4 years, 11 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
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(int32_t id, 9 BitstreamBuffer::BitstreamBuffer(int32_t id,
10 base::SharedMemoryHandle handle, 10 base::SharedMemoryHandle handle,
11 size_t size)
12 : id_(id),
13 handle_(handle),
14 size_(size),
15 presentation_timestamp_(kNoTimestamp()) {}
16
17 BitstreamBuffer::BitstreamBuffer(int32_t id,
18 base::SharedMemoryHandle handle,
19 size_t size, 11 size_t size,
12 off_t offset,
20 base::TimeDelta presentation_timestamp) 13 base::TimeDelta presentation_timestamp)
21 : id_(id), 14 : id_(id),
22 handle_(handle), 15 handle_(handle),
23 size_(size), 16 size_(size),
17 offset_(offset),
24 presentation_timestamp_(presentation_timestamp) {} 18 presentation_timestamp_(presentation_timestamp) {}
25 19
26 BitstreamBuffer::~BitstreamBuffer() {} 20 BitstreamBuffer::~BitstreamBuffer() {}
27 21
28 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { 22 void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) {
29 key_id_ = decrypt_config.key_id(); 23 key_id_ = decrypt_config.key_id();
30 iv_ = decrypt_config.iv(); 24 iv_ = decrypt_config.iv();
31 subsamples_ = decrypt_config.subsamples(); 25 subsamples_ = decrypt_config.subsamples();
32 } 26 }
33 27
34 } // namespace media 28 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698