Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 27374002: Add support for avc3 codec string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/crypto/key_systems.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 16 matching lines...) Expand all
27 const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\""; 27 const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\"";
28 const char kWebMVP9[] = "video/webm; codecs=\"vp9\""; 28 const char kWebMVP9[] = "video/webm; codecs=\"vp9\"";
29 const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\""; 29 const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\"";
30 const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\""; 30 const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\"";
31 const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\""; 31 const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\"";
32 const char kMP4VideoType[] = "video/mp4"; 32 const char kMP4VideoType[] = "video/mp4";
33 const char kMP4AudioType[] = "audio/mp4"; 33 const char kMP4AudioType[] = "audio/mp4";
34 #if defined(USE_PROPRIETARY_CODECS) 34 #if defined(USE_PROPRIETARY_CODECS)
35 const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\""; 35 const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\"";
36 const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\""; 36 const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\"";
37 const char kMP4VideoAVC3[] = "video/mp4; codecs=\"avc3.64001f\"";
37 const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\""; 38 const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\"";
38 const char kMP3[] = "audio/mpeg"; 39 const char kMP3[] = "audio/mpeg";
39 #endif // defined(USE_PROPRIETARY_CODECS) 40 #endif // defined(USE_PROPRIETARY_CODECS)
40 41
41 // Key used to encrypt test files. 42 // Key used to encrypt test files.
42 const uint8 kSecretKey[] = { 43 const uint8 kSecretKey[] = {
43 0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b, 44 0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
44 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c 45 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c
45 }; 46 };
46 47
(...skipping 15 matching lines...) Expand all
62 const int kVP9WebMFileDurationMs = 2735; 63 const int kVP9WebMFileDurationMs = 2735;
63 const int kVP8AWebMFileDurationMs = 2700; 64 const int kVP8AWebMFileDurationMs = 2700;
64 65
65 // Command line switch for runtime adjustment of audio file to be benchmarked. 66 // Command line switch for runtime adjustment of audio file to be benchmarked.
66 const char kBenchmarkAudioFile[] = "benchmark-audio-file"; 67 const char kBenchmarkAudioFile[] = "benchmark-audio-file";
67 68
68 #if defined(USE_PROPRIETARY_CODECS) 69 #if defined(USE_PROPRIETARY_CODECS)
69 const int k640IsoFileDurationMs = 2737; 70 const int k640IsoFileDurationMs = 2737;
70 const int k640IsoCencFileDurationMs = 2736; 71 const int k640IsoCencFileDurationMs = 2736;
71 const int k1280IsoFileDurationMs = 2736; 72 const int k1280IsoFileDurationMs = 2736;
73 const int k1280IsoAVC3FileDurationMs = 2735;
72 #endif // defined(USE_PROPRIETARY_CODECS) 74 #endif // defined(USE_PROPRIETARY_CODECS)
73 75
74 // Note: Tests using this class only exercise the DecryptingDemuxerStream path. 76 // Note: Tests using this class only exercise the DecryptingDemuxerStream path.
75 // They do not exercise the Decrypting{Audio|Video}Decoder path. 77 // They do not exercise the Decrypting{Audio|Video}Decoder path.
76 class FakeEncryptedMedia { 78 class FakeEncryptedMedia {
77 public: 79 public:
78 // Defines the behavior of the "app" that responds to EME events. 80 // Defines the behavior of the "app" that responds to EME events.
79 class AppBase { 81 class AppBase {
80 public: 82 public:
81 virtual ~AppBase() {} 83 virtual ~AppBase() {}
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 958
957 source.EndOfStream(); 959 source.EndOfStream();
958 ASSERT_EQ(PIPELINE_OK, pipeline_status_); 960 ASSERT_EQ(PIPELINE_OK, pipeline_status_);
959 961
960 Play(); 962 Play();
961 963
962 ASSERT_TRUE(WaitUntilOnEnded()); 964 ASSERT_TRUE(WaitUntilOnEnded());
963 source.Abort(); 965 source.Abort();
964 Stop(); 966 Stop();
965 } 967 }
968
969 TEST_F(PipelineIntegrationTest, BasicPlayback_MediaSource_VideoOnly_MP4_AVC3) {
970 MockMediaSource source("bear-1280x720-v_frag-avc3.mp4", kMP4VideoAVC3,
971 kAppendWholeFile);
972 StartPipelineWithMediaSource(&source);
973 source.EndOfStream();
974
975 EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
976 EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
977 EXPECT_EQ(k1280IsoAVC3FileDurationMs,
978 pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
979
980 Play();
981
982 ASSERT_TRUE(WaitUntilOnEnded());
983 source.Abort();
984 Stop();
985 }
986
966 #endif 987 #endif
967 988
968 // TODO(acolwell): Fix flakiness http://crbug.com/117921 989 // TODO(acolwell): Fix flakiness http://crbug.com/117921
969 TEST_F(PipelineIntegrationTest, DISABLED_SeekWhilePaused) { 990 TEST_F(PipelineIntegrationTest, DISABLED_SeekWhilePaused) {
970 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"), PIPELINE_OK)); 991 ASSERT_TRUE(Start(GetTestDataFilePath("bear-320x240.webm"), PIPELINE_OK));
971 992
972 base::TimeDelta duration(pipeline_->GetMediaDuration()); 993 base::TimeDelta duration(pipeline_->GetMediaDuration());
973 base::TimeDelta start_seek_time(duration / 4); 994 base::TimeDelta start_seek_time(duration / 4);
974 base::TimeDelta seek_time(duration * 3 / 4); 995 base::TimeDelta seek_time(duration * 3 / 4);
975 996
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 1089
1069 // Verify that VP8 video with inband text track can be played back. 1090 // Verify that VP8 video with inband text track can be played back.
1070 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) { 1091 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) {
1071 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1092 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1072 PIPELINE_OK)); 1093 PIPELINE_OK));
1073 Play(); 1094 Play();
1074 ASSERT_TRUE(WaitUntilOnEnded()); 1095 ASSERT_TRUE(WaitUntilOnEnded());
1075 } 1096 }
1076 1097
1077 } // namespace media 1098 } // namespace media
OLDNEW
« no previous file with comments | « content/renderer/media/crypto/key_systems.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698