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

Side by Side Diff: media/audio/audio_output_ipc.h

Issue 12102004: Renderer side audio device change wip... Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | media/base/audio_hardware_config.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 (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_AUDIO_AUDIO_OUTPUT_IPC_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
7 7
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "base/sync_socket.h" 9 #include "base/sync_socket.h"
10 #include "media/audio/audio_parameters.h" 10 #include "media/audio/audio_parameters.h"
11 #include "media/base/media_export.h" 11 #include "media/base/media_export.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 // Contains IPC notifications for the state of the server side 15 // Contains IPC notifications for the state of the server side
16 // (AudioOutputController) audio state changes and when an AudioOutputController 16 // (AudioOutputController) audio state changes and when an AudioOutputController
17 // has been created. Implemented by AudioOutputDevice. 17 // has been created. Implemented by AudioOutputDevice.
18 class MEDIA_EXPORT AudioOutputIPCDelegate { 18 class MEDIA_EXPORT AudioOutputIPCDelegate {
19 public: 19 public:
20 // Current status of the audio output stream in the browser process. Browser 20 // Current status of the audio output stream in the browser process. Browser
21 // sends information about the current playback state and error to the 21 // sends information about the current playback state and error to the
22 // renderer process using this type. 22 // renderer process using this type.
23 enum State { 23 enum State {
24 kPlaying, 24 kPlaying,
25 kPaused, 25 kPaused,
26 kError 26 kError,
27 kDeviceChange,
27 }; 28 };
28 29
29 // Called when state of an audio stream has changed. 30 // Called when state of an audio stream has changed.
30 virtual void OnStateChanged(State state) = 0; 31 virtual void OnStateChanged(State state) = 0;
31 32
32 // Called when an audio stream has been created. 33 // Called when an audio stream has been created.
33 // The shared memory |handle| points to a memory section that's used to 34 // The shared memory |handle| points to a memory section that's used to
34 // transfer audio buffers from the AudioOutputIPCDelegate back to the 35 // transfer audio buffers from the AudioOutputIPCDelegate back to the
35 // AudioRendererHost. The implementation of OnStreamCreated takes ownership. 36 // AudioRendererHost. The implementation of OnStreamCreated takes ownership.
36 // The |socket_handle| is used by AudioRendererHost to signal requests for 37 // The |socket_handle| is used by AudioRendererHost to signal requests for
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Sets the volume of the audio stream. 98 // Sets the volume of the audio stream.
98 virtual void SetVolume(int stream_id, double volume) = 0; 99 virtual void SetVolume(int stream_id, double volume) = 0;
99 100
100 protected: 101 protected:
101 virtual ~AudioOutputIPC(); 102 virtual ~AudioOutputIPC();
102 }; 103 };
103 104
104 } // namespace media 105 } // namespace media
105 106
106 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 107 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
OLDNEW
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | media/base/audio_hardware_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698