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

Unified Diff: media/base/mock_filters.cc

Issue 2837613004: media: Support better decoder switching (Closed)
Patch Set: Mock*Decoder name Created 3 years, 7 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
Index: media/base/mock_filters.cc
diff --git a/media/base/mock_filters.cc b/media/base/mock_filters.cc
index c088b57bf3e4c9e33710cee5f37bffa957bde9d1..3625ebd7b3160bfcd00ef50a156ee8f210f8791a 100644
--- a/media/base/mock_filters.cc
+++ b/media/base/mock_filters.cc
@@ -88,24 +88,26 @@ VideoRotation MockDemuxerStream::video_rotation() {
return VIDEO_ROTATION_0;
}
-std::string MockVideoDecoder::GetDisplayName() const {
- return "MockVideoDecoder";
-}
-
-MockVideoDecoder::MockVideoDecoder() {
+MockVideoDecoder::MockVideoDecoder(const std::string& decoder_name)
+ : decoder_name_(decoder_name) {
ON_CALL(*this, CanReadWithoutStalling()).WillByDefault(Return(true));
}
-std::string MockAudioDecoder::GetDisplayName() const {
- return "MockAudioDecoder";
-}
-
MockVideoDecoder::~MockVideoDecoder() {}
-MockAudioDecoder::MockAudioDecoder() {}
+std::string MockVideoDecoder::GetDisplayName() const {
+ return decoder_name_;
+}
+
+MockAudioDecoder::MockAudioDecoder(const std::string& decoder_name)
+ : decoder_name_(decoder_name) {}
MockAudioDecoder::~MockAudioDecoder() {}
+std::string MockAudioDecoder::GetDisplayName() const {
+ return decoder_name_;
+}
+
MockRendererClient::MockRendererClient() {}
MockRendererClient::~MockRendererClient() {}

Powered by Google App Engine
This is Rietveld 408576698