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

Unified Diff: media/test/pipeline_integration_test_base.h

Issue 2684103005: Allow media track switching. (Closed)
Patch Set: Fixed comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 580e963c658f7b0261a6b2e6c7e2b392a352a88f..32f72ec63a0589340e32bd3482bbc0e7a0973bca 100644
--- a/media/test/pipeline_integration_test_base.h
+++ b/media/test/pipeline_integration_test_base.h
@@ -9,7 +9,6 @@
#include <memory>
#include "base/md5.h"
-#include "base/memory/scoped_vector.h"
#include "base/message_loop/message_loop.h"
#include "base/test/scoped_task_scheduler.h"
#include "media/audio/clockless_audio_sink.h"
@@ -26,9 +25,7 @@
namespace media {
-class AudioDecoder;
class CdmContext;
-class VideoDecoder;
// Empty MD5 hash string. Used to verify empty video tracks.
extern const char kNullVideoHash[];
@@ -78,12 +75,12 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
// 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);
- PipelineStatus Start(const std::string& filename,
- uint8_t test_type,
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
+ PipelineStatus Start(
+ const std::string& filename,
+ uint8_t test_type,
+ CreateVideoDecodersCB prepend_video_decoders_cb = CreateVideoDecodersCB(),
+ CreateAudioDecodersCB prepend_audio_decoders_cb =
+ CreateAudioDecodersCB());
// Starts the pipeline with |data| (with |size| bytes). The |data| will be
// valid throughtout the lifetime of this test.
@@ -157,19 +154,17 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
std::unique_ptr<DataSource> data_source,
CdmContext* cdm_context,
uint8_t test_type,
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
+ CreateVideoDecodersCB prepend_video_decoders_cb = CreateVideoDecodersCB(),
+ CreateAudioDecodersCB prepend_audio_decoders_cb =
+ CreateAudioDecodersCB());
PipelineStatus StartWithFile(
const std::string& filename,
CdmContext* cdm_context,
uint8_t test_type,
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
+ CreateVideoDecodersCB prepend_video_decoders_cb = CreateVideoDecodersCB(),
+ CreateAudioDecodersCB prepend_audio_decoders_cb =
+ CreateAudioDecodersCB());
void OnSeeked(base::TimeDelta seek_time, PipelineStatus status);
void OnStatusCallback(PipelineStatus status);
@@ -185,10 +180,9 @@ class PipelineIntegrationTestBase : public Pipeline::Client {
// Creates and returns a Renderer.
virtual std::unique_ptr<Renderer> CreateRenderer(
- ScopedVector<VideoDecoder> prepend_video_decoders =
- ScopedVector<VideoDecoder>(),
- ScopedVector<AudioDecoder> prepend_audio_decoders =
- ScopedVector<AudioDecoder>());
+ CreateVideoDecodersCB prepend_video_decoders_cb = CreateVideoDecodersCB(),
+ CreateAudioDecodersCB prepend_audio_decoders_cb =
+ CreateAudioDecodersCB());
void OnVideoFramePaint(const scoped_refptr<VideoFrame>& frame);
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | media/test/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698