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

Unified Diff: media/base/mock_filters.h

Issue 155695: Replace the guts of AudioRendererBase with calls to scaling algorithm. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/base/buffer_queue_unittest.cc ('k') | media/filters/audio_renderer_algorithm_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mock_filters.h
===================================================================
--- media/base/mock_filters.h (revision 22189)
+++ media/base/mock_filters.h (working copy)
@@ -13,6 +13,8 @@
#ifndef MEDIA_BASE_MOCK_FILTERS_H_
#define MEDIA_BASE_MOCK_FILTERS_H_
+#include <string>
+
#include "media/base/factory.h"
#include "media/base/filters.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -65,7 +67,7 @@
// MockFilterCallback.
class CallbackImpl : public CallbackRunner<Tuple0> {
public:
- CallbackImpl(MockFilterCallback* mock_callback)
+ explicit CallbackImpl(MockFilterCallback* mock_callback)
: mock_callback_(mock_callback) {
}
@@ -194,6 +196,15 @@
public:
MockAudioDecoder() {}
+ // Sets the essential media format keys for this decoder.
+ MockAudioDecoder(int channels, int sample_rate, int sample_bits) {
+ media_format_.SetAsString(MediaFormat::kMimeType,
+ mime_type::kUncompressedAudio);
+ media_format_.SetAsInteger(MediaFormat::kChannels, channels);
+ media_format_.SetAsInteger(MediaFormat::kSampleRate, sample_rate);
+ media_format_.SetAsInteger(MediaFormat::kSampleBits, sample_bits);
+ }
+
// MediaFilter implementation.
MOCK_METHOD0(Stop, void());
MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
« no previous file with comments | « media/base/buffer_queue_unittest.cc ('k') | media/filters/audio_renderer_algorithm_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698