IToiMediaService is the main interface of the Media Service. It is used by applications to create media consumers, players and recorders. Each player, recorder and consumer generates a media session which can be accessed by any application through the OpenSession() function. This allows other applications than the actual owner to get stream information, extract stream data, set decryption keys etc.
import "IToiMediaService.idl";
Public Member Functions | |
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" |
Classes | |
struct | TToiSessionInfo |
Public Types | |
typedef sequence< TToiSessionInfo > | TToiSessionSequence |
typedef sequence< TToiSessionInfo > IToiMediaService::TToiSessionSequence |
Sequence of sessions.
void IToiMediaService::CreateConsumerInstance | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
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.
applicationId | The identifier of the calling application. |
consumerAddress | The address to the IToiMediaConsumer instance |
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. |
void IToiMediaService::CreatePipPlayerInstance | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
out string | pipAddress | |||
) | raises (TToiInvalidArgumentException, TToiOperationNotSupportedException, TToiPermissionDeniedException) |
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.
applicationId | The identifier of the calling application. |
pipAddress | The address to the IToiMediaPlayer instance. |
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. |
void IToiMediaService::CreatePlayerInstance | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
out string | playerAddress | |||
) | raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiPermissionDeniedException) |
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.
applicationId | The identifier of the calling application. |
playerAddress | The address to the IToiMediaPlayer instance. |
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. |
void IToiMediaService::CreateRecorderInstance | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
out string | recorderAddress | |||
) | raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException, TToiOperationNotSupportedException) |
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.
applicationId | The identifier of the calling application. |
recorderAddress | The address to the IToiMediaRecorder instance |
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. |
void IToiMediaService::EnumerateSessions | ( | in IToiMediaSession::TToiSessionType | type, | |
out TToiSessionSequence | sessions | |||
) |
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.
type | Only return sessions with this type. |
sessions | A list of matching media sessions. |
void IToiMediaService::OpenSession | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
in IToiMediaSession::TToiSessionId | sessionId, | |||
out string | sessionAddress | |||
) | raises (TToiInvalidArgumentException) |
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.
applicationId | The identifier of the calling application. | |
sessionId | The identifier of the session. |
sessionAddress | The address of the new session object which is mapped to the requested session. The session object implements the IToiMediaSession interface. |
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. |
void IToiMediaService::RegisterObserver | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
in string | address | |||
) | raises (TToiInvalidArgumentException) |
Register an observer of type IToiMediaObserver. The observer will receive events sent by this IToiMediaService instance.
applicationId | The identifier of the observing application. | |
address | The address where the IToiMediaService can find an IToiMediaObserver 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 IToiMediaService::ReleaseObserver | ( | in string | address | ) | raises (TToiInvalidArgumentException) |
Release an observer previously registered with RegisterObserver.
address | The address where the IToiMediaService can find the registered IToiMediaObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid. |
const string IToiMediaService::REASON_COMMAND_CLOSE = "CommandClose" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_CLOSE.
const string IToiMediaService::REASON_COMMAND_CONSUME = "CommandConsume" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_CONSUME.
const string IToiMediaService::REASON_COMMAND_FASTFORWARD = "CommandFastForward" |
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" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_OPEN.
const string IToiMediaService::REASON_COMMAND_PAUSE = "CommandPause" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PAUSE.
const string IToiMediaService::REASON_COMMAND_PLAY = "CommandPlay" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PLAY.
const string IToiMediaService::REASON_COMMAND_PLAYFROMPOSITION = "CommandPlayFromPosition" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_PLAYFROMPOSITION.
const string IToiMediaService::REASON_COMMAND_RECORD = "CommandRecord" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_RECORD.
const string IToiMediaService::REASON_COMMAND_REWIND = "CommandRewind" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_COMMAND_REWIND.
const string IToiMediaService::REASON_ERROR_COMMAND_NOT_SUPPORTED = "ErrorCommandNotSupported" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_COMMAND_NOT_SUPPORTED.
const string IToiMediaService::REASON_ERROR_CONNECTION_FAILED = "ErrorConnectionFailed" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_CONNECTION_FAILED.
const string IToiMediaService::REASON_ERROR_DISK_FULL = "ErrorStorageFull" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_DISK_FULL.
const string IToiMediaService::REASON_ERROR_DISK_OVERHEATED = "ErrorStorageOverheated" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_DISK_OVERHEATED.
const string IToiMediaService::REASON_ERROR_HOST_UNREACHABLE = "ErrorHostUnreachable" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_HOST_UNREACHABLE.
const string IToiMediaService::REASON_ERROR_INVALID_DISKASSET = "ErrorInvalidDiskasset" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_INVALID_DISKASSET.
const string IToiMediaService::REASON_ERROR_INVALID_PRECONDITION = "ErrorInvalidPrecondition" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_INVALID_PRECONDITION.
const string IToiMediaService::REASON_ERROR_LOWLEVEL_IO_FAILURE = "ErrorLowlevelIOFailure" |
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" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_NO_EXTERNAL_INPUT_SIGNAL.
const string IToiMediaService::REASON_ERROR_PERMISSION_DENIED = "ErrorPermissionDenied" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_PERMISSION_DENIED.
const string IToiMediaService::REASON_ERROR_POSITION_INVALID = "ErrorPositionInvalid" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_POSITION_INVALID.
const string IToiMediaService::REASON_ERROR_STREAM_CLIENT = "ErrorStreamClient" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_STREAM_CLIENT.
const string IToiMediaService::REASON_ERROR_UNEXISTING_RESOURCE = "ErrorUnexistingResource" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_UNEXISTING_RESOURCE.
const string IToiMediaService::REASON_ERROR_UNSUPPORTED_DISKASSET_VERSION = "ErrorUnsupportedDiskAssetVersion" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_ERROR_UNSUPPORTED_DISKASSET_VERSION.
const string IToiMediaService::REASON_POSITION_END = "PositionEnd" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_POSITION_END.
const string IToiMediaService::REASON_POSITION_START = "PositionStart" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_POSITION_START.
const string IToiMediaService::REASON_TIMESHIFT_BUFFER_DISCARDED = "TimeshiftBufferDiscarded" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_DISCARDED.
const string IToiMediaService::REASON_TIMESHIFT_BUFFER_FULL = "TimeshiftBufferFull" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_FULL.
const string IToiMediaService::REASON_TIMESHIFT_BUFFER_OPEN = "TimeshiftBufferOpen" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_TIMESHIFT_BUFFER_OPEN.
const string IToiMediaService::REASON_UNKNOWN = "Unknown" |
This constant can also be accessed from toi.consts.IToiMediaService.REASON_UNKNOWN.