⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hxplay.h

📁 著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
/* ***** BEGIN LICENSE BLOCK ***** 
 * Version: RCSL 1.0/RPSL 1.0 
 *  
 * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
 *      
 * The contents of this file, and the files included with this file, are 
 * subject to the current version of the RealNetworks Public Source License 
 * Version 1.0 (the "RPSL") available at 
 * http://www.helixcommunity.org/content/rpsl unless you have licensed 
 * the file under the RealNetworks Community Source License Version 1.0 
 * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
 * in which case the RCSL will apply. You may also obtain the license terms 
 * directly from RealNetworks.  You may not use this file except in 
 * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
 * applicable to this file, the RCSL.  Please see the applicable RPSL or 
 * RCSL for the rights, obligations and limitations governing use of the 
 * contents of the file.  
 *  
 * This file is part of the Helix DNA Technology. RealNetworks is the 
 * developer of the Original Code and owns the copyrights in the portions 
 * it created. 
 *  
 * This file, and the files included with this file, is distributed and made 
 * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
 * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
 * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
 * 
 * Technology Compatibility Kit Test Suite(s) Location: 
 *    http://www.helixcommunity.org/content/tck 
 * 
 * Contributor(s): 
 *  
 * ***** END LICENSE BLOCK ***** */ 

#ifndef _HXPLAYER_
#define _HXPLAYER_

#include "hxtypes.h"
#include "hxcomm.h"		// IHXRegistryID
#include "hxfiles.h"
#include "hxsmbw.h"
#include "hxresult.h"
#include "hxslist.h"
#include "chxelst.h"
#include "hxmap.h"
#include "chxpckts.h"
#include "hxurl.h"
#include "hxtick.h"
#include "hxmon.h"
#include "hxclreg.h"
#include "statinfo.h"
#include "strminfo.h"
#include "hxauth.h"
#include "hxpreftr.h"
#include "hxvsrc.h"

//#include "prefkeys.h"
#include "plprefk.h"
//#include "domain.h" 		// Needed for domain object

#include "timeval.h"
#include "hxausvc.h"
#include "hxpends.h"
#include "hxerror.h"
#include "hxmeta.h"
#include "chxphook.h"
#include "hxwin.h"
#include "hxcorgui.h"
#include "smartptr.h"
#include "miscsp.h"
#include "hxrquest.h"
#include "perscmgr.h"
#include "hxbsrc.h"
#include "hxsrc.h"
#include "hxcbobj.h"

#ifdef _SYMBIAN
//XXXgfw Wow, symbian's unistd.h #defines remove to be unlink.
//Very uncool.
#undef remove
#endif

// forward decl.
_INTERFACE IHXPlayer;
_INTERFACE IHXPlayer2;
_INTERFACE IHXAudioPlayerResponse;
_INTERFACE IHXClientEngine;
_INTERFACE IHXRenderer;
_INTERFACE IHXScheduler;
_INTERFACE IHXClientAdviseSink;
_INTERFACE IHXMetaTrack;
_INTERFACE IHXMetaLayout;
_INTERFACE IHXErrorMessages;
_INTERFACE IHXPreferences;
_INTERFACE IHXHyperNavigate;
_INTERFACE IHXAuthenticationManager;
_INTERFACE IHXSiteSupplier;
_INTERFACE IHXSiteLayout;
_INTERFACE IHXUpgradeCollection;
_INTERFACE IHXGroupSink;
_INTERFACE IHXGroup;
_INTERFACE IHXPlayerState;
_INTERFACE IHXProxyManager;
_INTERFACE IHXViewSourceCommand;
_INTERFACE IHXViewPortManager;
#if defined(HELIX_FEATURE_MEDIAMARKER)
_INTERFACE IHXMediaMarkerManager;
#endif /* #if defined(HELIX_FEATURE_MEDIAMARKER) */
#if defined(HELIX_FEATURE_EVENTMANAGER)
_INTERFACE IHXEventManager;
#endif /* #if defined(HELIX_FEATURE_EVENTMANAGER) */
_INTERFACE IHXPlayerNavigator;
_INTERFACE IHXClientRequestSink;

class CHXSiteManager;

class CHXAudioPlayer;
class HXClientEngine;
class HXSource;
class HXFileSource;
class HXNetSource;
class HXStream;

class HXPlayerCallback;
class UpdateStatsCallback;
class CHXAdviseSinkControl;
class CHXErrorSinkControl;
class HXCookies;

class Timeline;
class Timeval;
class HXMutex;

class Plugin2Handler;
struct IHXPlugin2Handler;


class HXPersistentComponentManager;
class HXPreferredTransportManager;

#ifdef _UNIX
_INTERFACE IHXSiteEventHandler;
#endif

struct STREAM_INFO;

