summaryrefslogtreecommitdiffstats
path: root/media/base/test_helpers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/test_helpers.cc')
-rw-r--r--media/base/test_helpers.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/media/base/test_helpers.cc b/media/base/test_helpers.cc
index 972d082..0ab1903 100644
--- a/media/base/test_helpers.cc
+++ b/media/base/test_helpers.cc
@@ -139,34 +139,47 @@ static VideoDecoderConfig GetTestConfig(VideoCodec codec,
static const gfx::Size kNormalSize(320, 240);
static const gfx::Size kLargeSize(640, 480);
+// static
VideoDecoderConfig TestVideoConfig::Invalid() {
return GetTestConfig(kUnknownVideoCodec, kNormalSize, false);
}
+// static
VideoDecoderConfig TestVideoConfig::Normal() {
return GetTestConfig(kCodecVP8, kNormalSize, false);
}
+// static
VideoDecoderConfig TestVideoConfig::NormalEncrypted() {
return GetTestConfig(kCodecVP8, kNormalSize, true);
}
+// static
VideoDecoderConfig TestVideoConfig::Large() {
return GetTestConfig(kCodecVP8, kLargeSize, false);
}
+// static
VideoDecoderConfig TestVideoConfig::LargeEncrypted() {
return GetTestConfig(kCodecVP8, kLargeSize, true);
}
+// static
gfx::Size TestVideoConfig::NormalCodedSize() {
return kNormalSize;
}
+// static
gfx::Size TestVideoConfig::LargeCodedSize() {
return kLargeSize;
}
+// static
+AudioParameters TestAudioParameters::Normal() {
+ return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ CHANNEL_LAYOUT_STEREO, 48000, 16, 2048);
+}
+
template <class T>
scoped_refptr<AudioBuffer> MakeAudioBuffer(SampleFormat format,
ChannelLayout channel_layout,