IMediaPlayer Interface Reference


Description

This internal interface provides methods for platform services that don't have an application id.

import "IMediaPlayer.idl";

List of all members.

Public Member Functions

void RegisterObserverInternal (in string address) raises (TToiInvalidArgumentException)
void Open (in string url) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void Close () raises (TToiSessionViolationException, TToiUnavailableException)
void Play (in long pace) raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException)
void PlayFromPosition (in long position, in long pace) raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiInvalidArgumentException, TToiUnavailableException)
void StartTimeshiftBuffering (in long maxBufferLength) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException, TToiUnavailableException)
void StopTimeshiftBuffering () raises (TToiSessionViolationException, TToiInvalidPreconditionException, TToiUnavailableException)
void DiscardTimeshiftBuffer () raises (TToiSessionViolationException, TToiInvalidPreconditionException, TToiUnavailableException)
void ActivateComponent (in IToiMediaPlayerBase::TToiComponentEntry mediaComponent) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void DeactivateComponent (in IToiMediaPlayerBase::TToiComponentType mediaType) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void SetAudioChannelMode (in long streamId, in IToiMediaPlayerBase::TToiAudioChannelMode channelMode) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void SetParameter (in string name, in string value) raises (TToiInvalidArgumentException, TToiPermissionDeniedException, TToiUnavailableException)
void UnsetParameter (in string name) raises (TToiInvalidArgumentException, TToiPermissionDeniedException, TToiUnavailableException)
void GetState (out TToiState state)
void GetError (out TToiError error)
void GetSessionId (out IToiMediaSession::TToiSessionId id) raises (TToiSessionViolationException)
void GetUrl (out string url) raises (TToiSessionViolationException)
void GetStreamInfo (out TToiStreamInfo streamInfo) raises (TToiSessionViolationException, TToiUnavailableException)
void GetVideoStreamInfo (in TToiComponentEntry mediaComponent, out TToiVideoStreamInfo streamInfo) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void GetAudioStreamInfo (in TToiComponentEntry mediaComponent, out TToiAudioStreamInfo streamInfo) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void GetSubtitleStreamInfo (in TToiComponentEntry mediaComponent, out TToiSubtitleStreamInfo streamInfo) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void GetTeletextStreamInfo (in TToiComponentEntry mediaComponent, out TToiTeletextStreamInfo streamInfo) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException)
void GetCapabilities (out long capabilityMask) raises (TToiSessionViolationException, TToiUnavailableException)
void GetPosition (out long position) raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException)
void GetPace (out long pace) raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException)
void IsTimeshiftPlayback (out boolean timeshiftPlayback) raises (TToiSessionViolationException, TToiUnavailableException)
void GetTimeshiftInfo (out TToiTimeshiftInfo timeshiftInfo) raises (TToiSessionViolationException, TToiUnavailableException)
void GetTimeshiftError (out TToiError timeshiftError)
void GetActiveComponents (out TToiComponentSequence components) raises (TToiSessionViolationException, TToiUnavailableException)
void GetParameter (in string name, out string value) raises (TToiInvalidArgumentException, TToiUnavailableException)
void SubscribeParameter (in string address, in string name) raises (TToiInvalidArgumentException, TToiUnavailableException)
void UnsubscribeParameter (in string address, in string name) raises (TToiInvalidArgumentException, TToiUnavailableException)
void ReleaseInstance ()
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Attributes

const long PACE_PAUSE = 0
const long PACE_PLAY = 1000
const long PACE_FASTFORWARD = 5000
const long PACE_REWIND = -5000
const long POSITION_LIVE = -1616928864
const long CAPABILITY_PAUSE = 1
const long CAPABILITY_REWIND = 2
const long CAPABILITY_FASTFORWARD = 4
const long CAPABILITY_GETPOSITION = 8
const long CAPABILITY_SETPOSITION = 16
const long CAPABILITY_FREEZE = 32
const long CAPABILITY_TIMESHIFT = 64

Public Types

