basgroup.h

来自「symbian 下的helix player源代码」· C头文件 代码 · 共 501 行 · 第 1/2 页

H
501
字号
    /*
     *  IHXGroup methods
     */
    /************************************************************************
    *  Method:
    *      IHXGroup::SetGroupProperties
    *  Purpose:
    *		Set any group specific information like Title Author 
    *		Copyright etc. 
    */
    STDMETHOD(SetGroupProperties)   (THIS_
				     IHXValues*  /*IN*/ pProperties);

    /************************************************************************
    *  Method:
    *      IHXGroup::GetGroupProperties
    *  Purpose:
    *		Get any group specific information. May return NULL.
    */
    STDMETHOD_(IHXValues*, GetGroupProperties)   (THIS);

    /************************************************************************
    *  Method:
    *      IHXGroup::GetTrackCount
    *  Purpose:
    *		Get the number of tracks within this group.
    */
    STDMETHOD_(UINT16,GetTrackCount)    (THIS);

    /************************************************************************
    *  Method:
    *      IHXGroup::GetTrack
    *  Purpose:
    *		Call this to hook audio data after all audio streams in this
    *		have been mixed.
    */
    STDMETHOD(GetTrack)	(THIS_
			UINT16 	    /*IN*/ uTrackIndex,
			REF(IHXValues*)  /*OUT*/ pTrack);

    /************************************************************************
    *  Method:
    *      IHXGroup::AddTrack
    *  Purpose:
    *		Add Tracks to the group.
    */
    STDMETHOD(AddTrack)	(THIS_
			IHXValues*	/*IN*/ pTrack);

    /************************************************************************
    *  Method:
    *      IHXGroup::RemoveTrack
    *  Purpose:
    *		Remove an already added track
    */
    STDMETHOD(RemoveTrack)  (THIS_
			    UINT16	/*IN*/ uTrackIndex);

    /* Other public fuctions */
    virtual HX_RESULT	CurrentGroupSet(void);
    virtual void	Close(void);
};

