| Index: media/base/mock_filters.h
|
| diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
|
| index e140818693fa331e42802a02e6cf1445df6fdcc5..ca60179af80a00f22100433145143ff11e4a7293 100644
|
| --- a/media/base/mock_filters.h
|
| +++ b/media/base/mock_filters.h
|
| @@ -101,7 +101,7 @@ class MockDataSource : public DataSource {
|
| // DataSource implementation.
|
| MOCK_METHOD2(Initialize, void(const std::string& url,
|
| FilterCallback* callback));
|
| - const MediaFormat& media_format() { return media_format_; }
|
| + MOCK_METHOD0(media_format, const MediaFormat&());
|
| MOCK_METHOD4(Read, void(int64 position, size_t size, uint8* data,
|
| DataSource::ReadCallback* callback));
|
| MOCK_METHOD1(GetSize, bool(int64* size_out));
|
| @@ -111,8 +111,6 @@ class MockDataSource : public DataSource {
|
| virtual ~MockDataSource() {}
|
|
|
| private:
|
| - MediaFormat media_format_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MockDataSource);
|
| };
|
|
|
| @@ -143,14 +141,8 @@ class MockDemuxerStream : public DemuxerStream {
|
| public:
|
| MockDemuxerStream() {}
|
|
|
| - // Sets the mime type of this object's media format, which is usually checked
|
| - // to determine the type of decoder to create.
|
| - explicit MockDemuxerStream(const std::string& mime_type) {
|
| - media_format_.SetAsString(MediaFormat::kMimeType, mime_type);
|
| - }
|
| -
|
| // DemuxerStream implementation.
|
| - const MediaFormat& media_format() { return media_format_; }
|
| + MOCK_METHOD0(media_format, const MediaFormat&());
|
| MOCK_METHOD1(Read, void(Callback1<Buffer*>::Type* read_callback));
|
| MOCK_METHOD1(QueryInterface, void*(const char* interface_id));
|
|
|
| @@ -167,13 +159,6 @@ class MockVideoDecoder : public VideoDecoder {
|
| public:
|
| MockVideoDecoder() {}
|
|
|
| - // Sets the essential media format keys for this decoder.
|
| - MockVideoDecoder(const std::string& mime_type, int width, int height) {
|
| - media_format_.SetAsString(MediaFormat::kMimeType, mime_type);
|
| - media_format_.SetAsInteger(MediaFormat::kWidth, width);
|
| - media_format_.SetAsInteger(MediaFormat::kHeight, height);
|
| - }
|
| -
|
| // MediaFilter implementation.
|
| MOCK_METHOD0(Stop, void());
|
| MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
|
| @@ -183,15 +168,13 @@ class MockVideoDecoder : public VideoDecoder {
|
| // VideoDecoder implementation.
|
| MOCK_METHOD2(Initialize, void(DemuxerStream* stream,
|
| FilterCallback* callback));
|
| - const MediaFormat& media_format() { return media_format_; }
|
| + MOCK_METHOD0(media_format, const MediaFormat&());
|
| MOCK_METHOD1(Read, void(Callback1<VideoFrame*>::Type* read_callback));
|
|
|
| protected:
|
| virtual ~MockVideoDecoder() {}
|
|
|
| private:
|
| - MediaFormat media_format_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder);
|
| };
|
|
|
| @@ -199,15 +182,6 @@ class MockAudioDecoder : public AudioDecoder {
|
| 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));
|
| @@ -217,15 +191,13 @@ class MockAudioDecoder : public AudioDecoder {
|
| // AudioDecoder implementation.
|
| MOCK_METHOD2(Initialize, void(DemuxerStream* stream,
|
| FilterCallback* callback));
|
| - const MediaFormat& media_format() { return media_format_; }
|
| + MOCK_METHOD0(media_format, const MediaFormat&());
|
| MOCK_METHOD1(Read, void(Callback1<Buffer*>::Type* read_callback));
|
|
|
| protected:
|
| virtual ~MockAudioDecoder() {}
|
|
|
| private:
|
| - MediaFormat media_format_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder);
|
| };
|
|
|
|
|