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

Side by Side Diff: media/test/pipeline_integration_test_base.h

Issue 1260193005: Fix incorrect opus seek preroll and flaky pre-skip removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test cases. Created 5 years, 4 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
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 #ifndef MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ 5 #ifndef MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_
6 #define MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ 6 #define MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_
7 7
8 #include "base/md5.h" 8 #include "base/md5.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "media/audio/clockless_audio_sink.h" 10 #include "media/audio/clockless_audio_sink.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // Starts the pipeline (optionally with a CdmContext), returning the final 66 // Starts the pipeline (optionally with a CdmContext), returning the final
67 // status code after it has started. |filename| points at a test file located 67 // status code after it has started. |filename| points at a test file located
68 // under media/test/data/. 68 // under media/test/data/.
69 PipelineStatus Start(const std::string& filename); 69 PipelineStatus Start(const std::string& filename);
70 PipelineStatus Start(const std::string& filename, CdmContext* cdm_context); 70 PipelineStatus Start(const std::string& filename, CdmContext* cdm_context);
71 71
72 // Starts the pipeline in a particular mode for advanced testing and 72 // Starts the pipeline in a particular mode for advanced testing and
73 // benchmarking purposes (e.g., underflow is disabled to ensure consistent 73 // benchmarking purposes (e.g., underflow is disabled to ensure consistent
74 // hashes). 74 // hashes).
75 enum kTestType { kHashed, kClockless }; 75 enum TestType { kHashed = 1, kClockless = 2};
wolenetz 2015/07/29 21:57:27 nit: include "Flags" in the name to indicate that
DaleCurtis 2015/07/30 01:28:14 Done.
76 PipelineStatus Start(const std::string& filename, kTestType test_type); 76 PipelineStatus Start(const std::string& filename, uint8_t test_type);
77 77
78 void Play(); 78 void Play();
79 void Pause(); 79 void Pause();
80 bool Seek(base::TimeDelta seek_time); 80 bool Seek(base::TimeDelta seek_time);
81 void Stop(); 81 void Stop();
82 bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time); 82 bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time);
83 83
84 // Returns the MD5 hash of all video frames seen. Should only be called once 84 // Returns the MD5 hash of all video frames seen. Should only be called once
85 // after playback completes. First time hashes should be generated with 85 // after playback completes. First time hashes should be generated with
86 // --video-threads=1 to ensure correctness. Pipeline must have been started 86 // --video-threads=1 to ensure correctness. Pipeline must have been started
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 MOCK_METHOD1(DecryptorAttached, void(bool)); 142 MOCK_METHOD1(DecryptorAttached, void(bool));
143 MOCK_METHOD2(OnAddTextTrack, 143 MOCK_METHOD2(OnAddTextTrack,
144 void(const TextTrackConfig& config, 144 void(const TextTrackConfig& config,
145 const AddTextTrackDoneCB& done_cb)); 145 const AddTextTrackDoneCB& done_cb));
146 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); 146 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
147 }; 147 };
148 148
149 } // namespace media 149 } // namespace media
150 150
151 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_ 151 #endif // MEDIA_TEST_PIPELINE_INTEGRATION_TEST_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698