#include <sbMediacoreSequencer.h>
Public Types | |
typedef std::vector< PRUint32 > | sequence_t |
typedef std::map< PRUint32, PRUint32 > | sequencemap_t |
Public Member Functions | |
NS_DECL_ISUPPORTS NS_DECL_SBIMEDIACORESEQUENCER NS_DECL_SBIMEDIACOREEVENTLISTENER NS_DECL_SBIMEDIACORESTATUS NS_DECL_SBIMEDIALISTLISTENER NS_DECL_SBIMEDIALISTVIEWLISTENER NS_DECL_SBIMEDIAITEMCONTROLLERLISTENER NS_DECL_NSICLASSINFO NS_DECL_NSITIMERCALLBACK | sbMediacoreSequencer () |
nsresult | Init () |
nsresult | StartSequenceProcessor () |
nsresult | StopSequenceProcessor () |
nsresult | BindDataRemotes () |
nsresult | UnbindDataRemotes () |
nsresult | UpdatePlayStateDataRemotes () |
nsresult | UpdatePositionDataRemotes (PRUint64 aPosition) |
nsresult | UpdateDurationDataRemotes (PRUint64 aDuration) |
nsresult | UpdateURLDataRemotes (nsIURI *aURI) |
nsresult | UpdateShuffleDataRemote (PRUint32 aMode) |
nsresult | UpdateRepeatDataRemote (PRUint32 aRepeatMode) |
nsresult | ResetPlayingVideoDataRemote () |
nsresult | HandleVolumeChangeEvent (sbIMediacoreEvent *aEvent) |
nsresult | UpdateVolumeDataRemote (PRFloat64 aVolume) |
nsresult | HandleMuteChangeEvent (sbIMediacoreEvent *aEvent) |
nsresult | UpdateMuteDataRemote (PRBool aMuted) |
nsresult | HandleMetadataEvent (sbIMediacoreEvent *aEvent) |
nsresult | SetMetadataDataRemote (const nsAString &aId, const nsAString &aValue) |
nsresult | SetMetadataDataRemotesFromItem (sbIMediaItem *aItem, sbIPropertyArray *aPropertiesChanged=nsnull) |
nsresult | ResetMetadataDataRemotes () |
nsresult | UpdateCurrentItemDuration (PRUint64 aDuration) |
nsresult | ResetPlayerControlDataRemotes () |
nsresult | HandleErrorEvent (sbIMediacoreEvent *aEvent) |
nsresult | RecalculateSequence (PRInt64 *aViewPosition=nsnull) |
nsresult | GetItem (const sequence_t &aSequence, PRUint32 aPosition, sbIMediaItem **aItem) |
nsresult | ProcessNewPosition () |
nsresult | Setup (nsIURI *aURI=nsnull) |
nsresult | CoreHandleNextSetup () |
PRBool | HandleAbort () |
nsresult | SetViewWithViewPosition (sbIMediaListView *aView, PRInt64 *aViewPosition=nsnull) |
nsresult | HandleSequencerTimer (nsITimer *aTimer) |
nsresult | HandleDelayedCheckTimer (nsITimer *aTimer) |
nsresult | StartWatchingView () |
nsresult | StopWatchingView () |
nsresult | DelayedCheck () |
nsresult | UpdateItemUIDIndex () |
Public Member Functions inherited from sbIMediacoreSequencer | |
void | playView (in sbIMediaListView aView, [optional] in long long aItemIndex, [optional] in boolean aNotFromUserAction) |
Play a media list view as a sequence. Optionally provide the index of the item in the view that should play first in the sequence. More... | |
void | playURL (in nsIURI aURI) |
Play a single URL as a sequence. More... | |
void | play () |
Play the sequence. More... | |
void | stop ([optional] in boolean aNotFromUserAction) |
Stop the sequence. More... | |
void | next ([optional] in boolean aNotFromUserAction) |
Go to the next item in the sequence. More... | |
void | previous ([optional] in boolean aNotFromUserAction) |
Go to the previous item in the sequence. More... | |
void | requestHandleNextItem (in sbIMediacore aMediacore) |
Indicate that the current core will handle the next item in the sequence when the stream ends. More... | |
void | abort () |
Abort the current item playback attempt. More... | |
Public Member Functions inherited from sbIMediacoreEventListener | |
void | onMediacoreEvent (in sbIMediacoreEvent aEvent) |
Public Member Functions inherited from sbIMediaListListener | |
boolean | onItemAdded (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called when a media item is added to the list. More... | |
boolean | onBeforeItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called before a media item is removed from the list. More... | |
boolean | onAfterItemRemoved (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in unsigned long aIndex) |
Called after a media item is removed from the list. More... | |
boolean | onItemUpdated (in sbIMediaList aMediaList, in sbIMediaItem aMediaItem, in sbIPropertyArray aProperties) |
Called when a media item is changed. More... | |
boolean | onItemMoved (in sbIMediaList aMediaList, in unsigned long aFromIndex, in unsigned long aToIndex) |
Called when a media item is moved. More... | |
boolean | onBeforeListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
boolean | onListCleared (in sbIMediaList aMediaList, in boolean aExcludeLists) |
void | onBatchBegin (in sbIMediaList aMediaList) |
Called when the library is about to perform multiple operations at once. More... | |
void | onBatchEnd (in sbIMediaList aMediaList) |
Called when the library has finished performing multiple operations at once. More... | |
Public Member Functions inherited from sbIMediaListViewListener | |
void | onFilterChanged (in sbIMediaListView aChangedView) |
Called when the view's filter configuration changes. More... | |
void | onSearchChanged (in sbIMediaListView aChangedView) |
Called when the view's search changes. More... | |
void | onSortChanged (in sbIMediaListView aChangedView) |
Called when the view's sort configuration changes. More... | |
Public Member Functions inherited from sbIMediaItemControllerListener | |
void | onValidatePlaybackComplete (in sbIMediaItem aItem, in long aResult) |
Event triggered when the controller is done validating playback for an item. More... | |
Protected Types | |
enum | { ONHOLD_NOTONHOLD = 0, ONHOLD_PLAYVIEW, ONHOLD_NEXT, ONHOLD_PREVIOUS } |
Protected Member Functions | |
virtual | ~sbMediacoreSequencer () |
nsresult | DispatchMediacoreEvent (sbIMediacoreEvent *aEvent, PRBool aAsync=PR_FALSE) |
nsresult | StartPlayback () |
PRBool | CheckPropertiesInfluenceView (sbIPropertyArray *aProperties) |
PRBool | IsPropertyInPropertyArray (sbIPropertyArray *aPropArray, const nsAString &aPropName) |
nsresult | UpdateLastPositionProperty (sbIMediaItem *aItem, nsIVariant *aData) |
nsresult | SeekCallback (PRUint64 aPosition) |
nsresult | StopPlaybackHelper (nsAutoMonitor &aMonitor) |
nsresult | ValidateMediaItemControllerPlayback (PRBool aFromUserAction, PRInt32 aOnHoldStatus, PRBool *_proceed) |
Additional Inherited Members | |
Public Attributes inherited from sbIMediacoreSequencer | |
const unsigned long | MODE_FORWARD = 0 |
The mode used to generate the sequence. Note that it is possible to disable shuffle mode using the playlist.shuffle.disabled DataRemote. In this case, setting the mode to MODE_SHUFFLE will result in NS_ERROR_FAILURE. More... | |
const unsigned long | MODE_REVERSE = 1 |
const unsigned long | MODE_SHUFFLE = 1 << 1 |
const unsigned long | MODE_CUSTOM = 1 << 16 |
attribute unsigned long | mode |
const unsigned long | MODE_REPEAT_NONE = 0 |
The repeat mode to use. Note that it is possible to disable repeat mode using the playlist.repeat.disabled DataRemote. In this case, setting the mode to MODE_REPEAT_ONE or MODE_REPEAT_ALL will result in NS_ERROR_FAILURE. More... | |
const unsigned long | MODE_REPEAT_ONE = 1 |
const unsigned long | MODE_REPEAT_ALL = 1 << 1 |
attribute unsigned long | repeatMode |
attribute sbIMediaListView | view |
The view that was used to generate the current sequence. More... | |
readonly attribute unsigned long | viewPosition |
The current position in the view. This position is tied to the sequencePosition. More... | |
readonly attribute sbIMediaItem | currentItem |
The current item in the view. More... | |
readonly attribute sbIMediaItem | nextItem |
The next item in the sequence. More... | |
readonly attribute nsIArray | currentSequence |
The current sequence. It contains the indexes of the songs in the current sequence in the view. More... | |
attribute unsigned long | sequencePosition |
The current position in the sequence. This position is tied to the viewPosition. More... | |
const long | AUTO_PICK_INDEX = -1 |
Allow the sequencer to pick the most appropriate start index for a sequence. More... | |
attribute sbIMediacoreSequenceGenerator | customGenerator |
Public Attributes inherited from sbIMediacoreStatus | |
const unsigned long | STATUS_UNKNOWN = 0 |
const unsigned long | STATUS_PLAYING = 1 |
const unsigned long | STATUS_PAUSED = 1 << 1 |
const unsigned long | STATUS_STOPPED = 1 << 2 |
const unsigned long | STATUS_BUFFERING = 1 << 3 |
readonly attribute unsigned long | state |
Public Attributes inherited from sbIMediaItemControllerListener | |
const long | VALIDATEPLAYBACKCOMPLETE_PROCEED = 0 |
Result constant for onValidatePlaybackComplete used to proceed with playing the validated item. More... | |
const long | VALIDATEPLAYBACKCOMPLETE_SKIP = 1 |
Result constant for onValidatePlaybackComplete used to skip item and continue on with the next in queue. More... | |
Definition at line 57 of file sbMediacoreSequencer.h.
typedef std::vector<PRUint32> sbMediacoreSequencer::sequence_t |
Definition at line 80 of file sbMediacoreSequencer.h.
typedef std::map<PRUint32, PRUint32> sbMediacoreSequencer::sequencemap_t |
Definition at line 81 of file sbMediacoreSequencer.h.
|
protected |
Enumerator | |
---|---|
ONHOLD_NOTONHOLD | |
ONHOLD_PLAYVIEW | |
ONHOLD_NEXT | |
ONHOLD_PREVIOUS |
Definition at line 285 of file sbMediacoreSequencer.h.
sbIMediacoreStatus sbMediacoreSequencer::sbMediacoreSequencer | ( | ) |
Definition at line 180 of file sbMediacoreSequencer.cpp.
|
protectedvirtual |
nsresult sbMediacoreSequencer::BindDataRemotes | ( | ) |
Definition at line 329 of file sbMediacoreSequencer.cpp.
|
protected |
nsresult sbMediacoreSequencer::CoreHandleNextSetup | ( | ) |
Definition at line 1865 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::DelayedCheck | ( | ) |
Definition at line 2183 of file sbMediacoreSequencer.cpp.
|
protected |
Definition at line 2287 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::GetItem | ( | const sequence_t & | aSequence, |
PRUint32 | aPosition, | ||
sbIMediaItem ** | aItem | ||
) |
Definition at line 1571 of file sbMediacoreSequencer.cpp.
PRBool sbMediacoreSequencer::HandleAbort | ( | ) |
Definition at line 1943 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::HandleDelayedCheckTimer | ( | nsITimer * | aTimer | ) |
Definition at line 4325 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::HandleErrorEvent | ( | sbIMediacoreEvent * | aEvent | ) |
nsresult sbMediacoreSequencer::HandleMetadataEvent | ( | sbIMediacoreEvent * | aEvent | ) |
nsresult sbMediacoreSequencer::HandleMuteChangeEvent | ( | sbIMediacoreEvent * | aEvent | ) |
nsresult sbMediacoreSequencer::HandleSequencerTimer | ( | nsITimer * | aTimer | ) |
nsresult sbMediacoreSequencer::HandleVolumeChangeEvent | ( | sbIMediacoreEvent * | aEvent | ) |
nsresult sbMediacoreSequencer::Init | ( | ) |
|
protected |
Definition at line 1150 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::ProcessNewPosition | ( | ) |
nsresult sbMediacoreSequencer::RecalculateSequence | ( | PRInt64 * | aViewPosition = nsnull | ) |
Definition at line 1421 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::ResetMetadataDataRemotes | ( | ) |
Definition at line 1252 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::ResetPlayerControlDataRemotes | ( | ) |
Definition at line 1962 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::ResetPlayingVideoDataRemote | ( | ) |
|
protected |
Asynchronous callback to seek
Definition at line 3712 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::SetMetadataDataRemote | ( | const nsAString & | aId, |
const nsAString & | aValue | ||
) |
Definition at line 1086 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::SetMetadataDataRemotesFromItem | ( | sbIMediaItem * | aItem, |
sbIPropertyArray * | aPropertiesChanged = nsnull |
||
) |
Definition at line 1179 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::Setup | ( | nsIURI * | aURI = nsnull | ) |
Definition at line 1660 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::SetViewWithViewPosition | ( | sbIMediaListView * | aView, |
PRInt64 * | aViewPosition = nsnull |
||
) |
|
protected |
Definition at line 2307 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::StartSequenceProcessor | ( | ) |
Definition at line 290 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::StartWatchingView | ( | ) |
Definition at line 2056 of file sbMediacoreSequencer.cpp.
|
protected |
Helper function to cleanly stop the playback. The monitor must be locked when this function is called.
Definition at line 1310 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::StopSequenceProcessor | ( | ) |
Definition at line 308 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::StopWatchingView | ( | ) |
Definition at line 2119 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UnbindDataRemotes | ( | ) |
Definition at line 674 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateCurrentItemDuration | ( | PRUint64 | aDuration | ) |
Definition at line 1280 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateDurationDataRemotes | ( | PRUint64 | aDuration | ) |
Definition at line 878 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateItemUIDIndex | ( | ) |
Definition at line 2207 of file sbMediacoreSequencer.cpp.
|
protected |
Update the "lastPosition" property on the item, to support resuming playback from where things left off
Definition at line 2359 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateMuteDataRemote | ( | PRBool | aMuted | ) |
Definition at line 1032 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdatePlayStateDataRemotes | ( | ) |
Definition at line 813 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdatePositionDataRemotes | ( | PRUint64 | aPosition | ) |
Definition at line 840 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateRepeatDataRemote | ( | PRUint32 | aRepeatMode | ) |
Definition at line 943 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateShuffleDataRemote | ( | PRUint32 | aMode | ) |
Definition at line 925 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateURLDataRemotes | ( | nsIURI * | aURI | ) |
Definition at line 903 of file sbMediacoreSequencer.cpp.
nsresult sbMediacoreSequencer::UpdateVolumeDataRemote | ( | PRFloat64 | aVolume | ) |
Definition at line 995 of file sbMediacoreSequencer.cpp.
|
protected |
Checks for a mediaitemcontroller for the current item, and return true or false depending on whether the item should be skipped by the sequencer
Definition at line 2987 of file sbMediacoreSequencer.cpp.
|
protected |
Definition at line 205 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 209 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 208 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 211 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 201 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 270 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 269 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 268 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 223 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 231 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 238 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 232 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 233 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 234 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 235 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 236 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 237 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 240 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 241 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 245 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 246 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 243 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 252 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 247 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 248 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 249 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 242 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 251 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 260 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 259 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 255 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 258 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 254 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 257 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 265 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 203 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 197 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 273 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 272 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 226 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 214 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 194 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 279 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 280 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 199 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 277 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 284 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 212 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 220 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 202 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 228 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 215 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 276 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 282 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 198 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 218 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 262 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 206 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 224 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 274 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 196 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 200 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 291 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 283 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 292 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 217 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 219 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 278 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 266 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 221 of file sbMediacoreSequencer.h.
|
protected |
Definition at line 281 of file sbMediacoreSequencer.h.