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

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

Issue 2752323002: Support Opus Ambisonics playback (Closed)
Patch Set: another fix for unreliable ffmpeg channels vs layout Created 3 years, 7 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/audio_decoder_config.cc ('k') | media/base/fake_audio_renderer_sink.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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Attempts to call Render() on the callback provided to 45 // Attempts to call Render() on the callback provided to
46 // Initialize() with |dest| and |delay|. 46 // Initialize() with |dest| and |delay|.
47 // Returns true and sets |frames_written| to the return value of the 47 // Returns true and sets |frames_written| to the return value of the
48 // Render() call. 48 // Render() call.
49 // Returns false if this object is in a state where calling Render() 49 // Returns false if this object is in a state where calling Render()
50 // should not occur. (i.e., in the kPaused or kStopped state.) The 50 // should not occur. (i.e., in the kPaused or kStopped state.) The
51 // value of |frames_written| is undefined if false is returned. 51 // value of |frames_written| is undefined if false is returned.
52 bool Render(AudioBus* dest, base::TimeDelta delay, int* frames_written); 52 bool Render(AudioBus* dest, base::TimeDelta delay, int* frames_written);
53 void OnRenderError(); 53 void OnRenderError();
54 54
55 // Enables different tests to have different settings.
56 void SetIsOptimizedForHardwareParameters(bool value);
57
55 State state() const { return state_; } 58 State state() const { return state_; }
56 59
57 protected: 60 protected:
58 ~FakeAudioRendererSink() override; 61 ~FakeAudioRendererSink() override;
59 62
60 private: 63 private:
61 void ChangeState(State new_state); 64 void ChangeState(State new_state);
62 65
63 State state_; 66 State state_;
64 RenderCallback* callback_; 67 RenderCallback* callback_;
65 OutputDeviceInfo output_device_info_; 68 OutputDeviceInfo output_device_info_;
69 bool is_optimized_for_hw_params_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(FakeAudioRendererSink); 71 DISALLOW_COPY_AND_ASSIGN(FakeAudioRendererSink);
68 }; 72 };
69 73
70 } // namespace media 74 } // namespace media
71 75
72 #endif // MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_ 76 #endif // MEDIA_BASE_FAKE_AUDIO_RENDERER_SINK_H_
OLDNEW
« no previous file with comments | « media/base/audio_decoder_config.cc ('k') | media/base/fake_audio_renderer_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698