IMediaDistributorObserver Interface Reference
Description
TECHNICAL PREVIEW - this interface may change. The IToiMediaDistributorObserver interface is implemented by applications that wants to receive asynchronous information about media distributor events.
import "IMediaDistributorObserver.idl";
List of all members.
Member Function Documentation
oneway void IMediaDistributorObserver::OnParameterChanged |
( |
in string |
name |
) |
|
Tells the observer that the value has changed of one or several of the parameters the observer has declared interest in.
oneway void IMediaDistributorObserver::OnPositionChanged |
( |
in long |
position, |
|
|
in long |
pace | |
|
) |
| | |
Gives the observer an up-to-date snapshot of the position in the stream, together with information about how the position changes. This event may be emitted at any time within a session, but generally it is emitted every time the pace changes and in regular intervals (maybe a couple of seconds long) inbetween, provided that the pace is not zero.
- 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". |
- Parameters:
-
| 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. |
A call to this function tells the observer that the media player state has changed. The application is not notified this way about implicit state changes triggered by commands from the application itself. For example, assume the player is in STATE_PLAYING. If the application calls IMediaDistributor::FastForward() and the function returns without error, the player state has changed implicitly to STATE_FASTFORWARDING but the application will not receive a call to OnStateChanged() for that particular state transition.
Note that there is no timing constraint on these messages, and they may arrive late in certain situations. For example, the application may receive a call to this function about a state transition after the application has successfully called Close() and thereby ended the session. The only way for an application to synchronize with its media player is to issue successful calls that cause state transitions implicitly. This implies that the application should take calls to this function as indications to state transitions that has in fact happened, but it cannot say for certain when these state transitions occured.
- Parameters:
-
| state | The new state. |
| reason | The reason for the state change. |