OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_ |
| 6 #define CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chromecast/media/cma/ipc/media_memory_chunk.h" |
| 11 |
| 12 namespace base { |
| 13 class SharedMemory; |
| 14 } |
| 15 |
| 16 namespace chromecast { |
| 17 namespace media { |
| 18 |
| 19 class SharedMemoryChunk : public MediaMemoryChunk { |
| 20 public: |
| 21 SharedMemoryChunk(scoped_ptr<base::SharedMemory> shared_mem, |
| 22 size_t size); |
| 23 ~SharedMemoryChunk() override; |
| 24 |
| 25 // MediaMemoryChunk implementation. |
| 26 void* data() const override; |
| 27 size_t size() const override; |
| 28 bool valid() const override; |
| 29 |
| 30 private: |
| 31 scoped_ptr<base::SharedMemory> shared_mem_; |
| 32 size_t size_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(SharedMemoryChunk); |
| 35 }; |
| 36 |
| 37 } // namespace media |
| 38 } // namespace chromecast |
| 39 |
| 40 #endif // CHROMECAST_COMMON_MEDIA_SHARED_MEMORY_CHUNK_H_ |
OLD | NEW |