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 <list> | 5 #include <list> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace chromecast { | 27 namespace chromecast { |
28 namespace media { | 28 namespace media { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 class FifoMemoryChunk : public MediaMemoryChunk { | 32 class FifoMemoryChunk : public MediaMemoryChunk { |
33 public: | 33 public: |
34 FifoMemoryChunk(void* mem, size_t size) | 34 FifoMemoryChunk(void* mem, size_t size) |
35 : mem_(mem), size_(size) {} | 35 : mem_(mem), size_(size) {} |
36 virtual ~FifoMemoryChunk() {} | 36 ~FifoMemoryChunk() override {} |
37 | 37 |
38 virtual void* data() const override { return mem_; } | 38 void* data() const override { return mem_; } |
39 virtual size_t size() const override { return size_; } | 39 size_t size() const override { return size_; } |
40 virtual bool valid() const override { return true; } | 40 bool valid() const override { return true; } |
41 | 41 |
42 private: | 42 private: |
43 void* mem_; | 43 void* mem_; |
44 size_t size_; | 44 size_t size_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(FifoMemoryChunk); | 46 DISALLOW_COPY_AND_ASSIGN(FifoMemoryChunk); |
47 }; | 47 }; |
48 | 48 |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 class AvStreamerTest : public testing::Test { | 51 class AvStreamerTest : public testing::Test { |
52 public: | 52 public: |
53 AvStreamerTest(); | 53 AvStreamerTest(); |
54 virtual ~AvStreamerTest(); | 54 ~AvStreamerTest() override; |
55 | 55 |
56 // Setups the test. | 56 // Setups the test. |
57 void Configure( | 57 void Configure( |
58 size_t frame_count, | 58 size_t frame_count, |
59 const std::vector<bool>& provider_delayed_pattern, | 59 const std::vector<bool>& provider_delayed_pattern, |
60 const std::vector<bool>& consumer_delayed_pattern); | 60 const std::vector<bool>& consumer_delayed_pattern); |
61 | 61 |
62 // Starts the test. | 62 // Starts the test. |
63 void Start(); | 63 void Start(); |
64 | 64 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); | 245 scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop()); |
246 message_loop->PostTask( | 246 message_loop->PostTask( |
247 FROM_HERE, | 247 FROM_HERE, |
248 base::Bind(&AvStreamerTest::Start, base::Unretained(this))); | 248 base::Bind(&AvStreamerTest::Start, base::Unretained(this))); |
249 message_loop->Run(); | 249 message_loop->Run(); |
250 }; | 250 }; |
251 | 251 |
252 } // namespace media | 252 } // namespace media |
253 } // namespace chromecast | 253 } // namespace chromecast |
OLD | NEW |