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

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

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 years, 6 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 (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_AUDIO_RENDERER_H_ 5 #ifndef MEDIA_BASE_AUDIO_RENDERER_H_
6 #define MEDIA_BASE_AUDIO_RENDERER_H_ 6 #define MEDIA_BASE_AUDIO_RENDERER_H_
7 7
8 #include <string>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/time/time.h" 11 #include "base/time/time.h"
10 #include "media/base/buffering_state.h" 12 #include "media/base/buffering_state.h"
11 #include "media/base/decryptor.h" 13 #include "media/base/decryptor.h"
12 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
13 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
16 #include "url/gurl.h"
14 17
15 namespace media { 18 namespace media {
16 19
17 class DemuxerStream; 20 class DemuxerStream;
18 class TimeSource; 21 class TimeSource;
19 22
20 class MEDIA_EXPORT AudioRenderer { 23 class MEDIA_EXPORT AudioRenderer {
21 public: 24 public:
22 AudioRenderer(); 25 AudioRenderer();
23 26
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void Flush(const base::Closure& callback) = 0; 65 virtual void Flush(const base::Closure& callback) = 0;
63 66
64 // Starts playback by reading from |stream| and decoding and rendering audio. 67 // Starts playback by reading from |stream| and decoding and rendering audio.
65 // 68 //
66 // Only valid to call after a successful Initialize() or Flush(). 69 // Only valid to call after a successful Initialize() or Flush().
67 virtual void StartPlaying() = 0; 70 virtual void StartPlaying() = 0;
68 71
69 // Sets the output volume. 72 // Sets the output volume.
70 virtual void SetVolume(float volume) = 0; 73 virtual void SetVolume(float volume) = 0;
71 74
75 // Switches the output device.
miu 2015/06/03 21:01:01 Please do the same here as I suggested in AudioRen
76 virtual void SwitchOutputDevice(
77 const std::string& device_id,
78 const GURL& security_origin,
79 const base::Callback<void(int)>& callback) = 0;
80
72 private: 81 private:
73 DISALLOW_COPY_AND_ASSIGN(AudioRenderer); 82 DISALLOW_COPY_AND_ASSIGN(AudioRenderer);
74 }; 83 };
75 84
76 } // namespace media 85 } // namespace media
77 86
78 #endif // MEDIA_BASE_AUDIO_RENDERER_H_ 87 #endif // MEDIA_BASE_AUDIO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698