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

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

Issue 623263003: replace OVERRIDE and FINAL with override and final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « media/base/fake_audio_render_callback.h ('k') | media/base/fake_text_track_stream.h » ('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 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 #ifndef MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_ 5 #ifndef MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_
6 #define MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_ 6 #define MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_
7 7
8 #include "media/audio/audio_parameters.h" 8 #include "media/audio/audio_parameters.h"
9 #include "media/base/audio_renderer_sink.h" 9 #include "media/base/audio_renderer_sink.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 class FakeAudioRendererSink : public AudioRendererSink { 13 class FakeAudioRendererSink : public AudioRendererSink {
14 public: 14 public:
15 enum State { 15 enum State {
16 kUninitialized, 16 kUninitialized,
17 kInitialized, 17 kInitialized,
18 kStarted, 18 kStarted,
19 kPaused, 19 kPaused,
20 kPlaying, 20 kPlaying,
21 kStopped 21 kStopped
22 }; 22 };
23 23
24 FakeAudioRendererSink(); 24 FakeAudioRendererSink();
25 25
26 virtual void Initialize(const AudioParameters& params, 26 virtual void Initialize(const AudioParameters& params,
27 RenderCallback* callback) OVERRIDE; 27 RenderCallback* callback) override;
28 virtual void Start() OVERRIDE; 28 virtual void Start() override;
29 virtual void Stop() OVERRIDE; 29 virtual void Stop() override;
30 virtual void Pause() OVERRIDE; 30 virtual void Pause() override;
31 virtual void Play() OVERRIDE; 31 virtual void Play() override;
32 virtual bool SetVolume(double volume) OVERRIDE; 32 virtual bool SetVolume(double volume) override;
33 33
34 // Attempts to call Render() on the callback provided to 34 // Attempts to call Render() on the callback provided to
35 // Initialize() with |dest| and |audio_delay_milliseconds|. 35 // Initialize() with |dest| and |audio_delay_milliseconds|.
36 // Returns true and sets |frames_written| to the return value of the 36 // Returns true and sets |frames_written| to the return value of the
37 // Render() call. 37 // Render() call.
38 // Returns false if this object is in a state where calling Render() 38 // Returns false if this object is in a state where calling Render()
39 // should not occur. (i.e., in the kPaused or kStopped state.) The 39 // should not occur. (i.e., in the kPaused or kStopped state.) The
40 // value of |frames_written| is undefined if false is returned. 40 // value of |frames_written| is undefined if false is returned.
41 bool Render(AudioBus* dest, int audio_delay_milliseconds, 41 bool Render(AudioBus* dest, int audio_delay_milliseconds,
42 int* frames_written); 42 int* frames_written);
43 void OnRenderError(); 43 void OnRenderError();
44 44
45 State state() const { return state_; } 45 State state() const { return state_; }
46 46
47 protected: 47 protected:
48 virtual ~FakeAudioRendererSink(); 48 virtual ~FakeAudioRendererSink();
49 49
50 private: 50 private:
51 void ChangeState(State new_state); 51 void ChangeState(State new_state);
52 52
53 State state_; 53 State state_;
54 RenderCallback* callback_; 54 RenderCallback* callback_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(FakeAudioRendererSink); 56 DISALLOW_COPY_AND_ASSIGN(FakeAudioRendererSink);
57 }; 57 };
58 58
59 } // namespace media 59 } // namespace media
60 60
61 #endif // MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_ 61 #endif // MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_
OLDNEW
« no previous file with comments | « media/base/fake_audio_render_callback.h ('k') | media/base/fake_text_track_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698