📄 audrend.h
字号:
//
STDMETHOD (OnPacket) (THIS_
IHXPacket* pPacket,
LONG32 lTimeOffset);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnTimeSync
// Purpose:
// Called by client engine to inform the renderer of the current
// time relative to the streams synchronized time-line. The
// renderer should use this time value to update its display or
// render it's stream data accordingly.
//
STDMETHOD (OnTimeSync) (THIS_
ULONG32 ulTime);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnPreSeek
// Purpose:
// Called by client engine to inform the renderer that a seek is
// about to occur. The render is informed the last time for the
// stream's time line before the seek, as well as the first new
// time for the stream's time line after the seek will be completed.
//
STDMETHOD (OnPreSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnPostSeek
// Purpose:
// Called by client engine to inform the renderer that a seek has
// just occured. The render is informed the last time for the
// stream's time line before the seek, as well as the first new
// time for the stream's time line after the seek.
//
STDMETHOD (OnPostSeek) (THIS_
ULONG32 ulOldTime,
ULONG32 ulNewTime);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnPause
// Purpose:
// Called by client engine to inform the renderer that a pause has
// just occured. The render is informed the last time for the
// stream's time line before the pause.
//
STDMETHOD (OnPause) (THIS_
ULONG32 ulTime);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnBegin
// Purpose:
// Called by client engine to inform the renderer that a begin or
// resume has just occured. The render is informed the first time
// for the stream's time line after the resume.
//
STDMETHOD (OnBegin) (THIS_
ULONG32 ulTime);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::OnBuffering
// Purpose:
// Called by client engine to inform the renderer that buffering
// of data is occuring. The render is informed of the reason for
// the buffering (start-up of stream, seek has occured, network
// congestion, etc.), as well as percentage complete of the
// buffering process.
//
STDMETHOD (OnBuffering) (THIS_
ULONG32 ulFlags,
UINT16 unPercentComplete);
/////////////////////////////////////////////////////////////////////////
// Method:
// IHXRenderer::GetDisplayType
// Purpose:
// Called by client engine to ask the renderer for it's preferred
// display type. When layout information is not present, the
// renderer will be asked for it's prefered display type. Depending
// on the display type a buffer of additional information may be
// needed. This buffer could contain information about preferred
// window size.
//
STDMETHOD (GetDisplayType) (THIS_
REF(HX_DISPLAY_TYPE) ulFlags,
REF(IHXBuffer*) pBuffer);
/************************************************************************
* Method:
* IHXRenderer::OnEndofPackets
* Purpose:
* Called by client engine to inform the renderer that all the
* packets have been delivered. However, if the user seeks before
* EndStream() is called, renderer may start getting packets again
* and the client engine will eventually call this function again.
*/
STDMETHOD(OnEndofPackets) (THIS);
/*
* IHXDryNotification methods
*/
/************************************************************************
* Method:
* IHXDryNotificationOnDryNotification
* Purpose:
* This function is called when it is time to write to audio device
* and there is not enough data in the audio stream. The renderer can
* then decide to add more data to the audio stream. This should be
* done synchronously within the call to this function.
* It is OK to not write any data. Silence will be played instead.
*/
STDMETHOD(OnDryNotification) (THIS_
UINT32 /*IN*/ ulCurrentStreamTime,
UINT32 /*IN*/ ulMinimumDurationRequired);
/*
* IHXStatistics methods
*/
STDMETHOD(InitializeStatistics) (THIS_ UINT32 ulRegistryID);
STDMETHOD(UpdateStatistics) (THIS);
/*
* IHXInterruptSafe methods
*/
/************************************************************************
* Method:
* IHXInterruptSafe::IsInterruptSafe
* Purpose:
* This is the function that will be called to determine if
* interrupt time execution is supported.
*/
STDMETHOD_(BOOL,IsInterruptSafe) (THIS)
{ return TRUE; };
IUnknown* GetContext(void)
{
return m_pContext;
}
static LONG32 CmpTime(ULONG32 ulTime1, ULONG32 ulTime2)
{
return ((LONG32) (ulTime1 - ulTime2));
}
/************************************************************************
* Public Statistics Methods
*/
#if defined(HELIX_FEATURE_STATS)
HX_RESULT ReportStat(AudioStatEntryID eEntryID, char* pVal)
{
return m_pAudioStats->ReportStat(eEntryID, pVal);
}
HX_RESULT ReportStat(AudioStatEntryID eEntryID, INT32 lVal)
{
return m_pAudioStats->ReportStat(eEntryID, lVal);
}
#else // HELIX_FEATURE_STATS
HX_RESULT ReportStat(AudioStatEntryID eEntryID, char* pVal)
{
return HXR_OK;
}
HX_RESULT ReportStat(AudioStatEntryID eEntryID, INT32 lVal)
{
return HXR_OK;
}
#endif // HELIX_FEATURE_STATS
protected:
virtual ~CAudioRenderer();
/*
* Renderer's customizable fuctions - can be called any time
*/
/*
* Fixed Renderer Configuration - must be callable at any time
*/
virtual const char* GetUpgradeMimeType(void);
virtual const char* GetRendererName(void);
virtual const char* GetCodecName(void);
virtual const char* GetCodecFourCC(void);
/*
* Renderer Configuration - must be callable any time
* after reception of the header
*/
virtual void GetStreamVersion(ULONG32 &ulThisMajorVersion,
ULONG32 &ulThisMinorVersion);
virtual void GetContentVersion(ULONG32 &ulThisMajorVersion,
ULONG32 &ulThisMinorVersion);
virtual CAudioFormat* CreateFormatObject(IHXValues* pHeader);
/*
* Renderer's member variables sharable with the derived renderer
*/
IUnknown* m_pContext;
IHXStream* m_pStream;
IHXBackChannel* m_pBackChannel;
IHXValues* m_pHeader;
IHXErrorMessages* m_pErrorMessages;
IHXCommonClassFactory* m_pCommonClassFactory;
IHXPreferences* m_pPreferences;
IHXRegistry* m_pRegistry;
ULONG32 m_ulRegistryID;
CAudioFormat* m_pAudioFormat;
#if defined(HELIX_FEATURE_STATS)
CAudioStatistics* m_pAudioStats;
#else
void* m_pAudioStats;
#endif /* HELIX_FEATURE_STATS */
LONG32 m_lRefCount;
};
#endif // _AUDREND_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -