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

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

Issue 1186943003: Revert of Add support for the audio-output-device switching IPC mechanism to the renderer lower... (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
« 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
64 // Called when the AudioOutputIPC object is going away and/or when the IPC 60 // Called when the AudioOutputIPC object is going away and/or when the IPC
65 // channel has been closed and no more ipc requests can be made. 61 // channel has been closed and no more ipc requests can be made.
66 // Implementations should delete their owned AudioOutputIPC instance 62 // Implementations should delete their owned AudioOutputIPC instance
67 // immediately. 63 // immediately.
68 virtual void OnIPCClosed() = 0; 64 virtual void OnIPCClosed() = 0;
69 65
70 protected: 66 protected:
71 virtual ~AudioOutputIPCDelegate(); 67 virtual ~AudioOutputIPCDelegate();
72 }; 68 };
73 69
(...skipping 22 matching lines...) Expand all
96 // Pauses an audio stream. This should generate a call to 92 // Pauses an audio stream. This should generate a call to
97 // AudioOutputController::Pause(). 93 // AudioOutputController::Pause().
98 virtual void PauseStream() = 0; 94 virtual void PauseStream() = 0;
99 95
100 // Closes the audio stream which should shut down the corresponding 96 // Closes the audio stream which should shut down the corresponding
101 // AudioOutputController in the peer process. 97 // AudioOutputController in the peer process.
102 virtual void CloseStream() = 0; 98 virtual void CloseStream() = 0;
103 99
104 // Sets the volume of the audio stream. 100 // Sets the volume of the audio stream.
105 virtual void SetVolume(double volume) = 0; 101 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;
111 }; 102 };
112 103
113 } // namespace media 104 } // namespace media
114 105
115 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ 106 #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