IMediaService Interface Reference


Description

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

import "IMediaService.idl";

List of all members.

Public Member Functions

void OpenSessionInternal (in IToiMediaSession::TToiSessionId sessionId, out string sessionAddress) raises (TToiInvalidArgumentException)
void CreateRecorderInstanceInternal (out string recorderAddress) raises (TToiNotEnoughResourcesException, TToiOperationNotSupportedException)
void CreateDistributorInstanceInternal (out string distributorAddress) raises (TToiNotEnoughResourcesException, TToiOperationNotSupportedException)
void RegisterObserverInternal (in string address) raises (TToiInvalidArgumentException)
void CreateConsumerInstanceInternal (out string consumerAddress) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void CreatePlayerInstanceInternal (out string playerAddress) raises (TToiNotEnoughResourcesException)
void CreatePlayerInstance (in IToiApplicationService::TToiApplicationId applicationId, out string playerAddress) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiPermissionDeniedException)
void CreatePipPlayerInstance (in IToiApplicationService::TToiApplicationId applicationId, out string pipAddress) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException, TToiPermissionDeniedException)
void CreateRecorderInstance (in IToiApplicationService::TToiApplicationId applicationId, out string recorderAddress) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiOperationNotSupportedException)
void CreateConsumerInstance (in IToiApplicationService::TToiApplicationId applicationId, out string consumerAddress) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)
void EnumerateSessions (in IToiMediaSession::TToiSessionType type, out TToiSessionSequence sessions)
void OpenSession (in IToiApplicationService::TToiApplicationId applicationId, in IToiMediaSession::TToiSessionId sessionId, out string sessionAddress) raises (TToiInvalidArgumentException)
void RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException)
void ReleaseObserver (in string address) raises (TToiInvalidArgumentException)

Public Attributes

const string REASON_UNKNOWN = "Unknown"
const string REASON_COMMAND_OPEN = "CommandOpen"
const string REASON_COMMAND_CLOSE = "CommandClose"
const string REASON_COMMAND_PAUSE = "CommandPause"
const string REASON_COMMAND_PLAY = "CommandPlay"
const string REASON_COMMAND_FASTFORWARD = "CommandFastForward"
const string REASON_COMMAND_REWIND = "CommandRewind"
const string REASON_COMMAND_PLAYFROMPOSITION = "CommandPlayFromPosition"
const string REASON_COMMAND_RECORD = "CommandRecord"
const string REASON_COMMAND_CONSUME = "CommandConsume"
const string REASON_POSITION_END = "PositionEnd"
const string REASON_POSITION_START = "PositionStart"
const string REASON_TIMESHIFT_BUFFER_OPEN = "TimeshiftBufferOpen"
const string REASON_TIMESHIFT_BUFFER_FULL = "TimeshiftBufferFull"
const string REASON_TIMESHIFT_BUFFER_DISCARDED = "TimeshiftBufferDiscarded"
const string REASON_ERROR_COMMAND_NOT_SUPPORTED = "ErrorCommandNotSupported"
const string REASON_ERROR_STREAM_CLIENT = "ErrorStreamClient"
const string REASON_ERROR_CONNECTION_FAILED = "ErrorConnectionFailed"
const string REASON_ERROR_INVALID_PRECONDITION = "ErrorInvalidPrecondition"
const string REASON_ERROR_PERMISSION_DENIED = "ErrorPermissionDenied"
const string REASON_ERROR_INVALID_DISKASSET = "ErrorInvalidDiskasset"
const string REASON_ERROR_UNSUPPORTED_DISKASSET_VERSION = "ErrorUnsupportedDiskAssetVersion"
const string REASON_ERROR_DISK_FULL = "ErrorStorageFull"
const string REASON_ERROR_LOWLEVEL_IO_FAILURE = "ErrorLowlevelIOFailure"
const string REASON_ERROR_POSITION_INVALID = "ErrorPositionInvalid"
const string REASON_ERROR_DISK_OVERHEATED = "ErrorStorageOverheated"
const string REASON_ERROR_HOST_UNREACHABLE = "ErrorHostUnreachable"
const string REASON_ERROR_UNEXISTING_RESOURCE = "ErrorUnexistingResource"
const string REASON_ERROR_NO_EXTERNAL_INPUT_SIGNAL = "ErrorNoExternalInputSignal"

Public Types