enum  TToiComponentType {
  COMPONENT_AUDIO, COMPONENT_VIDEO, COMPONENT_SUBTITLE, COMPONENT_SUBTITLE_CAPTION,
  COMPONENT_SUBTITLE_SUPERIMPOSE, COMPONENT_TELETEXT_VBI
}
enum  TToiErrorSource { SOURCE_UNKNOWN, SOURCE_INTERNAL, SOURCE_BITBAND }
enum  TToiState {
  STATE_IDLE, STATE_CONNECTING, STATE_PAUSED, STATE_PLAYING,
  STATE_FASTFORWARDING, STATE_REWINDING, STATE_FAILED
}
enum  TToiTimeshiftState { TIMESHIFT_STATE_INACTIVE, TIMESHIFT_STATE_BUFFERING, TIMESHIFT_STATE_STOPPED, TIMESHIFT_STATE_BUFFERING_FAILED }
enum  TToiAudioAudienceType { AUDIO_AUDIENCE_TYPE_UNKNOWN, AUDIO_AUDIENCE_TYPE_NORMAL, AUDIO_AUDIENCE_TYPE_VISUALLY_IMPAIRED, AUDIO_AUDIENCE_TYPE_HEARING_IMPAIRED }
enum  TToiAudioChannelFormat {
  AUDIO_CHANNEL_FORMAT_UNKNOWN, AUDIO_CHANNEL_FORMAT_SINGLE_MONO, AUDIO_CHANNEL_FORMAT_DUAL_MONO, AUDIO_CHANNEL_FORMAT_STEREO,
  AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK, AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK, AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE, AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE
}
enum  TToiAudioChannelMode {
  AUDIO_CHANNEL_MODE_NORMAL, AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY, AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY, AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO,
  AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED
}
enum  TToiAspectRatio { ASPECT_RATIO_UNKNOWN, ASPECT_RATIO_4_3, ASPECT_RATIO_16_9 }
enum  TToiActiveFormatDescriptor {
  ACTIVE_FORMAT_UNKNOWN, ACTIVE_FORMAT_16_9_TOP, ACTIVE_FORMAT_14_9_TOP, ACTIVE_FORMAT_MORE_THAN_16_9_CENTRE,
  ACTIVE_FORMAT_SAME_AS_CODED, ACTIVE_FORMAT_4_3_CENTRE, ACTIVE_FORMAT_16_9_CENTRE, ACTIVE_FORMAT_14_9_CENTRE,
  ACTIVE_FORMAT_4_3_SHOOT_AND_PROTECT_14_9_CENTRE, ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_14_9_CENTRE, ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_4_3_CENTRE
}
enum  TToiSubtitleType { SUBTITLE_UNKNOWN, SUBTITLE_NORMAL, SUBTITLE_HEARING_IMPAIRED }
enum  TToiSubtitleFormat {
  SUBTITLE_DVB, SUBTITLE_ARIB, SUBTITLE_TELETEXT, SUBTITLE_DVD,
  SUBTITLE_XSUB
}
enum  TToiReceiveDmfMode { RECEIVE_DMF_MODE_AUTO, RECEIVE_DMF_MODE_NON_AUTO, RECEIVE_DMF_MODE_SELECT, RECEIVE_DMF_MODE_SPECIAL }
enum  TToiRecordDmfMode { RECORD_DMF_MODE_AUTO, RECORD_DMF_MODE_NON_AUTO, RECORD_DMF_MODE_SELECT }
typedef sequence
< TToiComponentEntry
TToiComponentSequence
typedef sequence< long > TToiPaceSequence

Member Typedef Documentation

List of media component entries

typedef sequence< long > IToiMediaPlayerBase::TToiPaceSequence [inherited]
Technical Preview:
List of supported paces

Member Enumeration Documentation

Active format descriptor used to identify the active video format provided in the TToiVideoStreamInfo structure.

Enumerator:
ACTIVE_FORMAT_UNKNOWN 

The active format descriptor is not known.

ACTIVE_FORMAT_16_9_TOP 

The active format descriptor is 16:9 top.

ACTIVE_FORMAT_14_9_TOP 

The active format descriptor is 14:9 top.

ACTIVE_FORMAT_MORE_THAN_16_9_CENTRE 

The active format descriptor is > 16:9 centre.

ACTIVE_FORMAT_SAME_AS_CODED 

The active format descriptor is same as coded.

ACTIVE_FORMAT_4_3_CENTRE 

The active format descriptor is 4:3 centre.

ACTIVE_FORMAT_16_9_CENTRE 

The active format descriptor is 16:9 centre.

ACTIVE_FORMAT_14_9_CENTRE 

The active format descriptor is 14:9 centre.

ACTIVE_FORMAT_4_3_SHOOT_AND_PROTECT_14_9_CENTRE 

The active format descriptor is 4:3 with shoot and protect 14:9 centre.

ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_14_9_CENTRE 

The active format descriptor is 16:9 with shoot and protect 14:9 centre.

ACTIVE_FORMAT_16_9_SHOOT_AND_PROTECT_4_3_CENTRE 

The active format descriptor is 16:9 with shoot and protect 4:3 centre.

Aspect ratio identifier used to identify the video aspect ratio provided in the TToiVideoStreamInfo structure.

Enumerator:
ASPECT_RATIO_UNKNOWN 

The aspect ratio is not known.

ASPECT_RATIO_4_3 

The aspect ratio is 4:3

ASPECT_RATIO_16_9 

