sipxmedialib  Version 3.3
Public Types | Protected Member Functions | Private Attributes | List of all members
MpStreamPlayer Class Reference

#include <MpStreamPlayer.h>

Inheritance diagram for MpStreamPlayer:
Inheritance graph
[legend]
Collaboration diagram for MpStreamPlayer:
Collaboration graph
[legend]

Public Types

enum  SourceType { SourceUrl, SourceBuffer }
 
- Public Types inherited from MpPlayer
enum  playerType { STREAM_PLAYER, STREAM_PLAYLIST_PLAYER, STREAM_QUEUE_PLAYER }
 

Public Member Functions

Creators
 MpStreamPlayer (OsMsgQ *pMsg, Url url, int flags, const char *pTarget=NULL)
 
 MpStreamPlayer (OsMsgQ *pMsg, UtlString *pBuffer, int flags, const char *pTarget=NULL)
 
virtual ~MpStreamPlayer ()
 
Manipulators
virtual OsStatus realize (UtlBoolean bBlock=TRUE)
 
virtual OsStatus prefetch (UtlBoolean bBlock=TRUE)
 param bBlock - TRUE if the method should block until completion, More...
 
virtual OsStatus play (UtlBoolean bBlock=TRUE)
 param bBlock - TRUE if the method should block until completion, More...
 
virtual OsStatus rewind (UtlBoolean bBlock=TRUE)
 param bBlock - TRUE if the method should block until completion, More...
 
virtual OsStatus pause ()
 param bBlock - TRUE if the method should block until completion, More...
 
OsStatus setLoopCount (int iLoopCount)
 
virtual OsStatus stop ()
 
virtual OsStatus destroy ()
 
virtual void waitForDestruction ()
 
Accessors
virtual OsStatus getState (PlayerState &state)
 
virtual OsStatus getSourceType (int &iType) const
 
virtual OsStatus getSourceUrl (Url &url) const
 
virtual OsStatus getSourceBuffer (UtlString *&pBuffer) const
 
- Public Member Functions inherited from MpPlayer
 MpPlayer ()
 
virtual ~MpPlayer ()
 
OsStatus addListener (MpPlayerListener *pListener, void *pUserData=NULL)
 
OsStatus removeListener (MpPlayerListener *pListener)
 

Protected Member Functions

 MpStreamPlayer (const MpStreamPlayer &rMpStreamPlayer)
 
MpStreamPlayeroperator= (const MpStreamPlayer &rhs)
 
virtual UtlBoolean handleMessage (OsMsg &rMsg)
 
void setState (PlayerState iState)
 
PlayerState getState ()
 
- Protected Member Functions inherited from MpPlayer
void fireEvent (PlayerState state)
 
UtlBoolean isValidStateChange (PlayerState oldState, PlayerState newState)
 

Private Attributes

OsMsgQ * mpMsgQ
 
int mSourceType
 
Url mUrl
 
UtlString * mpBuffer
 
PlayerState mState
 
StreamHandle mHandle
 
UtlString mTarget
 
int mFlags
 
OsQueuedEvent * mpQueueEvent
 
OsBSem mSemStateChange
 
OsBSem mSemStateGuard
 
int miLoopCount
 
int miTimesAlreadyLooped
 
UtlBoolean mbRealized
 

Member Enumeration Documentation

enum SourceType
Enumerator
SourceUrl 
SourceBuffer 

Constructor & Destructor Documentation

MpStreamPlayer ( OsMsgQ *  pMsg,
Url  url,
int  flags,
const char *  pTarget = NULL 
)
MpStreamPlayer ( OsMsgQ *  pMsg,
UtlString *  pBuffer,
int  flags,
const char *  pTarget = NULL 
)

param pMsg - Destination for MpStreamMsg commands param url - Url identifing the source data stream param flags - Playing flags (see StreamDefs.h) param target - Target Id used by the msg receiver to help with

~MpStreamPlayer ( )
virtual

param pMsg - Destination for MpStreamMsg commands param pBuffer - Net Buffer containing buffered audio data. The param flags - Playing flags (see StreamDefs.h) param target - Target Id used by the msg receiver to help with

MpStreamPlayer ( const MpStreamPlayer rMpStreamPlayer)
protected

Member Function Documentation

OsStatus realize ( UtlBoolean  bBlock = TRUE)
virtual

Implements MpPlayer.

OsStatus prefetch ( UtlBoolean  bBlock = TRUE)
virtual

param bBlock - TRUE if the method should block until completion,

Implements MpPlayer.

OsStatus play ( UtlBoolean  bBlock = TRUE)
virtual

param bBlock - TRUE if the method should block until completion,

Implements MpPlayer.

OsStatus rewind ( UtlBoolean  bBlock = TRUE)
virtual

param bBlock - TRUE if the method should block until completion,

OsStatus pause ( )
virtual

param bBlock - TRUE if the method should block until completion,

Implements MpPlayer.

OsStatus setLoopCount ( int  iLoopCount)
OsStatus stop ( void  )
virtual

Implements MpPlayer.

OsStatus destroy ( )
virtual

Implements MpPlayer.

void waitForDestruction ( )
virtual
OsStatus getState ( PlayerState state)
virtual

Implements MpPlayer.

OsStatus getSourceType ( int &  iType) const
virtual
OsStatus getSourceUrl ( Url &  url) const
virtual
OsStatus getSourceBuffer ( UtlString *&  pBuffer) const
virtual
MpStreamPlayer & operator= ( const MpStreamPlayer rhs)
protected
UtlBoolean handleMessage ( OsMsg &  rMsg)
protectedvirtual
void setState ( PlayerState  iState)
protected
PlayerState getState ( void  )
protected

Member Data Documentation

OsMsgQ* mpMsgQ
private
int mSourceType
private
Url mUrl
private
UtlString* mpBuffer
private
PlayerState mState
private
StreamHandle mHandle
private
UtlString mTarget
private
int mFlags
private
OsQueuedEvent* mpQueueEvent
private
OsBSem mSemStateChange
private
OsBSem mSemStateGuard
private
int miLoopCount
private
int miTimesAlreadyLooped
private
UtlBoolean mbRealized
private