- /************************************************************************
- * CHXSymClipInfo.h
- * -------------
- *
- * Synopsis:
- * Aggregates clip information for a given clip. This includes stream
- * and source headers, stream bitrates and source URLs.
- *
- * This info can be accessed (e.g., for clip info display) even after the
- * player session from which the info originates has ended.
- *
- *
- * Target:
- * Symbian OS
- *
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- *****************************************************************************/
- #ifndef CHXSYMCLIPINFO_H__
- #define CHXSYMCLIPINFO_H__
- #include "carray.h" //CHXPtrArray
- _INTERFACE IHXPlayer;
- _INTERFACE IHXRequest;
- // class CHXSymClipInfo
- class CHXSymClipInfo
- {
- public:
- // ctor and dtor
- CHXSymClipInfo();
- virtual ~CHXSymClipInfo();
- void CacheHeadersL(IHXPlayer* pPlayer);
- void CacheURLsL(IHXPlayer* pPlayer);
- void CachePresentationInfoL(IHXPlayer* pPlayer);
- void CacheRequestInfo(IHXRequest* pRequest);
- void SaveStreamBitrateValuesL(IHXPlayer* pPlayer);
- void Reset();
- // source
- UINT32 GetSourceCount() const;
- comptr<IHXValues> GetFileHeader(UINT32 idxSource) const;
- const char* GetURL(UINT32 idxSource) const;
- // stream
- UINT32 GetStreamCount(UINT32 idxSource) const;
- comptr<IHXValues> GetStreamHeader(UINT32 idxStream, UINT32 idxSource) const;
- // bitrate
- UINT32 GetStreamBitrate(UINT32 idxStream, UINT32 idxSource) const;
- // other
- bool IsVideoPresentation() const;
- bool IsLive() const;
- const char* GetServerDescription() const;
- private:
- // implementation helpers
- comptr<IHXValues> GetHeaderHelper(UINT32 idxSource, UINT32 idxHeader) const;
- void CleanupHeaders();
- void CleanupURLs();
- void CleanupHeaders(CHXPtrArray* pSourceHeaders);
- void CleanupBitrateInfo();
- bool DoCheckForNonAudioStreams();
- private:
- // an array of CHXPtrArray*
- CHXPtrArray m_sourceHeaders;
- // an array of CHXPtrArray*
- CHXPtrArray m_bitrateInfo;
- // an array of CHXString*
- CHXPtrArray m_sourceURLs;
- bool m_bHasVideo;
- bool m_bIsLive;
- CHXString m_strServer;
- };
- inline
- bool CHXSymClipInfo::IsVideoPresentation() const
- {
- return m_bHasVideo;
- }
- inline
- bool CHXSymClipInfo::IsLive() const
- {
- return m_bIsLive;
- }
- inline
- const char* CHXSymClipInfo::GetServerDescription() const
- {
- return m_strServer;
- }
- #endif // CHXSYMCLIPINFO_H__