typedef sequence< TToiSessionInfoTToiSessionSequence

Member Typedef Documentation

typedef sequence< TToiSessionInfo > IToiMediaService::TToiSessionSequence [inherited]

Sequence of sessions.


Member Function Documentation

void IToiMediaService::CreateConsumerInstance ( in IToiApplicationService::TToiApplicationId  applicationId,
out string  consumerAddress 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException) [inherited]
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

This function creates a new media consumer. A media consumer can be used to fetch data from a media stream without allocating media decoder and recorder resources. This may be useful for applications that wants to filter out stream data without actually playing the stream.

When the application no longer needs the media consumer, it must release it by calling IToiMediaConsumer::ReleaseInstance(). This will return the underlying resources to the system.

Parameters:
applicationId The identifier of the calling application.
Return values:
consumerAddress The address to the IToiMediaConsumer instance
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiNotEnoughResourcesException Raised if a new consumer instance cannot be created due to lack of system resources.
See also:
IToiMediaConsumer
IToiMediaConsumer::ReleaseInstance()
void IMediaService::CreateConsumerInstanceInternal ( out string  consumerAddress  )  raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException)

This function creates a new media consumer. A media consumer can be used to fetch data from a media stream without allocating media decoder and recorder resources. This may be useful for applications that wants to filter out stream data without actually playing the stream.

When the application no longer needs the media consumer, it must release it by calling IToiMediaConsumer::ReleaseInstance(). This will return the underlying resources to the system.

Return values:
consumerAddress The address to the IToiMediaConsumer instance
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiNotEnoughResourcesException Raised if a new consumer instance cannot be created due to lack of system resources.
See also:
IToiMediaConsumer
IToiMediaConsumer::ReleaseInstance()
void IMediaService::CreateDistributorInstanceInternal ( out string  distributorAddress  )  raises (TToiNotEnoughResourcesException, TToiOperationNotSupportedException)

Returns an address of distributor instance.

Parameters:
distributorAddress The address to the IMediaDistributor instance.
Exceptions:
TToiNotEnoughResourcesException Raised if the system cannot create a new instance of the media distributor.
TToiOperationNotSupportedException Raised if the system does not support content distribution.
See also:
IMediaDistributor
void IToiMediaService::CreatePipPlayerInstance ( in IToiApplicationService::TToiApplicationId  applicationId,
out string  pipAddress 
) raises (TToiInvalidArgumentException, TToiOperationNotSupportedException, TToiPermissionDeniedException) [inherited]

This function creates a new Picture in Picture media player and associates it with the calling application.

When the application no longer needs the media player, it must release it by calling IToiMediaPlayer::ReleaseInstance(). This will return the underlying resources to the system.

Parameters:
applicationId The identifier of the calling application.
Return values:
pipAddress The address to the IToiMediaPlayer instance.
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiOperationNotSupportedException Raised if a new player instance cannot be created.
TToiPermissionDeniedException Raised if the calling application is not allowed to create instances of the media player. This restriction applies to popup applications.
See also:
IToiMediaPlayer
IToiMediaPlayer::ReleaseInstance()
void IToiMediaService::CreatePlayerInstance ( in IToiApplicationService::TToiApplicationId  applicationId,
out string  playerAddress 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiPermissionDeniedException) [inherited]

This function creates a new media player and associates it with the calling application.

When the application no longer needs the media player, it must release it by calling IToiMediaPlayer::ReleaseInstance(). This will return the underlying resources to the system.

Parameters:
applicationId The identifier of the calling application.
Return values:
playerAddress The address to the IToiMediaPlayer instance.
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiNotEnoughResourcesException Raised if a new player instance cannot be created due to lack of system resources.
TToiPermissionDeniedException Raised if the calling application is not allowed to create instances of the media player. This restriction applies to popup applications.
See also:
IToiMediaPlayer
IToiMediaPlayer::ReleaseInstance()
void IMediaService::CreatePlayerInstanceInternal ( out string  playerAddress  )  raises (TToiNotEnoughResourcesException)

This function works the same way as the CreatePlayerInstance in IToiMediaService. It should be used by platform services instead of CreatePlayerInstance since no application id is needed.

