pub struct CaptureSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CaptureSynchronousProxy
impl CaptureSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CaptureEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CaptureEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn start_output_capture(
&self,
___deadline: MonotonicInstant,
) -> Result<CaptureStartOutputCaptureResult, Error>
pub fn start_output_capture( &self, ___deadline: MonotonicInstant, ) -> Result<CaptureStartOutputCaptureResult, Error>
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.
Sourcepub fn stop_output_capture(
&self,
___deadline: MonotonicInstant,
) -> Result<CaptureStopOutputCaptureResult, Error>
pub fn stop_output_capture( &self, ___deadline: MonotonicInstant, ) -> Result<CaptureStopOutputCaptureResult, Error>
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.
Sourcepub fn get_output_audio(
&self,
___deadline: MonotonicInstant,
) -> Result<CaptureGetOutputAudioResult, Error>
pub fn get_output_audio( &self, ___deadline: MonotonicInstant, ) -> Result<CaptureGetOutputAudioResult, Error>
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.
Trait Implementations§
Source§impl Debug for CaptureSynchronousProxy
impl Debug for CaptureSynchronousProxy
Source§impl From<CaptureSynchronousProxy> for Handle
impl From<CaptureSynchronousProxy> for Handle
Source§fn from(value: CaptureSynchronousProxy) -> Self
fn from(value: CaptureSynchronousProxy) -> Self
Source§impl From<Channel> for CaptureSynchronousProxy
impl From<Channel> for CaptureSynchronousProxy
Source§impl SynchronousProxy for CaptureSynchronousProxy
impl SynchronousProxy for CaptureSynchronousProxy
Source§type Proxy = CaptureProxy
type Proxy = CaptureProxy
Source§type Protocol = CaptureMarker
type Protocol = CaptureMarker
Proxy
controls.