MPlayerEventsObserver Class Reference

class MPlayerEventsObserver

This class supports the notification PDUs in AVRCP1.3 specification section 5.4, with the following exceptions: EVENT_SYSTEM_STATUS_CHANGED is not supported, it is only for adaptors that plug into a media player EVENT_PLAYER_APPLICATION_SETTING_CHANGED is supported through the CPlayerApplicationSettings API

Events are pushed by the media player calling functions in this API, where they are cached until the controller pulls them via a GetPlayStatus or RegisterNotification PDU CPlayerApplicationSettings

Public Member Functions
IMPORT_C voidPlaybackStatusChanged(TPlaybackStatus)
IMPORT_C voidSetBatteryStatus(TTargetBatteryStatus)
IMPORT_C voidSetPlaybackPosition(TUint32)
IMPORT_C voidTrackChanged(TUint64, TUint32)
IMPORT_C voidTrackReachedEnd()
IMPORT_C voidTrackReachedStart()
Private Member Functions
voidDoPlaybackStatusChanged(TPlaybackStatus)
voidDoSetBatteryStatus(TTargetBatteryStatus)
voidDoSetPlaybackPosition(TUint32)
voidDoTrackChanged(TUint64, TUint32)
voidDoTrackReachedEnd()
voidDoTrackReachedStart()
Public Member Enumerations
enumTPlayPosition { EStart = 0, EMiddle = 1, EEnd = 2 }
enumTPlaybackStatus {
EStopped = 0, EPlaying = 1, EPaused = 2, EFwdSeek = 3, ERevSeek = 4, EError = 0xFF
}
enumTTargetBatteryStatus {
ENormal = 0, EWarning = 1, ECritical = 2, EExternal = 3, EFullCharge = 4, EUnknown = 5
}
Public Attributes
const TUint64KNoTrackSelected
const TUint32KPlaybackPositionUnknown

Member Functions Documentation

DoPlaybackStatusChanged(TPlaybackStatus)

voidDoPlaybackStatusChanged(TPlaybackStatusaStatus)[private, pure virtual]

Parameters

TPlaybackStatus aStatus

DoSetBatteryStatus(TTargetBatteryStatus)

voidDoSetBatteryStatus(TTargetBatteryStatusaBatteryStatus)[private, pure virtual]

Parameters

TTargetBatteryStatus aBatteryStatus

DoSetPlaybackPosition(TUint32)

voidDoSetPlaybackPosition(TUint32aMilliseconds)[private, pure virtual]

Parameters

TUint32 aMilliseconds

DoTrackChanged(TUint64, TUint32)

voidDoTrackChanged(TUint64aTrackId,
TUint32aLengthInMilliseconds
)[private, pure virtual]

Parameters

TUint64 aTrackId
TUint32 aLengthInMilliseconds

DoTrackReachedEnd()

voidDoTrackReachedEnd()[private, pure virtual]

DoTrackReachedStart()

voidDoTrackReachedStart()[private, pure virtual]

PlaybackStatusChanged(TPlaybackStatus)

IMPORT_C voidPlaybackStatusChanged(TPlaybackStatusaStatus)

Call this function whenever the playback status changes. It will be used to complete pending EVENT_PLAYBACK_STATUS_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. The value is used to generate the response to a GetPlayStatus PDU.

Parameters

TPlaybackStatus aStatusThe specification defined playback status

SetBatteryStatus(TTargetBatteryStatus)

IMPORT_C voidSetBatteryStatus(TTargetBatteryStatusaBatteryStatus)

Call this function to report the current battery status

Parameters

TTargetBatteryStatus aBatteryStatusThe current battery status.

SetPlaybackPosition(TUint32)

IMPORT_C voidSetPlaybackPosition(TUint32aMilliseconds)

Call this function during playback or seek operations, to indicate the current position within the track. It will be used to complete a pending EVENT_PLAYBACK_POS_CHANGED notification. The value is used to generate the response to a GetPlayStatus PDU.

Parameters

TUint32 aMillisecondsThe current playback position. It is recommended to call with a resolution <=1000ms to satisfy the 1s resolution of the notification playback interval.

TrackChanged(TUint64, TUint32)

IMPORT_C voidTrackChanged(TUint64aTrackId,
TUint32aLengthInMilliseconds
)

Call this function whenever the current media track is changed. use KNoTrackSelected to indicate that there is no media selected. This is the default value on construction. It will be used to complete pending EVENT_TRACK_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. The values are used to generate the response to a GetPlayStatus PDU.

Parameters

TUint64 aTrackIdA handle to the current track.
TUint32 aLengthInMillisecondsThe length of the current track.

TrackReachedEnd()

IMPORT_C voidTrackReachedEnd()

Call this function whenever the current track reaches the end position, e.g. due to playback or forward seek. It will be used to complete pending EVENT_TRACK_REACHED_END and EVENT_PLAYBACK_POS_CHANGED notifications.

TrackReachedStart()

IMPORT_C voidTrackReachedStart()

Call this function whenever the current track reaches the start position, e.g. due to reverse seek (rewind). It will be used to complete pending EVENT_TRACK_REACHED_START and EVENT_PLAYBACK_POS_CHANGED notifications.

Member Enumerations Documentation

Enum TPlayPosition

Enumerators

EStart = 0
EMiddle = 1
EEnd = 2

Enum TPlaybackStatus

Enumerators

EStopped = 0
EPlaying = 1
EPaused = 2
EFwdSeek = 3
ERevSeek = 4
EError = 0xFF

Enum TTargetBatteryStatus

Enumerators

ENormal = 0
EWarning = 1
ECritical = 2
EExternal = 3
EFullCharge = 4
EUnknown = 5

Member Data Documentation

const TUint64 KNoTrackSelected

const TUint64KNoTrackSelected[static]

const TUint32 KPlaybackPositionUnknown

const TUint32KPlaybackPositionUnknown[static]