The aspect ratio is 16:9

Audio type identifier used to identify the audio type provided in the TToiAudioStreamInfo structure.

Enumerator:
AUDIO_AUDIENCE_TYPE_UNKNOWN 

The audience type of the audio is not known.

AUDIO_AUDIENCE_TYPE_NORMAL 

The audio is prepared for normal audiance.

AUDIO_AUDIENCE_TYPE_VISUALLY_IMPAIRED 

The audio is prepared for the visually impaired.

AUDIO_AUDIENCE_TYPE_HEARING_IMPAIRED 

The audio is prepared for the hearing impaired.

The audio channel format specifies the number of channels and desired speaker setup.

Enumerator:
AUDIO_CHANNEL_FORMAT_UNKNOWN 

The audio channel format is not known.

AUDIO_CHANNEL_FORMAT_SINGLE_MONO 

One audio channel. One speaker.

AUDIO_CHANNEL_FORMAT_DUAL_MONO 

Two content separate audio channels. Either one or two speakers.

AUDIO_CHANNEL_FORMAT_STEREO 

Two audio channels. Two front speakers.

AUDIO_CHANNEL_FORMAT_3_FRONT_1_BACK 

Four audio channels. Three front and one back speakers.

AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK 

Five audio channels. Three front and two back speakers.

AUDIO_CHANNEL_FORMAT_3_FRONT_2_BACK_LFE 

Five audio channels. Three front and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.

AUDIO_CHANNEL_FORMAT_3_FRONT_2_SIDE_2_BACK_LFE 

Seven audio channels. Three front, two side and two back speakers. One low frequency effects channel (LFE). One subwoofer speaker.

The audio channel mode specifies audio channel to speaker mappings.

Enumerator:
AUDIO_CHANNEL_MODE_NORMAL 

The normal mode where each channel is sent to its speaker output.

AUDIO_CHANNEL_MODE_DUAL_MONO_LEFT_ONLY 

The dual mono mode where the left channel is sent to both left and right front speaker outputs.

AUDIO_CHANNEL_MODE_DUAL_MONO_RIGHT_ONLY 

The dual mono mode where the right channel is sent to both left and right front speaker outputs.

AUDIO_CHANNEL_MODE_DUAL_MONO_STEREO 

The dual mono mode where the left channel is sent to the left front speaker output and the right channel is sent to the right front speaker output

AUDIO_CHANNEL_MODE_DUAL_MONO_MIXED 

The dual mono mode where the left and right channels are mixed and sent to both left and right front speaker outputs

Media component identifier types used to set and get information about media components of a session.

Enumerator:
COMPONENT_AUDIO 

Audio components have information of type TToiAudioStreamInfo.

COMPONENT_VIDEO 

Video components have information of type TToiVideoStreamInfo.

COMPONENT_SUBTITLE 

Denotes a regular subtitling component.

COMPONENT_SUBTITLE_CAPTION 
Technical Preview:
This enumerator is a TECHNICAL PREVIEW, it may change. This is an ARIB specific type of subtitles.
COMPONENT_SUBTITLE_SUPERIMPOSE 
Technical Preview:
This enumerator is a TECHNICAL PREVIEW, it may change. This is an ARIB specific type of subtitles and used mainly for displaying alert messages on screen.
COMPONENT_TELETEXT_VBI 
Technical Preview:
This enumerator is a TECHNICAL PREVIEW, it may change. Teletext VBI component have information of type IToiMediaPlayerBase::TToiTeletextStreamInfo.

Enumeration of various sources that can cause an OnError event to occur. Typically, this can be a streamer element or similar low-level component.

Enumerator:
SOURCE_UNKNOWN 

SOURCE_UNKNOWN - An error of unknown type has occurred.

SOURCE_INTERNAL 

SOURCE_INTERNAL - An internal failure occured before an error code could be retrieved.

SOURCE_BITBAND 

SOURCE_BITBAND - A BitBand element has failed for some reason.

Receive DMF mode used for ARIB CC/CS

Enumerator:
RECEIVE_DMF_MODE_AUTO 

Automatic mode.

RECEIVE_DMF_MODE_NON_AUTO 

Non-automatic mode.

RECEIVE_DMF_MODE_SELECT 

Select mode.

RECEIVE_DMF_MODE_SPECIAL 

Special mode.

Receive DMF mode used for ARIB CC/CS

Enumerator:
RECORD_DMF_MODE_AUTO 

Automatic mode.

RECORD_DMF_MODE_NON_AUTO 

Non-automatic mode.

RECORD_DMF_MODE_SELECT 

Select mode.

Enumeration of media player states.

Enumerator:
STATE_IDLE 

In STATE_IDLE there is no active session. The media player 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. The media player will only leave STATE_IDLE on a successful call to IToiMediaPlayer::Open().

