Copyright © 2005-2018 MultiMedia Soft

CastingStart method

Previous pageReturn to chapter overviewNext page

Remarks

 

Starts the casting session created by a previous call to one of the following methods:

 

for stream mixers: CastingCreateFromStreamMixer, CastingWmaPubPointOpenForStreamMixer or CastingWmaNetworkOpenForStreamMixer
for players: CastingCreateFromPlayer, CastingWmaPubPointOpenForPlayer or CastingWmaNetworkOpenForPlayer
for WASAPI loopback devices (Windows Vista and later versions only): CastingCreateFromWasapiLoopback, CastingWmaPubPointOpenFromWasapiLoopback, CastingWmaNetworkOpenFromWasapiLoopback

 

A started session can be stopped at any time through the CastingStop method.

 

The call to these methods will cause the engine to invoke the CallbackForCastingEvents delegate with its nEvent parameter set to one of the following values:

 

If the casting session has been initiated by a custom Stream Mixer, the call to the CastingStart method will generate the EV_CASTING_STREAM_MIXER_START event while the call to the CastingStop method will generate the EV_CASTING_STREAM_MIXER_STOP event.
If the casting session has been initiated by one of the available players, the call to the CastingStart method will generate the EV_CASTING_PLAYER_START event while the call to the CastingStop method or the completion of the transmission of the loaded file will generate the EV_CASTING_PLAYER_DONE event. During the transmission of the loaded file the container application can be informed about its advancement through the EV_CASTING_PLAYER_PERC event.
If the casting session has been initiated by a WASAPI loopback device, the call to the CastingStart method will generate the EV_CASTING_LOOPBACK_START event while the call to the CastingStop method will generate the EV_CASTING_LOOPBACK_STOP event.

 

Further information about management of casting sessions can be found inside the How to use the control as a source for streaming servers like SHOUTcast tutorial.

For further details about the use of WASAPI see the WASAPIMan class and the How to manage audio flow through WASAPI tutorial

 

 

Syntax

 

[Visual Basic]

Public Function CastingStart (

nCastingUniqueID as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes CastingStart (

Int32 nCastingUniqueID

);


 

[C++]

public: enumErrorCodes CastingStart (

Int32 nCastingUniqueID

);


 

 

Parameter

Description

 

 

nCastingUniqueID

Unique identifier of the casting session returned by a previous call to one of the following methods:

 

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful