15 #ifndef _MpStreamQueuePlayer_h_ 16 #define _MpStreamQueuePlayer_h_ 18 #ifndef DISABLE_STREAM_PLAYER // [ 26 #include "os/OsBSem.h" 27 #include "os/OsDefs.h" 28 #include "os/OsMsgQ.h" 29 #include "os/OsServerTask.h" 30 #include "os/OsStatus.h" 31 #include "os/OsRWMutex.h" 32 #include "os/OsQueuedEvent.h" 35 #define DEFAULT_QUEUE_LENGTH 64 // Default length of queue 36 #define EXPAND_QUEUE_LENGTH 16 // Queue grows by this much 81 virtual OsStatus
add(Url& url,
int flags) ;
88 virtual OsStatus
add(UtlString* pBuffer,
int flags) ;
96 virtual OsStatus
play() ;
99 virtual OsStatus
reset() ;
107 virtual OsStatus
clear() ;
111 virtual OsStatus
wait(
const OsTime& rTimeout = OsTime::OS_INFINITY) ;
239 #endif // DISABLE_STREAM_PLAYER ] 241 #endif // _MpStreamQueuePlayer_h_ OsStatus addListener(MpQueuePlayerListener *pListener)
Definition: MpStreamQueuePlayer.cpp:387
virtual OsStatus add(Url &url, int flags)
Definition: MpStreamQueuePlayer.cpp:144
virtual void playerPrefetched(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:812
OsQueuedEvent * mpQueueEvent
Definition: MpStreamQueuePlayer.h:213
Definition: MpPlayerListener.h:34
OsMsgQ * mpMsgQ
Definition: MpStreamQueuePlayer.h:208
PlayerListenerDb mListenerDb[MAX_PLAYER_LISTENERS]
Definition: MpStreamQueuePlayer.h:233
struct PlaylistQueue * mToPlayQueue
Definition: MpStreamQueuePlayer.h:215
UtlString mTarget
Definition: MpStreamQueuePlayer.h:209
virtual OsStatus wait(const OsTime &rTimeout=OsTime::OS_INFINITY)
Definition: MpStreamQueuePlayer.cpp:361
int expandQueue(struct PlaylistQueue *&queue, int currentLength, int desiredLength)
Definition: MpStreamQueuePlayer.cpp:944
OsRWMutex mListenerMutex
Definition: MpStreamQueuePlayer.h:234
void handleDequeue()
Definition: MpStreamQueuePlayer.cpp:629
virtual void playerStopped(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:845
Definition: MpStreamQueuePlayer.h:55
void fireQueuePlayerStopped()
Definition: MpStreamQueuePlayer.cpp:914
Definition: MpStreamQueuePlayer.h:197
virtual void playerPlaying(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:832
virtual void playerFailed(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:877
Definition: MpPlayer.h:92
void swapQueues(struct PlaylistQueue *&queue1, int &queueLength1, struct PlaylistQueue *&queue2, int &queueLength2)
Definition: MpStreamQueuePlayer.cpp:988
Definition: MpStreamQueuePlayer.h:63
SourceType
Definition: MpStreamQueuePlayer.h:60
Definition: MpStreamQueuePlayer.h:196
MpStreamQueuePlayer & operator=(const MpStreamQueuePlayer &rhs)
Definition: MpStreamQueuePlayer.cpp:472
UtlBoolean isPlaying()
Definition: MpStreamQueuePlayer.cpp:440
int mToPlayQueueLength
Definition: MpStreamQueuePlayer.h:216
void handleRemoveFailed()
Definition: MpStreamQueuePlayer.cpp:692
Definition: MpPlayerEvent.h:35
int mNumToPlayElements
Definition: MpStreamQueuePlayer.h:217
void setFailedPlayer(MpPlayer *pPlayer)
Definition: MpStreamQueuePlayer.cpp:754
virtual UtlBoolean handleMessage(OsMsg &rMsg)
Definition: MpStreamQueuePlayer.cpp:484
void fireQueuePlayerStarted()
Definition: MpStreamQueuePlayer.cpp:901
OsBSem mSemQueueChange
Definition: MpStreamQueuePlayer.h:210
Definition: MpStreamQueuePlayer.h:202
Definition: MpStreamQueuePlayer.h:199
virtual void playerPaused(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:838
int mPlayingQueueLength
Definition: MpStreamQueuePlayer.h:219
virtual ~MpStreamQueuePlayer()
Definition: MpStreamQueuePlayer.cpp:80
void handleReset()
Definition: MpStreamQueuePlayer.cpp:533
void handlePlayNext()
Definition: MpStreamQueuePlayer.cpp:586
#define MAX_PLAYER_LISTENERS
Definition: MpPlayer.h:27
OsStatus removeListener(MpQueuePlayerListener *pListener)
Definition: MpStreamQueuePlayer.cpp:413
virtual OsStatus reset()
Definition: MpStreamQueuePlayer.cpp:286
OsBSem mSemWaitSynch
Definition: MpStreamQueuePlayer.h:211
virtual OsStatus clear()
Definition: MpStreamQueuePlayer.cpp:316
MpStreamQueuePlayer(OsMsgQ *pMsgQ, const char *pTarget=NULL)
Definition: MpStreamQueuePlayer.cpp:37
Definition: MpStreamPlayer.h:48
UtlBoolean inUse
Definition: MpStreamQueuePlayer.h:229
virtual OsStatus play()
param pBuffer - Net Buffer containing buffered audio data. The
Definition: MpStreamQueuePlayer.cpp:244
UtlBoolean mbFatalError
Definition: MpStreamQueuePlayer.h:221
Definition: MpStreamQueuePlayer.h:227
int mNumPlayingElements
Definition: MpStreamQueuePlayer.h:220
void fireQueuePlayerAdvanced()
Definition: MpStreamQueuePlayer.cpp:927
MpQueuePlayerListener * pListener
Definition: MpStreamQueuePlayer.h:230
virtual OsStatus destroy()
Definition: MpStreamQueuePlayer.cpp:305
UtlBoolean isPlayingStream(MpPlayer *pPlayer)
Definition: MpStreamQueuePlayer.cpp:677
struct PlaylistQueue * mPlayingQueue
Definition: MpStreamQueuePlayer.h:218
virtual void playerRealized(MpPlayerEvent &event)
Definition: MpStreamQueuePlayer.cpp:788
MpStreamPlayer * pPlayer
Definition: MpStreamQueuePlayer.h:204
Definition: MpStreamQueuePlayer.h:62
Definition: MpQueuePlayerListener.h:34
Definition: MpStreamQueuePlayer.h:198
UtlBoolean bFailed
Definition: MpStreamQueuePlayer.h:205