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

Unified Diff: media/base/mock_filters.cc

Issue 2837613004: media: Support better decoder switching (Closed)
Patch Set: update GetDisplayName() comments 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..4be77cf1cf4bf32c908ca3fc8a3ea4daf6f5d869 100644
--- a/media/base/mock_filters.cc
+++ b/media/base/mock_filters.cc
@@ -88,24 +88,25 @@ 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_.empty() ? "MockVideoDecoder" : decoder_name_;
+}
+MockAudioDecoder::MockAudioDecoder(const std::string& decoder_name)
+ : decoder_name_(decoder_name) {}
MockAudioDecoder::~MockAudioDecoder() {}
+std::string MockAudioDecoder::GetDisplayName() const {
+ return decoder_name_.empty() ? "MockAudioDecoder" : decoder_name_;
+}
+
MockRendererClient::MockRendererClient() {}
MockRendererClient::~MockRendererClient() {}

Powered by Google App Engine
This is Rietveld 408576698