OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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_ENCODED_BITSTREAM_BUFFER_H_ |
| 6 #define MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/shared_memory.h" |
| 10 #include "base/time.h" |
| 11 #include "media/base/media_export.h" |
| 12 #include "media/video/video_encode_types.h" |
| 13 |
| 14 namespace media { |
| 15 |
| 16 class EncodedBitstreamBuffer : |
| 17 public base::RefCountedThreadSafe<EncodedBitstreamBuffer> { |
| 18 public: |
| 19 // Constructor that maps the shared memory with the given size to the current |
| 20 // process and associates the given metadata with the buffer. |
| 21 EncodedBitstreamBuffer(int buffer_id, |
| 22 uint8* buffer, |
| 23 int size, |
| 24 const media::BufferEncodingMetadata& metadata); |
| 25 // Accessors for properties. |
| 26 int buffer_id() const; |
| 27 const uint8* buffer() const; |
| 28 int size() const; |
| 29 const media::BufferEncodingMetadata& metadata() const; |
| 30 |
| 31 private: |
| 32 virtual ~EncodedBitstreamBuffer(); |
| 33 friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>; |
| 34 |
| 35 int buffer_id_; |
| 36 uint8* buffer_; |
| 37 int size_; |
| 38 media::BufferEncodingMetadata metadata_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer); |
| 41 }; |
| 42 |
| 43 } // namespace media |
| 44 |
| 45 #endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ |
OLD | NEW |