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 // General encoded video bitstream buffer. | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
This sort of comment (which appears elsewhere as w
| |
17 class EncodedBitstreamBuffer : | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Seems strange to have this time given that media::
hshi1
2013/06/12 17:52:39
I'm leaving this as-is for now. Need to review she
| |
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, | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
comment (and off-reviewlog convo) says "shared mem
| |
24 size_t size, | |
25 const media::BufferEncodingMetadata& metadata); | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Is there any reason for this to be a separate stru
| |
26 // Accessors for properties. | |
27 int buffer_id() const; | |
28 const uint8* buffer() const; | |
29 size_t size() const; | |
30 const media::BufferEncodingMetadata& metadata() const; | |
31 | |
32 protected: | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
private?
hshi1
2013/06/12 17:52:39
Done.
| |
33 // Destructor that deallocates the buffers. | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Comment is a lie given the impl.
hshi1
2013/06/12 17:52:39
Removed; but see sheu@'s CL. I believe he intends
| |
34 virtual ~EncodedBitstreamBuffer(); | |
35 friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>; | |
36 | |
37 private: | |
38 int buffer_id_; | |
39 uint8* buffer_; | |
40 size_t size_; | |
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
IPC guidelines require this piece of data to be ex
hshi1
2013/06/12 17:52:39
Wouldn't an int do? I don't think bitstream buffer
| |
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 |