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 "media/mojo/common/mojo_decoder_buffer_converter.h" | 5 #include "media/mojo/common/mojo_decoder_buffer_converter.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
13 #include "media/base/decoder_buffer.h" | 14 #include "media/base/decoder_buffer.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 15 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 namespace media { | 18 namespace media { |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 uint32_t kDefaultDataPipeCapacityBytes = 1024; | 22 uint32_t kDefaultDataPipeCapacityBytes = 1024; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 std::move(mojo_buffer), | 205 std::move(mojo_buffer), |
205 base::BindOnce(&MockReadCB::Run, base::Unretained(&mock_cb))); | 206 base::BindOnce(&MockReadCB::Run, base::Unretained(&mock_cb))); |
206 | 207 |
207 // Before the entire data is transmitted, close the handle on writer side. | 208 // Before the entire data is transmitted, close the handle on writer side. |
208 // The reader side will get notified and report the error. | 209 // The reader side will get notified and report the error. |
209 converter.writer.reset(); | 210 converter.writer.reset(); |
210 run_loop.Run(); | 211 run_loop.Run(); |
211 } | 212 } |
212 | 213 |
213 } // namespace media | 214 } // namespace media |
OLD | NEW |