MediaSource.BeginPrepareSource Method

Prepares the media source.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Function BeginPrepareSource ( _
    mode As MediaSourceOpenMode, _
    userCallback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As MediaSource
Dim mode As MediaSourceOpenMode
Dim userCallback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginPrepareSource(mode, _
    userCallback, state)
public IAsyncResult BeginPrepareSource(
    MediaSourceOpenMode mode,
    AsyncCallback userCallback,
    Object state
)

Parameters

  • userCallback
    Type: System.AsyncCallback
    The method to be called when the asynchronous operation is completed.
  • state
    Type: System.Object
    A user-provided object that distinguishes this particular asynchronous operation from other asynchronous operations.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation.

Exceptions

Exception Condition
ArgumentOutOfRangeException

Thrown when the mode argument is not a value in the MediaSourceOpenMode enumerated type.

InvalidOperationException

Thrown when the audio/video platform is not initialized.

Remarks

An application must call this method before any Player begins playing a MediaSource. The application must also call EndPrepareSource.

See Also

Reference

MediaSource Class

MediaSource Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace