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

Side by Side Diff: media/base/mock_filters.h

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « media/base/fake_text_track_stream.cc ('k') | media/base/mock_filters.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ 5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_
6 #define MEDIA_BASE_MOCK_FILTERS_H_ 6 #define MEDIA_BASE_MOCK_FILTERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 23 matching lines...) Expand all
34 // Demuxer implementation. 34 // Demuxer implementation.
35 MOCK_METHOD3(Initialize, 35 MOCK_METHOD3(Initialize,
36 void(DemuxerHost* host, const PipelineStatusCB& cb, bool)); 36 void(DemuxerHost* host, const PipelineStatusCB& cb, bool));
37 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 37 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
38 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb)); 38 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb));
39 MOCK_METHOD0(Stop, void()); 39 MOCK_METHOD0(Stop, void());
40 MOCK_METHOD0(OnAudioRendererDisabled, void()); 40 MOCK_METHOD0(OnAudioRendererDisabled, void());
41 MOCK_METHOD1(GetStream, DemuxerStream*(DemuxerStream::Type)); 41 MOCK_METHOD1(GetStream, DemuxerStream*(DemuxerStream::Type));
42 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta()); 42 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta());
43 MOCK_CONST_METHOD0(GetTimelineOffset, base::Time()); 43 MOCK_CONST_METHOD0(GetTimelineOffset, base::Time());
44 MOCK_CONST_METHOD0(GetLiveness, Liveness());
45 44
46 private: 45 private:
47 DISALLOW_COPY_AND_ASSIGN(MockDemuxer); 46 DISALLOW_COPY_AND_ASSIGN(MockDemuxer);
48 }; 47 };
49 48
50 class MockDemuxerStream : public DemuxerStream { 49 class MockDemuxerStream : public DemuxerStream {
51 public: 50 public:
52 explicit MockDemuxerStream(DemuxerStream::Type type); 51 explicit MockDemuxerStream(DemuxerStream::Type type);
53 virtual ~MockDemuxerStream(); 52 virtual ~MockDemuxerStream();
54 53
55 // DemuxerStream implementation. 54 // DemuxerStream implementation.
56 virtual Type type() override; 55 Type type() const override;
56 Liveness liveness() const override;
57 MOCK_METHOD1(Read, void(const ReadCB& read_cb)); 57 MOCK_METHOD1(Read, void(const ReadCB& read_cb));
58 virtual AudioDecoderConfig audio_decoder_config() override; 58 AudioDecoderConfig audio_decoder_config() override;
59 virtual VideoDecoderConfig video_decoder_config() override; 59 VideoDecoderConfig video_decoder_config() override;
60 MOCK_METHOD0(EnableBitstreamConverter, void()); 60 MOCK_METHOD0(EnableBitstreamConverter, void());
61 MOCK_METHOD0(SupportsConfigChanges, bool()); 61 MOCK_METHOD0(SupportsConfigChanges, bool());
62 62
63 void set_audio_decoder_config(const AudioDecoderConfig& config); 63 void set_audio_decoder_config(const AudioDecoderConfig& config);
64 void set_video_decoder_config(const VideoDecoderConfig& config); 64 void set_video_decoder_config(const VideoDecoderConfig& config);
65 void set_liveness(Liveness liveness);
65 66
66 virtual VideoRotation video_rotation() override; 67 VideoRotation video_rotation() override;
67 68
68 private: 69 private:
69 DemuxerStream::Type type_; 70 Type type_;
71 Liveness liveness_;
70 AudioDecoderConfig audio_decoder_config_; 72 AudioDecoderConfig audio_decoder_config_;
71 VideoDecoderConfig video_decoder_config_; 73 VideoDecoderConfig video_decoder_config_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); 75 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream);
74 }; 76 };
75 77
76 class MockVideoDecoder : public VideoDecoder { 78 class MockVideoDecoder : public VideoDecoder {
77 public: 79 public:
78 MockVideoDecoder(); 80 MockVideoDecoder();
79 virtual ~MockVideoDecoder(); 81 virtual ~MockVideoDecoder();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 private: 114 private:
113 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); 115 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder);
114 }; 116 };
115 117
116 class MockVideoRenderer : public VideoRenderer { 118 class MockVideoRenderer : public VideoRenderer {
117 public: 119 public:
118 MockVideoRenderer(); 120 MockVideoRenderer();
119 virtual ~MockVideoRenderer(); 121 virtual ~MockVideoRenderer();
120 122
121 // VideoRenderer implementation. 123 // VideoRenderer implementation.
122 MOCK_METHOD9(Initialize, void(DemuxerStream* stream, 124 MOCK_METHOD8(Initialize, void(DemuxerStream* stream,
123 bool low_delay,
124 const PipelineStatusCB& init_cb, 125 const PipelineStatusCB& init_cb,
125 const StatisticsCB& statistics_cb, 126 const StatisticsCB& statistics_cb,
126 const BufferingStateCB& buffering_state_cb, 127 const BufferingStateCB& buffering_state_cb,
127 const PaintCB& paint_cb, 128 const PaintCB& paint_cb,
128 const base::Closure& ended_cb, 129 const base::Closure& ended_cb,
129 const PipelineStatusCB& error_cb, 130 const PipelineStatusCB& error_cb,
130 const TimeDeltaCB& get_time_cb)); 131 const TimeDeltaCB& get_time_cb));
131 MOCK_METHOD1(Flush, void(const base::Closure& callback)); 132 MOCK_METHOD1(Flush, void(const base::Closure& callback));
132 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta)); 133 MOCK_METHOD1(StartPlayingFrom, void(base::TimeDelta));
133 134
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 MOCK_METHOD1(ResetDecoder, void(StreamType stream_type)); 241 MOCK_METHOD1(ResetDecoder, void(StreamType stream_type));
241 MOCK_METHOD1(DeinitializeDecoder, void(StreamType stream_type)); 242 MOCK_METHOD1(DeinitializeDecoder, void(StreamType stream_type));
242 243
243 private: 244 private:
244 DISALLOW_COPY_AND_ASSIGN(MockDecryptor); 245 DISALLOW_COPY_AND_ASSIGN(MockDecryptor);
245 }; 246 };
246 247
247 } // namespace media 248 } // namespace media
248 249
249 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 250 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/fake_text_track_stream.cc ('k') | media/base/mock_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698