Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
|
Ami GONE FROM CHROMIUM
2013/06/12 01:44:06
I think you missed my comments on this file in PS#
| |
| 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 // General encoded video bitstream buffer. | |
| 17 class EncodedBitstreamBuffer : | |
| 18 public base::RefCountedThreadSafe<EncodedBitstreamBuffer> { | |
| 19 public: | |
| 20 // Constructor that maps the shared memory with the given size to the current | |
| 21 // process and associates the given metadata with the buffer. | |
| 22 EncodedBitstreamBuffer(int buffer_id, | |
| 23 uint8* buffer, | |
| 24 int size, | |
| 25 const media::BufferEncodingMetadata& metadata); | |
| 26 // Accessors for properties. | |
| 27 int buffer_id() const; | |
| 28 const uint8* buffer() const; | |
| 29 int size() const; | |
| 30 const media::BufferEncodingMetadata& metadata() const; | |
| 31 | |
| 32 protected: | |
| 33 // Destructor that deallocates the buffers. | |
| 34 virtual ~EncodedBitstreamBuffer(); | |
| 35 friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>; | |
| 36 | |
| 37 private: | |
| 38 int buffer_id_; | |
| 39 uint8* buffer_; | |
| 40 int size_; | |
| 41 media::BufferEncodingMetadata metadata_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer); | |
| 44 }; | |
| 45 | |
| 46 } // namespace media | |
| 47 | |
| 48 #endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_ | |
| OLD | NEW |