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

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

Powered by Google App Engine
This is Rietveld 408576698