Parameters:
playerAddress The address to the IToiMediaPlayer instance.
Exceptions:
TToiNotEnoughResourcesException Raised if the system cannot create a new instance of the media player.
See also:
IToiMediaService::CreatePlayerInstance
IToiMediaService
void IToiMediaService::CreateRecorderInstance ( in IToiApplicationService::TToiApplicationId  applicationId,
out string  recorderAddress 
) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiOperationNotSupportedException) [inherited]

This function creates a new media recorder and associates it with the calling application.

When the application no longer needs the media recorder, it must release it by calling IToiMediaRecorder::ReleaseInstance(). This will return the underlying resources to the system.

Parameters:
applicationId The identifier of the calling application.
Return values:
recorderAddress The address to the IToiMediaRecorder instance
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiNotEnoughResourcesException Raised if a new recorder instance cannot be created due to lack of system resources.
TToiOperationNotSupportedException Raised if recording is not supported on this system.
See also:
IToiMediaRecorder
IToiMediaRecorder::ReleaseInstance()
void IMediaService::CreateRecorderInstanceInternal ( out string  recorderAddress  )  raises (TToiNotEnoughResourcesException, TToiOperationNotSupportedException)

This function works the same way as the CreateRecorderInstance in IToiMediaService. It should be used by platform services instead of CreateRecorderInstance since no application id is needed.

Parameters:
recorderAddress The address to the IToiMediaRecorder instance.
Exceptions:
TToiNotEnoughResourcesException Raised if the system cannot create a new instance of the media player.
TToiOperationNotSupportedException If PVR is not enabled, an operation not supported exception is raised.
See also:
IToiMediaService::CreateRecorderInstance
IToiMediaService
void IToiMediaService::EnumerateSessions ( in IToiMediaSession::TToiSessionType  type,
out TToiSessionSequence  sessions 
) [inherited]

This function is used to get a list of all sessions of a certain type. Note that a session may be of more than one type.

Parameters:
type Only return sessions with this type.
Return values:
sessions A list of matching media sessions.
void IToiMediaService::OpenSession ( in IToiApplicationService::TToiApplicationId  applicationId,
in IToiMediaSession::TToiSessionId  sessionId,
out string  sessionAddress 
) raises (TToiInvalidArgumentException) [inherited]

Open an existing session. Each call to this method returns the address of a unique object that must be released when no longer needed, by calling IToiMediaSession::ReleaseInstance().

Note that the actual session does not necessarily have to be owned by the application calling this function. It may still be used by the owner to access the functionality of the IToiMediaSession interface.

Parameters:
applicationId The identifier of the calling application.
sessionId The identifier of the session.
Return values:
sessionAddress The address of the new session object which is mapped to the requested session. The session object implements the IToiMediaSession interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified application identifier is invalid.
TToiInvalidArgumentException Raised if the session identifier does not identify an existing session. Note that all applications must be designed to handle this exception since sessions can be closed at any time, rendering the session identifier invalid.
See also:
IToiMediaSession
void IMediaService::OpenSessionInternal ( in IToiMediaSession::TToiSessionId  sessionId,
out string  sessionAddress 
) raises (TToiInvalidArgumentException)

Open an existing session. Each call to this method returns a unique object that must be released when no longer needed, by calling IToiMediaSession::ReleaseInstance().

Parameters:
sessionId The id of the session.
Return values:
sessionAddress The address of the new session object which is mapped to the requested session. The session object implements the IToiMediaSession interface.
Exceptions:
TToiInvalidArgumentException Raised if the session id does not identify an existing session. Note that all applications must be designed to handle this exception since sessions can be closed at any time, rendering the session id invalid.
See also:
IToiMediaSession
void IToiMediaService::RegisterObserver ( in IToiApplicationService::TToiApplicationId  applicationId,
in string  address 
) raises (TToiInvalidArgumentException) [inherited]

Register an observer of type IToiMediaObserver. The observer will receive events sent by this IToiMediaService instance.

Parameters:
applicationId The identifier of the observing application.
address The address where the IToiMediaService can find an IToiMediaObserver 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:
IToiMediaObserver
void IMediaService::RegisterObserverInternal ( in string  address  )  raises (TToiInvalidArgumentException)

Add a media service observer. Observers are notified about session-related events.

Parameters:
address IPC address to an observer that implements the IToiMediaObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is not a legal IPC address.
See also:
ReleaseObserver(), IToiMediaObserver
void IToiMediaService::ReleaseObserver ( in string  address  )  raises (TToiInvalidArgumentException) [inherited]

Release an observer previously registered with RegisterObserver.