class HXBasicGroupManager : public IHXGroupManager,
			    public IHXPreCacheGroupMgr
{
protected:
    LONG32		m_lRefCount;
    CHXMapLongToObj*	m_pGroupMap;
    CHXSimpleList*	m_pSinkList;
    IHXValues*		m_pPresentationProperties;
    
    // required for precache support
    UINT16	    m_uGroupCount;
    UINT16	    m_uCurrentGroup;
    UINT16 	    m_uNextGroup;
    BOOL 	    m_bDefaultNextGroup;
    BOOL	    m_bCurrentGroupInitialized;
    HXPlayer*	    m_pPlayer;

    virtual	    ~HXBasicGroupManager();
    PRIVATE_DESTRUCTORS_ARE_NOT_A_CRIME

    HX_RESULT	    TrackAdded	(UINT16 uGroupIndex, UINT16 uTrackIndex, IHXValues* pTrack);
    HX_RESULT	    TrackRemoved(UINT16 uGroupIndex, UINT16 uTrackIndex, IHXValues* pTrack);

    void 	    RemoveAllGroup(void);

    friend class HXBasicGroup;
    friend class HXPlayer;

#if defined(HELIX_FEATURE_ADVANCEDGROUPMGR)
    friend class HXAdvancedGroup;
#endif /* HELIX_FEATURE_ADVANCEDGROUPMGR */

public:

		    HXBasicGroupManager(HXPlayer* pPlayer = NULL);
    /*
     *  IUnknown methods
     */
    STDMETHOD(QueryInterface)       (THIS_
				    REFIID riid,
				    void** ppvObj);

    STDMETHOD_(ULONG32,AddRef)      (THIS);

    STDMETHOD_(ULONG32,Release)     (THIS);

    /*
     *  IHXGroupManager methods
     */

    /************************************************************************
    *  Method:
    *      IHXGroupManager::CreateGroup
    *  Purpose:
    *		Create a group
    */
    STDMETHOD(CreateGroup)    (REF(IHXGroup*) pGroup);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::GetGroupCount
    *  Purpose:
    *		Get the number of groups within the presentation.
    */
    STDMETHOD_(UINT16,GetGroupCount)    (THIS);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::GetGroup
    *  Purpose:
    *		Get ith group in the presentation
    */
    STDMETHOD(GetGroup)	(THIS_
			UINT16 		  /*IN*/  uGroupIndex,
			REF(IHXGroup*)  /*OUT*/ pGroup);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::SetCurrentGroup
    *  Purpose:
    *		Play this group in the presentation.
    */
    STDMETHOD(SetCurrentGroup)	(THIS_
				UINT16 	    /*IN*/ uGroupIndex);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::GetCurrentGroup
    *  Purpose:
    *		Get current group index
    */
    STDMETHOD(GetCurrentGroup)	(THIS_
				REF(UINT16) /*OUT*/ uGroupIndex);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::AddGroup
    *  Purpose:
    *		Add a group to the presentation.
    */
    STDMETHOD(AddGroup)	(THIS_
			IHXGroup*	    /*IN*/ pGroup);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::RemoveGroup
    *  Purpose:
    *		Remove an already added group
    */
    STDMETHOD(RemoveGroup)  (THIS_
			    UINT16 	/*IN*/ uGroupIndex);


    /************************************************************************
    *  Method:
    *      IHXGroupManager::AddSink
    *  Purpose:
    *		Add a sink to get notifications about any tracks or groups
    *		being added to the presentation.
    */
    STDMETHOD(AddSink)	(THIS_
			IHXGroupSink* /*IN*/ pGroupSink);


    /************************************************************************
    *  Method:
    *      IHXGroupManager::RemoveSink
    *  Purpose:
    *		Remove Sink
    */
    STDMETHOD(RemoveSink)   (THIS_
			    IHXGroupSink* /*IN*/ pGroupSink);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::SetPresentationProperties
    *  Purpose:
    *		Set any presentation information like Title Author 
    *		Copyright etc. 
    */
    STDMETHOD(SetPresentationProperties)   (THIS_
					    IHXValues*  /*IN*/ pProperties);

    /************************************************************************
    *  Method:
    *      IHXGroupManager::GetPresentationProperties
    *  Purpose:
    *		Get any presentation information. May return NULL.
    */
    STDMETHOD_(IHXValues*, GetPresentationProperties)   (THIS);

    /************************************************************************
    *  Method:
    *      IHXPreCacheGroupMgr::SetNextGroup
    *  Purpose:
    *		Play this as the next group in the presentation.
    */
    STDMETHOD(SetNextGroup)	(THIS_
				UINT16 	    /*IN*/ uGroupIndex);
                
    /************************************************************************
    *  Method:
    *      IHXPreCacheGroupMgr::GetNextGroup
    *  Purpose:
    *		Get the next group to be played in the presentation.
    */
    STDMETHOD(GetNextGroup)	(THIS_ REF(UINT16) uGroupIndex);

    /************************************************************************
    *  Method:
    *      IHXPreCacheGroupMgr::DefaultNextGroup
    *  Purpose:
    *		Reset to default the next group to play in the presentation.
    */
    STDMETHOD(DefaultNextGroup)	(THIS);

    virtual void	    SetMasterTAC(HXMasterTAC* pMasterTAC);
    virtual HX_RESULT	    TrackStarted(UINT16 uGroupIndex, UINT16 uTrackIndex);
    virtual HX_RESULT	    TrackStopped(UINT16 uGroupIndex, UINT16 uTrackIndex);
    virtual void	    PersistentComponentAdded(UINT16 uGroupIndex, UINT16 uTrackIndex);
    virtual void	    PersistentComponentRemoved(UINT16 uGroupIndex, UINT16 uTrackIndex);
    virtual HX_RESULT	    InsertGroupAt(UINT16 uGroupIndex, IHXGroup* pGroup);
    virtual void            Close(void);
};

#endif /*_BASICGROUP_H_*/

⌨️ 快捷键说明

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