| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "media/base/cdm_callback_promise.h" | 11 #include "media/base/cdm_callback_promise.h" |
| 12 #include "media/base/cdm_context.h" | 12 #include "media/base/cdm_context.h" |
| 13 #include "media/base/cdm_key_information.h" | 13 #include "media/base/cdm_key_information.h" |
| 14 #include "media/base/decoder_buffer.h" | 14 #include "media/base/decoder_buffer.h" |
| 15 #include "media/base/media.h" | 15 #include "media/base/media.h" |
| 16 #include "media/base/media_keys.h" | 16 #include "media/base/media_keys.h" |
| 17 #include "media/base/media_switches.h" | 17 #include "media/base/media_switches.h" |
| 18 #include "media/base/test_data_util.h" | 18 #include "media/base/test_data_util.h" |
| 19 #include "media/cdm/aes_decryptor.h" | 19 #include "media/cdm/aes_decryptor.h" |
| 20 #include "media/cdm/json_web_key.h" | 20 #include "media/cdm/json_web_key.h" |
| 21 #include "media/filters/chunk_demuxer.h" | 21 #include "media/filters/chunk_demuxer.h" |
| 22 #include "media/renderers/renderer_impl.h" | 22 #include "media/renderers/renderer_impl.h" |
| 23 #include "media/test/pipeline_integration_test_base.h" | 23 #include "media/test/pipeline_integration_test_base.h" |
| 24 #include "testing/gmock/include/gmock/gmock.h" | 24 #include "testing/gmock/include/gmock/gmock.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 #if defined(MOJO_RENDERER) | 27 #if defined(MOJO_RENDERER) |
| 28 #include "media/mojo/services/mojo_renderer_impl.h" | 28 #include "media/mojo/services/mojo_renderer_impl.h" |
| 29 #include "third_party/mojo/src/mojo/public/cpp/application/application_impl.h" | 29 #include "mojo/application/public/cpp/application_impl.h" |
| 30 #include "third_party/mojo/src/mojo/public/cpp/application/application_test_base
.h" | 30 #include "mojo/application/public/cpp/application_test_base.h" |
| 31 #include "third_party/mojo/src/mojo/public/cpp/application/connect.h" | 31 #include "mojo/application/public/cpp/connect.h" |
| 32 | 32 |
| 33 // TODO(dalecurtis): The mojo renderer is in another process, so we have no way | 33 // TODO(dalecurtis): The mojo renderer is in another process, so we have no way |
| 34 // currently to get hashes for video and audio samples. This also means that | 34 // currently to get hashes for video and audio samples. This also means that |
| 35 // real audio plays out for each test. | 35 // real audio plays out for each test. |
| 36 #define EXPECT_HASH_EQ(a, b) | 36 #define EXPECT_HASH_EQ(a, b) |
| 37 #define EXPECT_VIDEO_FORMAT_EQ(a, b) | 37 #define EXPECT_VIDEO_FORMAT_EQ(a, b) |
| 38 | 38 |
| 39 // TODO(xhwang): EME support is not complete for the mojo renderer, so all | 39 // TODO(xhwang): EME support is not complete for the mojo renderer, so all |
| 40 // encrypted tests are currently disabled. | 40 // encrypted tests are currently disabled. |
| 41 #define DISABLE_EME_TESTS 1 | 41 #define DISABLE_EME_TESTS 1 |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 | 1734 |
| 1735 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1735 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 1736 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1736 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 1737 Play(); | 1737 Play(); |
| 1738 ASSERT_TRUE(WaitUntilOnEnded()); | 1738 ASSERT_TRUE(WaitUntilOnEnded()); |
| 1739 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1739 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 1740 demuxer_->GetStartTime()); | 1740 demuxer_->GetStartTime()); |
| 1741 } | 1741 } |
| 1742 | 1742 |
| 1743 } // namespace media | 1743 } // namespace media |
| OLD | NEW |