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 #include "chromecast/media/cma/ipc/media_message_fifo.h" | 5 #include "chromecast/media/cma/ipc/media_message_fifo.h" |
6 | 6 |
7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 class FifoOwnedMemory : public MediaMemoryChunk { | 58 class FifoOwnedMemory : public MediaMemoryChunk { |
59 public: | 59 public: |
60 FifoOwnedMemory(void* data, size_t size, | 60 FifoOwnedMemory(void* data, size_t size, |
61 const scoped_refptr<MediaMessageFlag>& flag, | 61 const scoped_refptr<MediaMessageFlag>& flag, |
62 const base::Closure& release_msg_cb); | 62 const base::Closure& release_msg_cb); |
63 virtual ~FifoOwnedMemory(); | 63 virtual ~FifoOwnedMemory(); |
64 | 64 |
65 // MediaMemoryChunk implementation. | 65 // MediaMemoryChunk implementation. |
66 virtual void* data() const OVERRIDE { return data_; } | 66 virtual void* data() const override { return data_; } |
67 virtual size_t size() const OVERRIDE { return size_; } | 67 virtual size_t size() const override { return size_; } |
68 virtual bool valid() const OVERRIDE { return flag_->IsValid(); } | 68 virtual bool valid() const override { return flag_->IsValid(); } |
69 | 69 |
70 private: | 70 private: |
71 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 71 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
72 base::Closure release_msg_cb_; | 72 base::Closure release_msg_cb_; |
73 | 73 |
74 void* const data_; | 74 void* const data_; |
75 const size_t size_; | 75 const size_t size_; |
76 scoped_refptr<MediaMessageFlag> flag_; | 76 scoped_refptr<MediaMessageFlag> flag_; |
77 | 77 |
78 DISALLOW_COPY_AND_ASSIGN(FifoOwnedMemory); | 78 DISALLOW_COPY_AND_ASSIGN(FifoOwnedMemory); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 void MediaMessageFifo::CommitInternalRead(size_t new_rd_offset) { | 392 void MediaMessageFifo::CommitInternalRead(size_t new_rd_offset) { |
393 internal_rd_offset_ = new_rd_offset; | 393 internal_rd_offset_ = new_rd_offset; |
394 } | 394 } |
395 | 395 |
396 void MediaMessageFifo::CommitInternalWrite(size_t new_wr_offset) { | 396 void MediaMessageFifo::CommitInternalWrite(size_t new_wr_offset) { |
397 internal_wr_offset_ = new_wr_offset; | 397 internal_wr_offset_ = new_wr_offset; |
398 } | 398 } |
399 | 399 |
400 } // namespace media | 400 } // namespace media |
401 } // namespace chromecast | 401 } // namespace chromecast |
OLD | NEW |