decoder_buffer_adapter.cc revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chromecast/media/cma/base/decoder_buffer_adapter.h"
6
7#include "media/base/decoder_buffer.h"
8
9namespace chromecast {
10namespace media {
11
12DecoderBufferAdapter::DecoderBufferAdapter(
13    const scoped_refptr< ::media::DecoderBuffer>& buffer)
14    : buffer_(buffer) {
15}
16
17DecoderBufferAdapter::~DecoderBufferAdapter() {
18}
19
20base::TimeDelta DecoderBufferAdapter::timestamp() const {
21  return buffer_->timestamp();
22}
23
24const uint8* DecoderBufferAdapter::data() const {
25  return buffer_->data();
26}
27
28uint8* DecoderBufferAdapter::writable_data() const {
29  return buffer_->writable_data();
30}
31
32int DecoderBufferAdapter::data_size() const {
33  return buffer_->data_size();
34}
35
36const ::media::DecryptConfig* DecoderBufferAdapter::decrypt_config() const {
37  return buffer_->decrypt_config();
38}
39
40bool DecoderBufferAdapter::end_of_stream() const {
41  return buffer_->end_of_stream();
42}
43
44}  // namespace media
45}  // namespace chromecast
46