STATE_CONNECTING 

In STATE_CONNECTING the media player has an active session and is in the process of establishing a connection to a media stream source. The media player will leave this state automatically and enter STATE_PAUSED when it has successfully established the connection to the stream source. If the media player decides it cannot connect, it will enter STATE_FAILED instead. If the application is not interrested in knowing when the player has connected, it may call IToiMediaPlayer::Play() to set the player in STATE_PLAYING directly. The application may also end the session by calling IToiMediaPlayer::Close(), which makes the player go to STATE_IDLE.

STATE_PAUSED 

In STATE_PAUSED the media player has a connection to a media source but playback is halted. On a command from the application, the player will leave this state for one of the other playback states STATE_PLAYING, STATE_FASTFORWARDING, or STATE_REWINDING. The application may also end the session by calling IToiMediaPlayer::Close(), which makes the player go to STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to STATE_FAILED.

STATE_PLAYING 

In STATE_PLAYING the media player has a connection to a media source and plays the stream from that source in normal pace. On a command from the application, the player will leave this state for one of the other playback states STATE_PAUSED, STATE_FASTFORWARDING, or STATE_REWINDING. The application may also end the session by calling IToiMediaPlayer::Close(), which makes the player go to STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to STATE_FAILED.

STATE_FASTFORWARDING 

In STATE_FASTFORWARDING the media player has a connection to a media source and plays the stream from that source in forward direction at a pace above normal playback. For streams on which this operation cannot be performed, this state is not available. On a command from the application, the player will leave this state for one of the other playback states STATE_PLAYING, STATE_PAUSED, or STATE_REWINDING. The application may also end the session by calling IToiMediaPlayer::Close(), which makes the player go to STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to STATE_FAILED.

STATE_REWINDING 

In STATE_REWINDING the media player has a connection to a media source and plays the stream from that source in backward direction at a pace above normal playback. For streams on which this operation cannot be performed, this state is not available. On a command from the application, the player will leave this state for one of the other playback states STATE_PLAYING, STATE_PAUSED, or STATE_FASTFORWARDING. The application may also end the session by calling IToiMediaPlayer::Close(), which makes the player go to STATE_IDLE. If an error occurs with the stream severe enough for the player to determine it cannot continue playback, the player will go to STATE_FAILED.

STATE_FAILED 

In STATE_FAILED the media player 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. The media player will only leave STATE_FAILED on a call by the application to IToiMediaPlayer::Close().

Subtitle format identifier used to identify the subtitle format provided in the TToiSubtitleStreamInfo structure.

Enumerator:
SUBTITLE_DVB 

The subtitles are in DVB format.

SUBTITLE_ARIB 

The subtitles are in ARIB format.

SUBTITLE_TELETEXT 

The subtitles are in Teletext format.

SUBTITLE_DVD 

The subtitles are in DVD format.

SUBTITLE_XSUB 

The subtitles are in XSUB or XSUB plus format.

Note:
{Request "_AviSubtitleXSubPlus<trackId>" parameter to specify which one.}

Subtitle type identifier used to identify the subtitle type provided in the TToiSubtitleStreamInfo structure.

Enumerator:
SUBTITLE_UNKNOWN 

The type of subtitles is not known.

SUBTITLE_NORMAL 

The subtitles are designed for normal audience.

SUBTITLE_HEARING_IMPAIRED 

The subtitles are designed for the hearing impaired.

State identifier used to identify the media player timeshift state.

Enumerator:
TIMESHIFT_STATE_INACTIVE 

In TIMESHIFT_STATE_INACTIVE the timeshift operation is not enabled. The capacity of the buffer is unknown and the capabilities are the same as for the current media source, e.g. if you play a multicasted stream, trick play capabilities such as pause, fast forward and rewind are not allowed.

TIMESHIFT_STATE_BUFFERING 

In TIMESHIFT_STATE_BUFFERING the media player is buffering the current media source to the timeshift buffer. In this state the capabilities change to include trick play capabilities such as pause, fast forward and rewind.

TIMESHIFT_STATE_STOPPED 

In TIMESHIFT_STATE_STOPPED the buffering has been stopped either due to an explicit call to IToiMediaPlayer::StopTimeshiftBuffering() or due to full buffer.

TIMESHIFT_STATE_BUFFERING_FAILED 

In TIMESHIFT_STATE_BUFFERING_FAILED the timeshift buffering has failed for some reason. The reason can be retrieved by calling GetTimeshiftError(). The media player will only leave TIMESHIFT_STATE_BUFFERING_FAILED on a call by the application to IToiMediaPlayer::DiscardTimeshiftBuffer().


Member Function Documentation