Parameters:
address The address where the IToiMediaService can find the registered IToiMediaObserver interface.
Exceptions:
TToiInvalidArgumentException Raised if the specified address is invalid.
See also:
IToiMediaObserver

Member Data Documentation

const string IToiMediaService::REASON_COMMAND_CLOSE = "CommandClose" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_CLOSE.

const string IToiMediaService::REASON_COMMAND_CONSUME = "CommandConsume" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_CONSUME.

const string IToiMediaService::REASON_COMMAND_FASTFORWARD = "CommandFastForward" [inherited]

State change caused by a fast forward command

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_FASTFORWARD.

const string IToiMediaService::REASON_COMMAND_OPEN = "CommandOpen" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_OPEN.

const string IToiMediaService::REASON_COMMAND_PAUSE = "CommandPause" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PAUSE.

const string IToiMediaService::REASON_COMMAND_PLAY = "CommandPlay" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PLAY.

const string IToiMediaService::REASON_COMMAND_PLAYFROMPOSITION = "CommandPlayFromPosition" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PLAYFROMPOSITION.

const string IToiMediaService::REASON_COMMAND_RECORD = "CommandRecord" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_RECORD.

const string IToiMediaService::REASON_COMMAND_REWIND = "CommandRewind" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_REWIND.

const string IToiMediaService::REASON_ERROR_COMMAND_NOT_SUPPORTED = "ErrorCommandNotSupported" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_COMMAND_NOT_SUPPORTED.

const string IToiMediaService::REASON_ERROR_CONNECTION_FAILED = "ErrorConnectionFailed" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_CONNECTION_FAILED.

const string IToiMediaService::REASON_ERROR_DISK_FULL = "ErrorStorageFull" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_DISK_FULL.

const string IToiMediaService::REASON_ERROR_DISK_OVERHEATED = "ErrorStorageOverheated" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_DISK_OVERHEATED.

const string IToiMediaService::REASON_ERROR_HOST_UNREACHABLE = "ErrorHostUnreachable" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_HOST_UNREACHABLE.

const string IToiMediaService::REASON_ERROR_INVALID_DISKASSET = "ErrorInvalidDiskasset" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_INVALID_DISKASSET.

const string IToiMediaService::REASON_ERROR_INVALID_PRECONDITION = "ErrorInvalidPrecondition" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_INVALID_PRECONDITION.

const string IToiMediaService::REASON_ERROR_LOWLEVEL_IO_FAILURE = "ErrorLowlevelIOFailure" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_LOWLEVEL_IO_FAILURE.

const string IToiMediaService::REASON_ERROR_NO_EXTERNAL_INPUT_SIGNAL = "ErrorNoExternalInputSignal" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_NO_EXTERNAL_INPUT_SIGNAL.

const string IToiMediaService::REASON_ERROR_PERMISSION_DENIED = "ErrorPermissionDenied" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_PERMISSION_DENIED.

const string IToiMediaService::REASON_ERROR_POSITION_INVALID = "ErrorPositionInvalid" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_POSITION_INVALID.

const string IToiMediaService::REASON_ERROR_STREAM_CLIENT = "ErrorStreamClient" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_STREAM_CLIENT.

const string IToiMediaService::REASON_ERROR_UNEXISTING_RESOURCE = "ErrorUnexistingResource" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_UNEXISTING_RESOURCE.

const string IToiMediaService::REASON_ERROR_UNSUPPORTED_DISKASSET_VERSION = "ErrorUnsupportedDiskAssetVersion" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_UNSUPPORTED_DISKASSET_VERSION.

const string IToiMediaService::REASON_POSITION_END = "PositionEnd" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_POSITION_END.

const string IToiMediaService::REASON_POSITION_START = "PositionStart" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_POSITION_START.

const string IToiMediaService::REASON_TIMESHIFT_BUFFER_DISCARDED = "TimeshiftBufferDiscarded" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_DISCARDED.

const string IToiMediaService::REASON_TIMESHIFT_BUFFER_FULL = "TimeshiftBufferFull" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_FULL.

const string IToiMediaService::REASON_TIMESHIFT_BUFFER_OPEN = "TimeshiftBufferOpen" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_OPEN.

const string IToiMediaService::REASON_UNKNOWN = "Unknown" [inherited]

This constant can also be accessed from toi.consts.IToiMediaService.REASON_UNKNOWN.