Recorder.SetSink Method
Sets the media sink for this recorder.
Namespace: Microsoft.Rtc.Collaboration.AudioVideo
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Sub SetSink ( _
sink As MediaSink _
)
'Usage
Dim instance As Recorder
Dim sink As MediaSink
instance.SetSink(sink)
public void SetSink(
MediaSink sink
)
Parameters
- sink
Type: Microsoft.Rtc.Collaboration.AudioVideo.MediaSink
The media sink that is recorded to.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the sink parameter is null. |
InvalidOperationException | Thrown when the sink provided has already been associated with another recorder. |
Remarks
If the recorder is not Stopped, SetSink stops it. This method throws an exception if it is called with a media sink associated with another recorder.
Examples
The following example shows Recorder removing a MediaSink and then setting and starting to record.
C# Removing and setting MediaSink.
// In case no sink is set, RemoveSink will be no-op.
recorder.RemoveSink();
recorder.AttachFlow(audioVideoFlow);
recorder.SetSink(sink);
recorder.Start();