typedef ULONG32	BufferingReason;

struct RendererInfo;
class  SourceInfo;
class HXPlayer;
class UpdateStatsCallback;
class HXPlayerCallback;
class HXBasicGroupManager;
class HXAdvancedGroupManager;
class NextGroupManager;
class PrefetchManager;
class HXMasterTAC;
class PlayerHyperNavigate;

struct IHXBandwidthManager;

class CHXEvent;
class CHXSimpleList;
class CHXMapStringToOb;
class HXViewPortManager;
#if defined(HELIX_FEATURE_MEDIAMARKER)
class CHXMediaMarkerManager;
#endif /* #if defined(HELIX_FEATURE_MEDIAMARKER) */
#if defined(HELIX_FEATURE_EVENTMANAGER)
class CRendererEventManager;
#endif /* #if defined(HELIX_FEATURE_EVENTMANAGER) */

#define DEFAULT_TIMESYNC_GRANULARITY	100
/* Lowest allowable time sync granularity */
#define MINIMUM_TIMESYNC_GRANULARITY	20

#ifndef _WIN16
//#if defined(HELIX_FEATURE_AUTHENTICATION)
typedef WRAPPED_POINTER(IUnknown) Wrapped_IUnknown;

class _CListOfWrapped_IUnknown_Node
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListOfWrapped_IUnknown_Node();
    ~_CListOfWrapped_IUnknown_Node();

    Wrapped_IUnknown& value();
    const Wrapped_IUnknown& value() const;
    void value(const Wrapped_IUnknown& rclsNewValue);
    _CListOfWrapped_IUnknown_Node& operator=(const Wrapped_IUnknown& rclsNewValue); 
    _CListOfWrapped_IUnknown_Node* next() const;
    void next(_CListOfWrapped_IUnknown_Node* plocnNew);
    _CListOfWrapped_IUnknown_Node* prev() const;
    void prev(_CListOfWrapped_IUnknown_Node* plocnNew);
    void Remove();
    void Insert(_CListOfWrapped_IUnknown_Node& rlocnNew);
						
protected:
    Wrapped_IUnknown m_clsValue;
    _CListOfWrapped_IUnknown_Node* m_plocPrev;
    _CListOfWrapped_IUnknown_Node* m_plocNext;
    _CListOfWrapped_IUnknown_Node(const _CListOfWrapped_IUnknown_Node& rlocnOther){}
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

class _CListIteratorWrapped_IUnknown_;
class _CListReverseIteratorWrapped_IUnknown_;

class _CListOfWrapped_IUnknown_
{
public:
    typedef _CListIteratorWrapped_IUnknown_ iterator;
    typedef _CListReverseIteratorWrapped_IUnknown_ reverse_iterator;
    typedef const _CListReverseIteratorWrapped_IUnknown_ const_reverse_iterator;

#ifdef HELIX_FEATURE_AUTHENTICATION
    _CListOfWrapped_IUnknown_();
    _CListOfWrapped_IUnknown_(const _CListOfWrapped_IUnknown_& rlocOther);
    ~_CListOfWrapped_IUnknown_();
    _CListOfWrapped_IUnknown_& operator=(const _CListOfWrapped_IUnknown_& rlocOther); 

    iterator begin();
    const iterator begin() const;
    iterator end();
    const iterator end() const;

    reverse_iterator rbegin();
    const reverse_iterator rbegin() const;
    reverse_iterator rend();
    const reverse_iterator rend() const;

    iterator insert(iterator itBefore, const Wrapped_IUnknown&);
    void insert
    (
	iterator itBefore,
	const iterator itFirst,
	const iterator itLast
    );
    void remove(iterator itThis);
    void remove(iterator itFirst, iterator itLast);

    void empty();

protected:
    _CListOfWrapped_IUnknown_Node m_locnREnd;
    _CListOfWrapped_IUnknown_Node m_locnEnd;

    void _copy(const _CListOfWrapped_IUnknown_& rlocOther);
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

class _CListIteratorWrapped_IUnknown_
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListIteratorWrapped_IUnknown_();
    _CListIteratorWrapped_IUnknown_
    (
        const _CListOfWrapped_IUnknown_Node& rlocnNewLocation
    );
    _CListIteratorWrapped_IUnknown_(const _CListIteratorWrapped_IUnknown_& rliocOther);
    ~_CListIteratorWrapped_IUnknown_();

    _CListIteratorWrapped_IUnknown_& operator=
    (
	const _CListIteratorWrapped_IUnknown_& rliocOther
    );

    Wrapped_IUnknown& operator*();
    _CListIteratorWrapped_IUnknown_& operator=(const Wrapped_IUnknown& rclsNewValue);

    _CListIteratorWrapped_IUnknown_& operator++();
    const _CListIteratorWrapped_IUnknown_ operator++(int);

