| Index: media/test/pipeline_integration_test_base.h
|
| diff --git a/media/test/pipeline_integration_test_base.h b/media/test/pipeline_integration_test_base.h
|
| index d920fb9cef5249be89646f2b4931e83edaaffc10..bd31e42d9c7e9c8674618f29fffbe57ac531dff4 100644
|
| --- a/media/test/pipeline_integration_test_base.h
|
| +++ b/media/test/pipeline_integration_test_base.h
|
| @@ -63,22 +63,22 @@ class PipelineIntegrationTestBase {
|
| PipelineIntegrationTestBase();
|
| virtual ~PipelineIntegrationTestBase();
|
|
|
| - bool WaitUntilOnEnded();
|
| - PipelineStatus WaitUntilEndedOrError();
|
| -
|
| - // Starts the pipeline (optionally with a CdmContext), returning the final
|
| - // status code after it has started. |filename| points at a test file located
|
| - // under media/test/data/.
|
| + // Test types for advanced testing and benchmarking (e.g., underflow is
|
| + // disabled to ensure consistent hashes). May be combined using the bitwise
|
| + // or operator (and as such must have values that are powers of two).
|
| + enum TestTypeFlags { kNormal = 0, kHashed = 1, kClockless = 2 };
|
| +
|
| + // Starts the pipeline with a file specified by |filename|, optionally with a
|
| + // CdmContext or a |test_type|, returning the final status code after it has
|
| + // started. |filename| points at a test file located under media/test/data/.
|
| PipelineStatus Start(const std::string& filename);
|
| PipelineStatus Start(const std::string& filename, CdmContext* cdm_context);
|
| -
|
| - // Starts the pipeline in a particular mode for advanced testing and
|
| - // benchmarking purposes (e.g., underflow is disabled to ensure consistent
|
| - // hashes). May be combined using the bitwise or operator (and as such must
|
| - // have values that are powers of two).
|
| - enum TestTypeFlags { kHashed = 1, kClockless = 2 };
|
| PipelineStatus Start(const std::string& filename, uint8_t test_type);
|
|
|
| + // Starts the pipeline with |data| (with |size| bytes). The |data| will be
|
| + // valid throughtout the lifetime of this test.
|
| + PipelineStatus Start(const uint8_t* data, size_t size, uint8_t test_type);
|
| +
|
| void Play();
|
| void Pause();
|
| bool Seek(base::TimeDelta seek_time);
|
| @@ -87,6 +87,9 @@ class PipelineIntegrationTestBase {
|
| void Stop();
|
| bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time);
|
|
|
| + bool WaitUntilOnEnded();
|
| + PipelineStatus WaitUntilEndedOrError();
|
| +
|
| // Returns the MD5 hash of all video frames seen. Should only be called once
|
| // after playback completes. First time hashes should be generated with
|
| // --video-threads=1 to ensure correctness. Pipeline must have been started
|
| @@ -122,6 +125,14 @@ class PipelineIntegrationTestBase {
|
| AudioHardwareConfig hardware_config_;
|
| PipelineMetadata metadata_;
|
|
|
| + PipelineStatus StartInternal(scoped_ptr<DataSource> data_source,
|
| + CdmContext* cdm_context,
|
| + uint8_t test_type);
|
| +
|
| + PipelineStatus StartWithFile(const std::string& filename,
|
| + CdmContext* cdm_context,
|
| + uint8_t test_type);
|
| +
|
| void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
|
| void OnStatusCallback(PipelineStatus status);
|
| void DemuxerEncryptedMediaInitDataCB(EmeInitDataType type,
|
| @@ -136,7 +147,7 @@ class PipelineIntegrationTestBase {
|
| void QuitAfterCurrentTimeTask(const base::TimeDelta& quit_time);
|
|
|
| // Creates Demuxer and sets |demuxer_|.
|
| - void CreateDemuxer(const std::string& filename);
|
| + void CreateDemuxer(scoped_ptr<DataSource> data_source);
|
|
|
| // Creates and returns a Renderer.
|
| virtual scoped_ptr<Renderer> CreateRenderer();
|
|
|