Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
chxavplayerstate.h
Package: helix.src.0812.rar [view]
Upload User: zhongxx05
Upload Date: 2007-06-06
Package Size: 33641k
Code Size: 3k
Category:
Symbian
Development Platform:
C/C++
- /************************************************************************
- * chxavplayerstate.h
- * ------------------
- *
- * Synopsis:
- * CHXAvPlayerState is helper class for CHXAvPlayer. It maintains player
- * state info and dispatches event notifications to observers. Observers
- * can use this to query for current player state info.
- *
- *
- * Target:
- * Symbian OS
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #ifndef CHXAVPLAYERSTATE_H__
- #define CHXAVPLAYERSTATE_H__
- #include "unkimp.h"
- #include "hxstring.h"
- #include "ihxpckts.h"
- #include "hxurl.h"
- #include "hxfiles.h"
- //#include "chxavcallback.h"
- #include "chxavplayerstatedispatch.h"
- // class CHXAvPlayerState
- class CHXAvPlayerState
- {
- public:
- // main player states
- enum State
- {
- Stopped,
- Initiating,
- Connecting,
- Playing,
- Seeking,
- Paused
- };
- // buffering sub-state applies while playing, seeking, paused
- enum BufferState
- {
- NotBuffering,
- BufferLoad,
- BufferSeek,
- BufferPlain
- };
- public:
- CHXAvPlayerState();
- virtual ~CHXAvPlayerState();
- void ConstructL();
- public:
- State GetState() const;
- BufferState GetBufferingState() const;
- UINT16 GetLastBufferPercent() const;
- void RemoveObserver(IHXSymPlayerStateObserver *observer);
- void AddObserver(IHXSymPlayerStateObserver *observer);
- private:
- friend class CHXAvPlayer;
- // called by CHXAvPlayer
- void OnPlayInitiate(const char *url);
- void OnNetConnect();
- void OnLoadSession(IHXRequest *request);
- void OnResume();
- void OnStop();
- void OnPause();
- void OnBuffering(ULONG32 type, UINT16 percent);
- void OnBeginSeek();
- void OnNewPos(ULONG32 time);
- void OnVolume(unsigned int percentVol);
- void OnMute(bool bMute);
- void OnError(HX_RESULT code);
- void OnAdvancePlaylist();
- private:
- // implementation
- void ChangeState(State destState);
- void ChangeBufferState(BufferState destState);
- CHXAvPlayerStateDispatch* m_pDispatch;
- State m_state;
- BufferState m_bufferState;
- UINT16 m_lastBufferPercent;
- ULONG32 m_lastTime;
- //CHXAvCallback m_cbConnectStateTransition;
- };
- inline
- CHXAvPlayerState::State CHXAvPlayerState::GetState() const { return m_state; }
- inline
- CHXAvPlayerState::BufferState CHXAvPlayerState::GetBufferingState() const { return m_bufferState; }
- inline
- UINT16 CHXAvPlayerState::GetLastBufferPercent() const { return m_lastBufferPercent; }
- #endif // CHXAVPLAYERSTATE_H__