void IToiMediaPlayer::ActivateComponent ( in IToiMediaPlayerBase::TToiComponentEntry  mediaComponent  )  raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

This function selects a media component to be used. The player state is not affected.

Parameters:
mediaComponent The media component entry to be activated.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If the component argument does not identify a valid component, an invalid argument exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
See also:
GetComponentInfo()
void IToiMediaPlayer::Close (  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

This function ends the current session by stopping any playback and disconnecting from the media source. For example, if the source is a video server it ends the server session and disconnects, or if the source is a multicast channel it leaves that multicast group. If this function returns successfully, the player state will change to STATE_IDLE. If an exception is raised, the player state is unaffected.

Exceptions:
TToiSessionViolationException If the player is in idle state a session violation exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
Open()
TToiState
void IToiMediaPlayer::DeactivateComponent ( in IToiMediaPlayerBase::TToiComponentType  mediaType  )  raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

This function deactivates a media component type.

Parameters:
mediaType The media component type to be deactivated.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException Raised if the component argument does not identify a valid component.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayer::DiscardTimeshiftBuffer (  )  raises (TToiSessionViolationException, TToiInvalidPreconditionException, TToiUnavailableException) [inherited]

Discards the timeshift buffer and resumes live stream playback, if not already playing live. This disables further timeshift operations. If this function returns successfully, the timeshift state has changed to TIMESHIFT_STATE_INACTIVE.

Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidPreconditionException If the timeshift state is not TIMESHIFT_STATE_STOPPED or TIMESHIFT_STATE_BUFFERING_FAILED an invalid precondition exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetActiveComponents ( out TToiComponentSequence  components  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

This function returns the selected media components currently selected.

Deprecated:
Same information can be obtained by using GetStreamInfo().
Return values:
components The media component entries currently selected.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetAudioStreamInfo ( in TToiComponentEntry  mediaComponent,
out TToiAudioStreamInfo  streamInfo 
) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

Returns information about a specified audio stream in the current media stream multiplex in the form of an audio stream info structure.

Parameters:
mediaComponent The media component entry for which the stream info has to be retrieved.
Return values:
streamInfo Information about the specified audio stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If the mediaComponent given as argument does not identify an audio stream in the current stream multiplex, an invalid argument exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetCapabilities ( out long  capabilityMask  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

Returns the capabilities present for the current session.

Return values:
capabilityMask A bit mask describing the capabilities of the current session. The mask can include the following capabilities:

Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetError ( out TToiError  error  )  [inherited]

Returns the last error. This is typically called when state is changed to STATE_FAILED. The result is undefined if no error has occurred.

Return values:
error The error
void IToiMediaPlayerBase::GetPace ( out long  pace  )  raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException) [inherited]

Returns the current pace that the media stream is played with.

Return values:
pace The pace at which the position changes, given as a multiplier of normal playback times 1000. If the stream is paused the pace is zero. When the stream is played at normal speed the pace is 1000. In STATE_FASTFORWARDING the pace is generally above 1000, and in STATE_REWINDING generally below -1000. For example, if the stream is rewinded at a pace three times normal playback, the pace is -3000.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiOperationNotSupportedException If the session lacks the capability to get position, the operation not supported exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetParameter ( in string  name,
out string  value 
) raises (TToiInvalidArgumentException, TToiUnavailableException) [inherited]

Get the current value of a parameter.

Parameters:
name Name of the requested parameter.
Return values:
value The current value of the parameter.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
IToiMediaPlayer::SetParameter()
IToiMediaPlayer::UnsetParameter()
SubscribeParameter()
void IToiMediaPlayerBase::GetPosition ( out long  position  )  raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException) [inherited]

Returns the current position in the media stream.

Return values:
position The current position in milliseconds. If asset start is 0, relative position from start is equal to current position. Otherwise, relative position from start is current position - asset start.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiOperationNotSupportedException If the session lacks the capability to get position, the operation not supported exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetSessionId ( out IToiMediaSession::TToiSessionId  id  )  raises (TToiSessionViolationException) [inherited]

Returns the session identifier. This identifier can be used to open a session object with IToiMediaService::OpenSession().

Return values:
id The session identifier.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
See also:
IToiMediaService::OpenSession()
void IToiMediaPlayerBase::GetState ( out TToiState  state  )  [inherited]

Returns the current state of the media player instance.

Return values:
state The current player state.
void IToiMediaPlayerBase::GetStreamInfo ( out TToiStreamInfo  streamInfo  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

Returns information about the current stream in form of a stream info structure. The lists of audio and video streams provided as parts of this information can be used for further exploration using the GetAudioStreamInfo() and GetVideoStreamInfo() functions, respectively.

Return values:
streamInfo Information about the current stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetSubtitleStreamInfo ( in TToiComponentEntry  mediaComponent,
out TToiSubtitleStreamInfo  streamInfo 
) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

Returns information about a specified subtitle stream in the current media stream multiplex in the form of a subtitle stream info structure.

Parameters:
mediaComponent The media component entry for which the stream info has to be retrieved.
Return values:
streamInfo Information about the specified subtitle stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If the streamId given as argument does not identify a subtitle stream in the current stream multiplex, an invalid argument exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetTeletextStreamInfo ( in TToiComponentEntry  mediaComponent,
out TToiTeletextStreamInfo  streamInfo 
) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

Returns information about a specified teletext stream in the current media stream multiplex in the form of a teletext stream info structure.

Parameters:
mediaComponent The media component entry for which the stream info has to be retrieved.
Return values:
streamInfo Information about the specified teletext stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If the mediaComponent given as argument does not identify a teletext stream in the current stream multiplex, an invalid argument exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetTimeshiftError ( out TToiError  timeshiftError  )  [inherited]

Returns the last timeshift error. This is typically called after a state change to TIMESHIFT_STATE_BUFFERING_FAILED. The result is undefined if no error has occurred.

Return values:
timeshiftError The error.
void IToiMediaPlayerBase::GetTimeshiftInfo ( out TToiTimeshiftInfo  timeshiftInfo  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

Retrieve information about the current timeshift operation.

Return values:
timeshiftInfo Information about the current timeshift operation.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::GetUrl ( out string  url  )  raises (TToiSessionViolationException) [inherited]

Returns the URL for the media stream.

Return values:
url The URL for the media stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
void IToiMediaPlayerBase::GetVideoStreamInfo ( in TToiComponentEntry  mediaComponent,
out TToiVideoStreamInfo  streamInfo 
) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

Returns information about a specified video stream in the current media stream multiplex in the form of a video stream info structure.

Parameters:
mediaComponent The media component entry for which the stream info has to be retrieved.
Return values:
streamInfo Information about the specified video stream.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If the mediaComponent given as argument does not identify a video stream in the current stream multiplex, an invalid argument exception is raised.
TToiUnavailableException TToiUnavailableException is raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::IsTimeshiftPlayback ( out boolean  timeshiftPlayback  )  raises (TToiSessionViolationException, TToiUnavailableException) [inherited]

Returns true if the player is playing from the timeshift buffer.

Return values:
timeshiftPlayback True if the player is playing from the timeshift buffer, otherwise false.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayer::Open ( in string  url  )  raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

This function starts a new stream session by trying to establish a connection to a media source. If this function returns successfully, the player state will change to STATE_CONNECTING. If an exception is raised, the player state is unaffected.

Depending on the success of the connection attempt to the media source, the player will make a second state transition to either STATE_PAUSED or STATE_FAILED, on success and failure, respectively. In any respect, the application will be notified with the event IToiMediaPlayerObserver::OnStateChanged().

Parameters:
url The URL identifying the media source. The URL string may contain additional parameter information in accordance to the extended URL format.
Exceptions:
TToiSessionViolationException If the player is not in idle state at the time of the call to Open(), a session violation exception is raised.
TToiInvalidArgumentException If the URL given as argument does not follow the extended URL format, an invalid argument exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
Close()
TToiState
void IToiMediaPlayer::Play ( in long  pace  )  raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiUnavailableException) [inherited]

This function controls playback of the stream. If this function returns successfully, the player state will change to one of four states: STATE_PLAYING, STATE_PAUSED, STATE_FASTFORWARDING, and STATE_REWINDING. Different values pace result one of these different states with the corresponding effect. In the case of pausing, it keeps the session alive, i.e. it remains connected to video servers and joined in multicast groups. If an exception is raised, the player state is unaffected.

Parameters:
pace The pace at which the position will change, given as a multiplier of normal playback times 1000. Zero will pause the stream. 1000 is normal speed (playing). Values above 1000 will result in fast forward, and below -1000 will result in rewind. This are desired paces, the actual implementation may not set the desired speed, but the different states will change according to this description.
Exceptions:
TToiSessionViolationException Raised if the player does not have an active session and will not have one soon (due to a recent call to Open) either.
TToiOperationNotSupportedException If the player is in a state is which this operation is not supported, an operation not supported exception is raised. This is the case when in STATE_FAILED, for example. What is supported in which state may in other cases vary depending on which media source is used.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
Open()
TToiState
void IToiMediaPlayer::PlayFromPosition ( in long  position,
in long  pace 
) raises (TToiSessionViolationException, TToiOperationNotSupportedException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]

This function moves the playback position of the current stream and resumes playback at the new position with the desired pace. Streams without a well defined notion of beginning and end, like multicast channels, generally do not support this operation. A position value greater than the length of the stream will be clamped.

If this function returns successfully, the player state will change to one of four states: STATE_PLAYING, STATE_PAUSED, STATE_FASTFORWARDING, and STATE_REWINDING. Different values of pace results in the different states. In the case of pausing, it keeps the session alive, i.e. it remains connected to the video server or the joined in multicast group. If an exception is raised, the player state is unaffected.

Parameters:
position The position, specified as the number of milliseconds from the beginnig of the stream, to which the playback position is to be moved. The length of the stream can be obtained by calling the GetStreamInfo() function.

When playing from the timeshift buffer, the constant POSITION_LIVE can be used to stop buffer playback and start playback of the live stream.

Parameters:
pace The pace at which the position will change, given as a multiplier of normal playback times 1000. Zero will pause the stream. 1000 is normal speed (playing). Values above 1000 will result in fast forward, and below -1000 will result in rewind. This are desired paces, the actual implementation may not set the desired speed, but the different states will change according to this description.
Exceptions:
TToiSessionViolationException Raised if the player does not have an active session and will not have one soon (due to a recent call to Open) either .
TToiOperationNotSupportedException If the player is in a state is which this operation is not supported, an operation not supported exception is raised. This is the case when in STATE_FAILED, for example. What is supported in which state may in other cases vary depending on which media source is used. The client may investigate this in advance by checking capabilities with GetCapabilities().
TToiInvalidArgumentException Raised if the position is negative.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException) [inherited]

Register an observer of type IToiMediaPlayerObserver. The observer will receive events sent by this IToiMediaPlayerBase instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiMediaPlayerBase can find an IToiMediaPlayerObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address.
See also:
IToiMediaPlayerObserver
void IMediaPlayer::RegisterObserverInternal ( in string  address  )  raises (TToiInvalidArgumentException)

Add a media player observer. Observers are notified about recorder-related events.

Parameters:
address IPC address to an observer that implements the IToiMediaPlayerObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is not a legal IPC address.
See also:
ReleaseObserver(), IToiMediaPlayerObserver
void IToiMediaPlayerBase::ReleaseInstance (  )  [inherited]

This function releases the resources used by this instance. When this function returns all observers has also been released.

void IToiMediaPlayerBase::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException) [inherited]

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiMediaPlayerBase can find the registered IToiMediaPlayerObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiMediaPlayerObserver
void IToiMediaPlayer::SetAudioChannelMode ( in long  streamId,
in IToiMediaPlayerBase::TToiAudioChannelMode  channelMode 
) raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiUnavailableException) [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

This function sets the audio channel mode for a given stream identifier. For the active stream the mode will be set instantly.

Parameters:
streamId The audio stream identifier.
channelMode The audio channel mode.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException An invalid argument exception is raised if the stream identifier argument does not identify a valid audio stream or the channel mode is not supported.
void IToiMediaPlayer::SetParameter ( in string  name,
in string  value 
) raises (TToiInvalidArgumentException, TToiPermissionDeniedException, TToiUnavailableException) [inherited]

This function sets the value of a parameter. Depending on the current state, the new value is used differently. If the function is called when in idle state, the new value is used for all sessions started after the parameter is set. If the function is called in any other state but the idle state, the new value is applied to that session only and is discarded automatically when the session ends.

Parameters:
name The name of the parameter to set.
value The value to set the parameter to.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
TToiPermissionDeniedException The application does not have permission to change the value of the parameter.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
UnsetParameter()
GetParameter()
void IToiMediaPlayer::StartTimeshiftBuffering ( in long  maxBufferLength  )  raises (TToiSessionViolationException, TToiInvalidArgumentException, TToiInvalidPreconditionException, TToiOperationNotSupportedException, TToiUnavailableException) [inherited]

Starts background buffering of the currently viewed stream and therefore enables timeshift operations. The media player will continue to display the live stream until either pause or rewind is performed. The timeshift buffering is stopped either by an excplicit call to StopTimeshiftBuffering() or when the buffer is full. Timeshift operations are disabled by calling DiscardTimeshiftBuffer(). If this function returns successfully, the timeshift state has changed to TIMESHIFT_STATE_BUFFERING. The media player should be in STATE_PLAYING when calling this.

Parameters:
maxBufferLength The maximum size of the timeshift buffer in seconds.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidArgumentException If maxBufferLength is <= 0 an invalid argument exception is raised.
TToiInvalidPreconditionException If the timeshift state is not TIMESHIFT_STATE_INACTIVE or the media player is not in STATE_PLAYING then an invalid precondition exception is raised.
TToiOperationNotSupportedException If the current media source does not have the timeshift capability an operation not supported exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayer::StopTimeshiftBuffering (  )  raises (TToiSessionViolationException, TToiInvalidPreconditionException, TToiUnavailableException) [inherited]

Stops the timeshift buffering but preserves the content in the buffer until the function DiscardTimeshiftBuffer() is called. The player will continue to play from the current media source. If this function returns successfully, the timeshift state has changed to TIMESHIFT_STATE_STOPPED.

Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
TToiInvalidPreconditionException If the timeshift state is not TIMESHIFT_STATE_BUFFERING an invalid precondition exception is raised.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
void IToiMediaPlayerBase::SubscribeParameter ( in string  address,
in string  name 
) raises (TToiInvalidArgumentException, TToiUnavailableException) [inherited]

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 IToiMediaPlayerObserver::OnParameterChanged() if there is a value available.

Parameters:
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.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
UnsubscribeParameter()
void IToiMediaPlayer::UnsetParameter ( in string  name  )  raises (TToiInvalidArgumentException, TToiPermissionDeniedException, TToiUnavailableException) [inherited]

This function restores the value of a parameter to the default. Depending on the current state, the new value is used differently. If the function is called when in idle state, all sessions started after the parameter is restored will use the default value. If the function is called in any other state but the idle state, the value is changed for that session only.

Parameters:
name The name of the parameter for which the value is to be restored to the default.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
TToiPermissionDeniedException The application does not have permission to change the value of the parameter.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
SetParameter(), GetParameter()
void IToiMediaPlayerBase::UnsubscribeParameter ( in string  address,
in string  name 
) raises (TToiInvalidArgumentException, TToiUnavailableException) [inherited]

This function undoes the effect of a previous call to SubscribeParameter().

Parameters:
address The observer address of the parameter that is unsubscribed.
name The name of the parameter that the application is no longer interested in.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
TToiUnavailableException Raised if the player is temporarily unavailable due to platform resource management.
See also:
SubscribeParameter()

Member Data Documentation

const long IToiMediaPlayerBase::CAPABILITY_FASTFORWARD = 4 [inherited]

When this bit is set the session accepts the IToiMediaPlayer::Play([pace > 0]) command.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_FASTFORWARD.

const long IToiMediaPlayerBase::CAPABILITY_FREEZE = 32 [inherited]

When this bit is set the session accepts the IToiMediaPlayer::Play(PACE_PAUSE) command. Freeze is similar to pause, except that when resuming a frozen session it will continue from the current live position.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_FREEZE.

const long IToiMediaPlayerBase::CAPABILITY_GETPOSITION = 8 [inherited]

When this bit is set the session provides a position value which the client may read with GetPosition() and similar commands.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_GETPOSITION.

const long IToiMediaPlayerBase::CAPABILITY_PAUSE = 1 [inherited]

When this bit is set the session accepts the IToiMediaPlayer::Play(PACE_PAUSE) command. When a paused session is resumed it will continue playing from the position where the pause occured. This is similar to freeze.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_PAUSE.

const long IToiMediaPlayerBase::CAPABILITY_REWIND = 2 [inherited]

When this bit is set the session accepts the IToiMediaPlayer::Play([pace < 0]) command.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_REWIND.

const long IToiMediaPlayerBase::CAPABILITY_SETPOSITION = 16 [inherited]

When this bit is set the session accepts the position to be set IToiMediaPlayer::PlayFromPosition().

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_SETPOSITION.

const long IToiMediaPlayerBase::CAPABILITY_TIMESHIFT = 64 [inherited]

When this bit is set the session can perform timeshift buffering.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.CAPABILITY_TIMESHIFT.

const long IToiMediaPlayerBase::PACE_FASTFORWARD = 5000 [inherited]

Predefined argument value for IToiMediaPlayer::Play(). Indicates that the player should play with a normal fast forward speed.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.PACE_FASTFORWARD.

const long IToiMediaPlayerBase::PACE_PAUSE = 0 [inherited]

Predefined argument value for IToiMediaPlayer::Play(). Indicates that the player should be paused.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.PACE_PAUSE.

const long IToiMediaPlayerBase::PACE_PLAY = 1000 [inherited]

Predefined argument value for IToiMediaPlayer::Play(). Indicates that the player should play with normal speed.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.PACE_PLAY.

const long IToiMediaPlayerBase::PACE_REWIND = -5000 [inherited]

Predefined argument value for IToiMediaPlayer::Play(). Indicates that the player should play with a normal rewind speed.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.PACE_REWIND.

const long IToiMediaPlayerBase::POSITION_LIVE = -1616928864 [inherited]

Predefined argument value for IToiMediaPlayer::PlayFromPosition(). Indicates that the player should stop playing from the timeshift buffer and instead start playback of the live stream.

This constant can also be accessed from toi.consts.IToiMediaPlayerBase.POSITION_LIVE.