    _CListIteratorWrapped_IUnknown_& operator--();
    const _CListIteratorWrapped_IUnknown_ operator--(int);

private:
    _CListOfWrapped_IUnknown_Node* m_plocCurrent;

    friend class _CListOfWrapped_IUnknown_;
    friend BOOL operator==
    (
	const _CListIteratorWrapped_IUnknown_& rliocLeft,
	const _CListIteratorWrapped_IUnknown_& rliocRight
    );
    friend BOOL operator!=
    (
	const _CListIteratorWrapped_IUnknown_& rliocLeft,
	const _CListIteratorWrapped_IUnknown_& rliocRight
    );
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

#ifdef HELIX_FEATURE_AUTHENTICATION
BOOL operator==
(
    const _CListIteratorWrapped_IUnknown_& rliocLeft,
    const _CListIteratorWrapped_IUnknown_& rliocRight
);

BOOL operator!=
(
    const _CListIteratorWrapped_IUnknown_& rliocLeft,
    const _CListIteratorWrapped_IUnknown_& rliocRight
);
#endif /* HELIX_FEATURE_AUTHENTICATION */

class _CListReverseIteratorWrapped_IUnknown_
{
#ifdef HELIX_FEATURE_AUTHENTICATION
public:
    _CListReverseIteratorWrapped_IUnknown_();
    _CListReverseIteratorWrapped_IUnknown_
    (
        const _CListOfWrapped_IUnknown_Node& rlocnNewLocation
    );
    _CListReverseIteratorWrapped_IUnknown_
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocOther
    );
    ~_CListReverseIteratorWrapped_IUnknown_();

    _CListReverseIteratorWrapped_IUnknown_& operator=
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocOther
    );

    Wrapped_IUnknown& operator*();
    _CListReverseIteratorWrapped_IUnknown_& operator=(const Wrapped_IUnknown& rclsNewValue);

    _CListReverseIteratorWrapped_IUnknown_& operator++();
    const _CListReverseIteratorWrapped_IUnknown_ operator++(int);
    _CListReverseIteratorWrapped_IUnknown_& operator--();
    const _CListReverseIteratorWrapped_IUnknown_ operator--(int);

private:
    _CListOfWrapped_IUnknown_Node* m_plocCurrent;
    friend class _CListOfWrapped_IUnknown_;
    friend BOOL operator==
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
	const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
    );
    friend BOOL operator!=
    (
	const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
	const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
    );
#endif /* HELIX_FEATURE_AUTHENTICATION */
};

#ifdef HELIX_FEATURE_AUTHENTICATION
BOOL operator==
(
    const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
    const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
);
BOOL operator!=
(
    const _CListReverseIteratorWrapped_IUnknown_& rlriocLeft,
    const _CListReverseIteratorWrapped_IUnknown_& rlriocRight
);								    
#endif /* HELIX_FEATURE_AUTHENTICATION */

class _CHXAuthenticationRequests
{
public:
    _CHXAuthenticationRequests();
    ~_CHXAuthenticationRequests();

    HX_RESULT Add
    (
	HXPlayer* pPlayerRequester, 
	IHXAuthenticationManagerResponse* pAuthenticationManagerResponseRequester,
	IHXValues* pAuthenticationHeaderValues
    );
    HX_RESULT SatisfyPending
    (
	HX_RESULT ResultStatus, 
	const char* pCharUser, 
	const char* pCharPassword
    );
    void     ClearPendingList();
private:
    _CListOfWrapped_IUnknown_ m_ListOfIUnknownRequesters;
    HXMutex* m_pMutexProtectList;
    BOOL m_bUIShowing;
};
//#endif /* HELIX_FEATURE_AUTHENTICATION */

struct RedirectInfo
{
    RedirectInfo()
    {
	m_nGroupID = 0;
	m_nTrackID = 0;
	m_pURL = NULL;
    }

    ~RedirectInfo()
    {
	HX_VECTOR_DELETE(m_pURL);
    }

    UINT16  m_nGroupID;
    UINT16  m_nTrackID;
    char*   m_pURL;
};

struct PendingTrackInfo
{
    PendingTrackInfo(UINT16	    uGroupIndex, 
		     UINT16	    uTrackIndex,
		     IHXValues*    pTrack)
    {
	m_uGroupIndex	= uGroupIndex;
	m_uTrackIndex	= uTrackIndex;
	m_pTrack	= pTrack;
	m_pTrack->AddRef();
    }

    ~PendingTrackInfo()
    {
	HX_RELEASE(m_pTrack);
    }

    UINT16 	  m_uGroupIndex;
    UINT16 	  m_uTrackIndex;
    IHXValues*   m_pTrack;
};
#endif /* _WIN16 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -