Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |