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

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

Issue 208263018: Add SupportsConfigChanges() to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audioconverterchunk
Patch Set: Make comment not specific to video_decoder_config(). Created 6 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "media/base/audio_decoder_config.h" 6 #include "media/base/audio_decoder_config.h"
7 #include "media/base/demuxer_stream.h" 7 #include "media/base/demuxer_stream.h"
8 #include "media/base/video_decoder_config.h" 8 #include "media/base/video_decoder_config.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 // Fake implementation of the DemuxerStream. These are the stream objects 13 // Fake implementation of the DemuxerStream. These are the stream objects
14 // we pass to the text renderer object when streams are added and removed. 14 // we pass to the text renderer object when streams are added and removed.
15 class FakeTextTrackStream : public DemuxerStream { 15 class FakeTextTrackStream : public DemuxerStream {
16 public: 16 public:
17 FakeTextTrackStream(); 17 FakeTextTrackStream();
18 virtual ~FakeTextTrackStream(); 18 virtual ~FakeTextTrackStream();
19 19
20 // DemuxerStream implementation. 20 // DemuxerStream implementation.
21 virtual void Read(const ReadCB&) OVERRIDE; 21 virtual void Read(const ReadCB&) OVERRIDE;
22 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig()); 22 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig());
23 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig()); 23 MOCK_METHOD0(video_decoder_config, VideoDecoderConfig());
24 virtual Type type() OVERRIDE; 24 virtual Type type() OVERRIDE;
25 MOCK_METHOD0(EnableBitstreamConverter, void()); 25 MOCK_METHOD0(EnableBitstreamConverter, void());
26 virtual bool SupportsConfigChanges();
26 27
27 void SatisfyPendingRead(const base::TimeDelta& start, 28 void SatisfyPendingRead(const base::TimeDelta& start,
28 const base::TimeDelta& duration, 29 const base::TimeDelta& duration,
29 const std::string& id, 30 const std::string& id,
30 const std::string& content, 31 const std::string& content,
31 const std::string& settings); 32 const std::string& settings);
32 void AbortPendingRead(); 33 void AbortPendingRead();
33 void SendEosNotification(); 34 void SendEosNotification();
34 35
35 void Stop(); 36 void Stop();
36 37
37 MOCK_METHOD0(OnRead, void()); 38 MOCK_METHOD0(OnRead, void());
38 39
39 private: 40 private:
40 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 41 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
41 ReadCB read_cb_; 42 ReadCB read_cb_;
42 bool stopping_; 43 bool stopping_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream); 45 DISALLOW_COPY_AND_ASSIGN(FakeTextTrackStream);
45 }; 46 };
46 47
47 } // namespace media 48 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698