| 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/memory/ptr_util.h" |
| 13 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 14 #include "base/test/mock_callback.h" | 15 #include "base/test/mock_callback.h" |
| 15 #include "media/base/decoder_buffer.h" | 16 #include "media/base/decoder_buffer.h" |
| 16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 19 |
| 19 namespace media { | 20 namespace media { |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 converter.writer->WriteDecoderBuffer(media_buffer); | 192 converter.writer->WriteDecoderBuffer(media_buffer); |
| 192 converter.reader->ReadDecoderBuffer(std::move(mojo_buffer), mock_cb.Get()); | 193 converter.reader->ReadDecoderBuffer(std::move(mojo_buffer), mock_cb.Get()); |
| 193 | 194 |
| 194 // Before the entire data is transmitted, close the handle on writer side. | 195 // Before the entire data is transmitted, close the handle on writer side. |
| 195 // The reader side will get notified and report the error. | 196 // The reader side will get notified and report the error. |
| 196 converter.writer.reset(); | 197 converter.writer.reset(); |
| 197 run_loop.Run(); | 198 run_loop.Run(); |
| 198 } | 199 } |
| 199 | 200 |
| 200 } // namespace media | 201 } // namespace media |
| OLD | NEW |