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

Side by Side Diff: ppapi/shared_impl/media_stream_buffer_manager.h

Issue 884723002: ppapi: add helper methods to MediaStreamBufferManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after bbudge's review Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_ 5 #ifndef PPAPI_SHARED_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_
6 #define PPAPI_SHARED_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_ 6 #define PPAPI_SHARED_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // MediaStreamBufferManager doesn't own |delegate|, the caller should keep 46 // MediaStreamBufferManager doesn't own |delegate|, the caller should keep
47 // it alive during the MediaStreamBufferManager's lifecycle. 47 // it alive during the MediaStreamBufferManager's lifecycle.
48 explicit MediaStreamBufferManager(Delegate* delegate); 48 explicit MediaStreamBufferManager(Delegate* delegate);
49 49
50 ~MediaStreamBufferManager(); 50 ~MediaStreamBufferManager();
51 51
52 int32_t number_of_buffers() const { return number_of_buffers_; } 52 int32_t number_of_buffers() const { return number_of_buffers_; }
53 53
54 int32_t buffer_size() const { return buffer_size_; } 54 int32_t buffer_size() const { return buffer_size_; }
55 55
56 base::SharedMemory* shm() { return shm_.get(); }
bbudge 2015/01/29 13:44:31 Do you need the actual SharedMemory object, or jus
57
56 // Initializes shared memory for buffers transmission. 58 // Initializes shared memory for buffers transmission.
57 bool SetBuffers(int32_t number_of_buffers, 59 bool SetBuffers(int32_t number_of_buffers,
58 int32_t buffer_size, 60 int32_t buffer_size,
59 scoped_ptr<base::SharedMemory> shm, 61 scoped_ptr<base::SharedMemory> shm,
60 bool enqueue_all_buffers); 62 bool enqueue_all_buffers);
61 63
62 // Dequeues a buffer from |buffer_queue_|. 64 // Dequeues a buffer from |buffer_queue_|.
63 int32_t DequeueBuffer(); 65 int32_t DequeueBuffer();
64 66
65 // Dequeues all the buffers from |buffer_queue_|. 67 // Dequeues all the buffers from |buffer_queue_|.
(...skipping 22 matching lines...) Expand all
88 90
89 // A memory block shared between renderer process and plugin process. 91 // A memory block shared between renderer process and plugin process.
90 scoped_ptr<base::SharedMemory> shm_; 92 scoped_ptr<base::SharedMemory> shm_;
91 93
92 DISALLOW_COPY_AND_ASSIGN(MediaStreamBufferManager); 94 DISALLOW_COPY_AND_ASSIGN(MediaStreamBufferManager);
93 }; 95 };
94 96
95 } // namespace ppapi 97 } // namespace ppapi
96 98
97 #endif // PPAPI_SHAERD_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_ 99 #endif // PPAPI_SHAERD_IMPL_MEDIA_STREAM_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698