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

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

Issue 1184473002: Add support for the audio-output-device switching IPC mechanism to the renderer lower layers (media… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_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 <string> 8 #include <string>
9 9
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // transfer audio buffers from the AudioOutputIPCDelegate back to the 49 // transfer audio buffers from the AudioOutputIPCDelegate back to the
50 // AudioRendererHost. The implementation of OnStreamCreated takes ownership. 50 // AudioRendererHost. The implementation of OnStreamCreated takes ownership.
51 // The |socket_handle| is used by AudioRendererHost to signal requests for 51 // The |socket_handle| is used by AudioRendererHost to signal requests for
52 // audio data to be written into the shared memory. The AudioOutputIPCDelegate 52 // audio data to be written into the shared memory. The AudioOutputIPCDelegate
53 // must read from this socket and provide audio whenever data (search for 53 // must read from this socket and provide audio whenever data (search for
54 // "pending_bytes") is received. 54 // "pending_bytes") is received.
55 virtual void OnStreamCreated(base::SharedMemoryHandle handle, 55 virtual void OnStreamCreated(base::SharedMemoryHandle handle,
56 base::SyncSocket::Handle socket_handle, 56 base::SyncSocket::Handle socket_handle,
57 int length) = 0; 57 int length) = 0;
58 58
59 // Called when an attempt to switch the output device has been completed
60 virtual void OnOutputDeviceSwitched(int request_id,
61 SwitchOutputDeviceResult result) = 0;
62
59 // Called when the AudioOutputIPC object is going away and/or when the IPC 63 // Called when the AudioOutputIPC object is going away and/or when the IPC
60 // channel has been closed and no more ipc requests can be made. 64 // channel has been closed and no more ipc requests can be made.
61 // Implementations should delete their owned AudioOutputIPC instance 65 // Implementations should delete their owned AudioOutputIPC instance
62 // immediately. 66 // immediately.
63 virtual void OnIPCClosed() = 0; 67 virtual void OnIPCClosed() = 0;
64 68
65 protected: 69 protected:
66 virtual ~AudioOutputIPCDelegate(); 70 virtual ~AudioOutputIPCDelegate();
67 }; 71 };
68 72
(...skipping 22 matching lines...) Expand all
91 // Pauses an audio stream. This should generate a call to 95 // Pauses an audio stream. This should generate a call to
92 // AudioOutputController::Pause(). 96 // AudioOutputController::Pause().
93 virtual void PauseStream() = 0; 97 virtual void PauseStream() = 0;
94 98
95 // Closes the audio stream which should shut down the corresponding 99 // Closes the audio stream which should shut down the corresponding
96 // AudioOutputController in the peer process. 100 // AudioOutputController in the peer process.
97 virtual void CloseStream() = 0; 101 virtual void CloseStream() = 0;
98 102
99 // Sets the volume of the audio stream. 103 // Sets the volume of the audio stream.
100 virtual void SetVolume(double volume) = 0; 104 virtual void SetVolume(double volume) = 0;
105
106 // Switches the output device of the audio stream.
107 virtual void SwitchOutputDevice(const std::string& device_id,
108 const GURL& security_origin,
109 int request_id) = 0;
101 }; 110 };
102 111
103 } // namespace media 112 } // namespace media
104 113
105 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 114 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698