Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: media/base/encoded_bitstream_buffer.h

Issue 15906019: Hook up EncodedVideoSource on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cl_6
Patch Set: 516738a8 IPC/struct changes, courtesy hshi@ Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
Ami GONE FROM CHROMIUM 2013/06/18 18:35:55 Ignoring file (b/c I think it's part of a differen
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/callback_forward.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/shared_memory.h"
11 #include "base/time.h"
12 #include "media/base/media_export.h"
13 #include "media/video/video_encode_types.h"
14
15 namespace media {
16
17 // General encoded video bitstream buffer.
18 class EncodedBitstreamBuffer :
19 public base::RefCountedThreadSafe<EncodedBitstreamBuffer> {
20 public:
21 EncodedBitstreamBuffer(int buffer_id,
22 uint8* buffer,
23 size_t size,
24 base::SharedMemoryHandle handle,
25 const media::BufferEncodingMetadata& metadata,
26 const base::Closure& destroy_callback);
27 // Accessors for properties.
28 int buffer_id() const;
29 const uint8* buffer() const;
30 size_t size() const;
31 base::SharedMemoryHandle shared_memory_handle() const;
32 const media::BufferEncodingMetadata& metadata() const;
33
34 protected:
35 // Destructor that deallocates the buffers.
36 virtual ~EncodedBitstreamBuffer();
37 friend class base::RefCountedThreadSafe<EncodedBitstreamBuffer>;
38
39 private:
40 int buffer_id_;
41 uint8* buffer_;
42 size_t size_;
43 const base::SharedMemoryHandle shared_memory_handle_;
44 media::BufferEncodingMetadata metadata_;
45 const base::Closure destroy_callback_;
46
47 DISALLOW_COPY_AND_ASSIGN(EncodedBitstreamBuffer);
48 };
49
50 } // namespace media
51
52 #endif // MEDIA_BASE_ENCODED_BITSTREAM_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698