| Motorola Mobility Confidential Restricted. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
ToiMediaConsumer Interface Reference Description
Inheritance diagram for ToiMediaConsumer:
Member Typedef Documentation
State identifier used to identify the media consumer state. Member Function Documentation
This function ends the current session by 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 consumer state has changed to ToiMediaConsumer::STATE_IDLE. If an exception is raised, the consumer state is unaffected.
This function starts consuming the stream. If this function returns successfully, the consumer state has changed to ToiMediaConsumer::STATE_CONSUMING. If an exception is raised, the consumer state is unaffected.
Returns the session identifier. This identifier can be used to open a session object with ToiMediaService::openSession().
Returns the current state of the media consumer instance.
Returns the URL for the media stream.
This function starts a new stream session by trying to establish a connection to a media source. If this function returns successfully, the consumer state has changed to ToiMediaConsumer::STATE_CONNECTING. If an exception is raised, the consumer state is unaffected. Depending on the success of the connection attempt to the media source, the consumer will make a second state transition to either ToiMediaConsumer::STATE_PAUSED or ToiMediaConsumer::STATE_FAILED, on success and failure, respectively. In any respect, the application will be notified about this event by a call to its ToiMediaConsumerStateChangedEvent function.
This function releases the resources used by this instance. When this function returns all observers has also been released. Member Data Documentation
This is an Event identifier for ToiMediaConsumerStateChangedEvent. This constant can also be accessed from toi.consts.ToiMediaConsumer.ON_STATE_CHANGED.
In ToiMediaConsumer::STATE_CONNECTING the media consumer has an active session and is in the process of establishing a connection to a media stream source. The media consumer will leave this state automatically and enter ToiMediaConsumer::STATE_PAUSED when it has successfully established the connection to the stream source. If the media consumer decides it cannot connect, it will enter ToiMediaConsumer::STATE_FAILED instead. If the application is not interrested in knowing when the consumer has connected, it may call ToiMediaConsumer::consume() to set the player in ToiMediaConsumer::STATE_CONSUMING directly. The application may end the session by calling ToiMediaConsumer::close(), which makes the consumer go to ToiMediaConsumer::STATE_IDLE. This constant can also be accessed from toi.consts.ToiMediaConsumer.STATE_CONNECTING.
In ToiMediaConsumer::STATE_CONSUMING the media consumer has a connection to a media source and consumes the stream from that source. The application may end the session by calling ToiMediaConsumer::close(), which makes the consumer go to ToiMediaConsumer::STATE_IDLE. If an error occurs with the stream severe enough for the consumer to determine it cannot continue, the consumer will go to ToiMediaConsumer::STATE_FAILED. This constant can also be accessed from toi.consts.ToiMediaConsumer.STATE_CONSUMING.
In ToiMediaConsumer::STATE_FAILED the media consumer 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 consumer will only leave ToiMediaConsumer::STATE_FAILED on a call by the application to ToiMediaConsumer::close(). This constant can also be accessed from toi.consts.ToiMediaConsumer.STATE_FAILED.
In ToiMediaConsumer::STATE_IDLE there is no active session. The media consumer 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 ToiMediaConsumer::STATE_IDLE. The media consumer will only leave ToiMediaConsumer::STATE_IDLE on a successful call to ToiMediaConsumer::open(). This constant can also be accessed from toi.consts.ToiMediaConsumer.STATE_IDLE.
In ToiMediaConsumer::STATE_PAUSED the media consumer has a connection to a media source but will not start consuming until ToiMediaConsumer::consume() is called, which changes the state to ToiMediaConsumer::STATE_CONSUMING. The application may also end the session by calling ToiMediaConsumer::close(), which makes the consumer go to ToiMediaConsumer::STATE_IDLE. If an error occurs with the stream severe enough for the consumer to determine it cannot continue, the consumer will go to ToiMediaConsumer::STATE_FAILED. This constant can also be accessed from toi.consts.ToiMediaConsumer.STATE_PAUSED. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||