Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chromecast / media / cma / base / decoder_buffer_adapter.cc
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
9 namespace chromecast {
10 namespace media {
11
12 DecoderBufferAdapter::DecoderBufferAdapter(
13     const scoped_refptr< ::media::DecoderBuffer>& buffer)
14     : buffer_(buffer) {
15 }
16
17 DecoderBufferAdapter::~DecoderBufferAdapter() {
18 }
19
20 base::TimeDelta DecoderBufferAdapter::timestamp() const {
21   return buffer_->timestamp();
22 }
23
24 const uint8* DecoderBufferAdapter::data() const {
25   return buffer_->data();
26 }
27
28 uint8* DecoderBufferAdapter::writable_data() const {
29   return buffer_->writable_data();
30 }
31
32 int DecoderBufferAdapter::data_size() const {
33   return buffer_->data_size();
34 }
35
36 const ::media::DecryptConfig* DecoderBufferAdapter::decrypt_config() const {
37   return buffer_->decrypt_config();
38 }
39
40 bool DecoderBufferAdapter::end_of_stream() const {
41   return buffer_->end_of_stream();
42 }
43
44 }  // namespace media
45 }  // namespace chromecast