The IToiMediaRecorderBase interface is the base interface for recorder instances. It contains only read-only methods and no control functionality.
import "IToiMediaRecorderBase.idl";
Public Member Functions | |
void | GetState (out TToiMediaRecorderState state) |
void | GetSessionId (out IToiMediaSession::TToiSessionId id) raises (TToiSessionViolationException) |
void | GetUrl (out string url) raises (TToiSessionViolationException) |
void | GetAssetId (out string assetId) raises (TToiSessionViolationException) |
void | GetParameter (in string name, out string value) raises (TToiInvalidArgumentException) |
void | SubscribeParameter (in string address, in string name) raises (TToiInvalidArgumentException) |
void | UnsubscribeParameter (in string address, in string name) raises (TToiInvalidArgumentException) |
void | ReleaseInstance () |
void | RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException) |
void | ReleaseObserver (in string address) raises (TToiInvalidArgumentException) |
Public Types | |
enum | TToiMediaRecorderState { STATE_IDLE, STATE_CONNECTING, STATE_PAUSED, STATE_RECORDING, STATE_FAILED } |
typedef TToiMediaRecorderState | TState |
State identifier used to identify the media recorder state.
STATE_IDLE |
In STATE_IDLE there is no active session. The media recorder does not handle a stream, and consequently has no connection to a media stream source. All functions requiring a session will raise a TToiSessionViolationException in STATE_IDLE. |
STATE_CONNECTING |
In STATE_CONNECTING the media recorder has an active session and is in the process of establishing a connection to a media stream source. |
STATE_PAUSED |
In STATE_PAUSED the media recorder has a connection to a media source but is not yet recording the stream. |
STATE_RECORDING |
In STATE_RECORDING the media recorder has a connection to a media source and records the stream. |
STATE_FAILED |
In STATE_FAILED the media recorder may or may not have a connection to a media source but the process of getting the stream from that source has failed in some fatal way. |
void IToiMediaRecorderBase::GetAssetId | ( | out string | assetId | ) | raises (TToiSessionViolationException) |
Returns the asset used for recording.
assetId | The asset identifier. |
TToiSessionViolationException | If the recorder is in idle state a session violation exception is raised. |
void IToiMediaRecorderBase::GetParameter | ( | in string | name, | |
out string | value | |||
) | raises (TToiInvalidArgumentException) |
Get the current value of a parameter.
name | Name of the requested parameter. |
value | The current value of the parameter. |
TToiInvalidArgumentException | The parameter name is invalid or not recognized. |
void IToiMediaRecorderBase::GetSessionId | ( | out IToiMediaSession::TToiSessionId | id | ) | raises (TToiSessionViolationException) |
Returns the session identifier. This identifier can be used to open a session object with IToiMediaService::OpenSession().
id | The session identifier. |
TToiSessionViolationException | If the player is in STATE_IDLE a session violation exception is raised. |
void IToiMediaRecorderBase::GetState | ( | out TToiMediaRecorderState | state | ) |
Returns the current state of the media recorder instance.
state | The current recorder state. |
void IToiMediaRecorderBase::GetUrl | ( | out string | url | ) | raises (TToiSessionViolationException) |
Returns the URL for the media stream.
url | The URL for the media stream. |
TToiSessionViolationException | If the recorder is in idle state a session violation exception is raised. |
void IToiMediaRecorderBase::RegisterObserver | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
in string | address | |||
) | raises (TToiInvalidArgumentException) |
Register an observer of type IToiMediaRecorderObserver. The observer will receive events sent by this IToiMediaRecorderBase instance.
applicationId | The identifier of the observing application. | |
address | The address where the IToiMediaRecorderBase can find an IToiMediaRecorderObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address. |
void IToiMediaRecorderBase::ReleaseInstance | ( | ) |
This function releases the resources used by this instance. When this function returns all observers has also been released.
void IToiMediaRecorderBase::ReleaseObserver | ( | in string | address | ) | raises (TToiInvalidArgumentException) |
Release an observer previously registered with RegisterObserver.
address | The address where the IToiMediaRecorderBase can find the registered IToiMediaRecorderObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid. |
void IToiMediaRecorderBase::SubscribeParameter | ( | in string | address, | |
in string | name | |||
) | raises (TToiInvalidArgumentException) |
This function makes the application subscribe to updates of a specific named parameter. When the subscription is made there will be an immediate call to IToiMediaRecorderObserver::OnParameterChanged() if there is a value available.
address | The observer address of the parameter that is subscribed. | |
name | The name of the parameter for which changes the application wants to subscribe to. |
TToiInvalidArgumentException | The parameter name is invalid or not recognized. |
void IToiMediaRecorderBase::UnsubscribeParameter | ( | in string | address, | |
in string | name | |||
) | raises (TToiInvalidArgumentException) |
This function undoes the effect of a previous call to SubscribeParameter().
address | The observer address of the parameter that is unsubscribed. | |
name | The name of the parameter that the application is no longer interested in. |
TToiInvalidArgumentException | The parameter name is invalid or not recognized. |