pub enum CaptureRequest {
StartOutputCapture {
responder: CaptureStartOutputCaptureResponder,
},
StopOutputCapture {
responder: CaptureStopOutputCaptureResponder,
},
GetOutputAudio {
responder: CaptureGetOutputAudioResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: CaptureControlHandle,
method_type: MethodType,
},
}
Variants§
StartOutputCapture
Start capturing the outgoing audio for this device.
A virtual output device receives what would have played through the device’s speakers. This method reads from that virtual output device, into an internal buffer.
After calling this method, use StopOutputCapture
to stop recording output and
then GetOutputAudio
to retrieve this captured audio.
- response
error
description of failure action to take.
Fields
responder: CaptureStartOutputCaptureResponder
StopOutputCapture
Stop capturing the outgoing audio for this device.
This method will succeed even if no output capture has been started.
After calling this method, use GetOutputAudio
to retrieve the captured
audio from the virtual device’s internal buffer and return it to the client.
- response
error
description of failure action to take.
Fields
responder: CaptureStopOutputCaptureResponder
GetOutputAudio
Extract the captured outgoing audio data through a socket.
The socket is closed once it is fully drained.
User should have first called StartOutputCapture
and StopOutputCapture
. This method will
return the contents of the internal buffer that was populated between the calls to those
two methods.
Audio output format is 2-channel 48kHz 16-bit PCM.
- request
audio_reader
socket where full captured audio data will be streamed.
- response
error
description of failure action to take.
Fields
responder: CaptureGetOutputAudioResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: CaptureControlHandle
method_type: MethodType
Implementations§
Source§impl CaptureRequest
impl CaptureRequest
pub fn into_start_output_capture( self, ) -> Option<CaptureStartOutputCaptureResponder>
pub fn into_stop_output_capture( self, ) -> Option<CaptureStopOutputCaptureResponder>
pub fn into_get_output_audio(self) -> Option<CaptureGetOutputAudioResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL