blob: bd9b84385dc945663f500ae232ac00bd3f7e96a8 [file] [log] [blame]
[email protected]e785780e2011-03-30 19:31:301// Copyright (c) 2011 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#ifndef MEDIA_BASE_BITSTREAM_BUFFER_H_
6#define MEDIA_BASE_BITSTREAM_BUFFER_H_
7
8#include "base/basictypes.h"
9
10namespace media {
11
12// Class for passing bitstream buffers around. Ownership of the bitstream
13// pointer remains with whoever uses this class.
[email protected]1357ae72011-05-13 18:28:0814// This is media-namespace equivalent of PP_BitstreamBuffer_Dev.
[email protected]e785780e2011-03-30 19:31:3015class BitstreamBuffer {
16 public:
[email protected]1357ae72011-05-13 18:28:0817 BitstreamBuffer(int32 id, uint8* data, size_t size)
18 : id_(id),
19 data_(data),
20 size_(size) {
[email protected]e785780e2011-03-30 19:31:3021 }
22
[email protected]1357ae72011-05-13 18:28:0823 int32 id() const { return id_; }
24 uint8* data() const { return data_; }
25 size_t size() const { return size_; }
[email protected]e785780e2011-03-30 19:31:3026
27 private:
[email protected]1357ae72011-05-13 18:28:0828 int32 id_;
29 uint8* data_;
30 size_t size_;
[email protected]e785780e2011-03-30 19:31:3031
32 DISALLOW_IMPLICIT_CONSTRUCTORS(BitstreamBuffer);
33};
34
35} // namespace media
36
37#endif // MEDIA_BASE_BITSTREAM_BUFFER_H_