亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? amfilter.h

?? 用DirectX制作高級動畫-[Advanced.Animation.with.DirectX]
?? H
?? 第 1 頁 / 共 4 頁
字號:
                        REFERENCE_TIME tStop,
                        double dRate);

    //================================================================================
    // IQualityControl methods
    //================================================================================

    // All inherited from CBasePin and not overridden here.
    // STDMETHODIMP Notify(IBaseFilter * pSender, Quality q);
    // STDMETHODIMP SetSink(IQualityControl * piqc);
};


//=====================================================================
//=====================================================================
// Defines CBaseInputPin
//
// derive your standard input pin from this.
// you need to supply GetMediaType and CheckConnect etc (see CBasePin),
// and you need to supply Receive to do something more useful.
//
//=====================================================================
//=====================================================================

class AM_NOVTABLE CBaseInputPin : public CBasePin,
                                  public IMemInputPin
{

protected:

    IMemAllocator *m_pAllocator;    // Default memory allocator

    // allocator is read-only, so received samples
    // cannot be modified (probably only relevant to in-place
    // transforms
    BYTE m_bReadOnly;

    // in flushing state (between BeginFlush and EndFlush)
    // if TRUE, all Receives are returned with S_FALSE
    BYTE m_bFlushing;

    // Sample properties - initalized in Receive
    AM_SAMPLE2_PROPERTIES m_SampleProps;

public:

    CBaseInputPin(
        TCHAR *pObjectName,
        CBaseFilter *pFilter,
        CCritSec *pLock,
        HRESULT *phr,
        LPCWSTR pName);
#ifdef UNICODE
    CBaseInputPin(
        CHAR *pObjectName,
        CBaseFilter *pFilter,
        CCritSec *pLock,
        HRESULT *phr,
        LPCWSTR pName);
#endif
    virtual ~CBaseInputPin();

    DECLARE_IUNKNOWN

    // override this to publicise our interfaces
    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);

    // return the allocator interface that this input pin
    // would like the output pin to use
    STDMETHODIMP GetAllocator(IMemAllocator ** ppAllocator);

    // tell the input pin which allocator the output pin is actually
    // going to use.
    STDMETHODIMP NotifyAllocator(
                    IMemAllocator * pAllocator,
                    BOOL bReadOnly);

    // do something with this media sample
    STDMETHODIMP Receive(IMediaSample *pSample);

    // do something with these media samples
    STDMETHODIMP ReceiveMultiple (
        IMediaSample **pSamples,
        long nSamples,
        long *nSamplesProcessed);

    // See if Receive() blocks
    STDMETHODIMP ReceiveCanBlock();

    // Default handling for BeginFlush - call at the beginning
    // of your implementation (makes sure that all Receive calls
    // fail). After calling this, you need to free any queued data
    // and then call downstream.
    STDMETHODIMP BeginFlush(void);

    // default handling for EndFlush - call at end of your implementation
    // - before calling this, ensure that there is no queued data and no thread
    // pushing any more without a further receive, then call downstream,
    // then call this method to clear the m_bFlushing flag and re-enable
    // receives
    STDMETHODIMP EndFlush(void);

    // this method is optional (can return E_NOTIMPL).
    // default implementation returns E_NOTIMPL. Override if you have
    // specific alignment or prefix needs, but could use an upstream
    // allocator
    STDMETHODIMP GetAllocatorRequirements(ALLOCATOR_PROPERTIES*pProps);

    // Release the pin's allocator.
    HRESULT BreakConnect();

    // helper method to check the read-only flag
    BOOL IsReadOnly() {
        return m_bReadOnly;
    };

    // helper method to see if we are flushing
    BOOL IsFlushing() {
        return m_bFlushing;
    };

    //  Override this for checking whether it's OK to process samples
    //  Also call this from EndOfStream.
    virtual HRESULT CheckStreaming();

    // Pass a Quality notification on to the appropriate sink
    HRESULT PassNotify(Quality& q);


    //================================================================================
    // IQualityControl methods (from CBasePin)
    //================================================================================

    STDMETHODIMP Notify(IBaseFilter * pSender, Quality q);

    // no need to override:
    // STDMETHODIMP SetSink(IQualityControl * piqc);


    // switch the pin to inactive state - may already be inactive
    virtual HRESULT Inactive(void);

    // Return sample properties pointer
    AM_SAMPLE2_PROPERTIES * SampleProps() {
        ASSERT(m_SampleProps.cbData != 0);
        return &m_SampleProps;
    }

};

///////////////////////////////////////////////////////////////////////////
// CDynamicOutputPin
//

class CDynamicOutputPin : public CBaseOutputPin,
                          public IPinFlowControl
{
public:
#ifdef UNICODE
    CDynamicOutputPin(
        CHAR *pObjectName,
        CBaseFilter *pFilter,
        CCritSec *pLock,
        HRESULT *phr,
        LPCWSTR pName);
#endif

    CDynamicOutputPin(
        TCHAR *pObjectName,
        CBaseFilter *pFilter,
        CCritSec *pLock,
        HRESULT *phr,
        LPCWSTR pName);

    ~CDynamicOutputPin();

    // IUnknown Methods
    DECLARE_IUNKNOWN
    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);

    // IPin Methods
    STDMETHODIMP Disconnect(void);

    // IPinFlowControl Methods
    STDMETHODIMP Block(DWORD dwBlockFlags, HANDLE hEvent);

    //  Set graph config info
    void SetConfigInfo(IGraphConfig *pGraphConfig, HANDLE hStopEvent);

    #ifdef DEBUG
    virtual HRESULT Deliver(IMediaSample *pSample);
    virtual HRESULT DeliverEndOfStream(void);
    virtual HRESULT DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
    #endif // DEBUG

    HRESULT DeliverBeginFlush(void);
    HRESULT DeliverEndFlush(void);

    HRESULT Inactive(void);
    HRESULT Active(void);
    virtual HRESULT CompleteConnect(IPin *pReceivePin);

    virtual HRESULT StartUsingOutputPin(void);
    virtual void StopUsingOutputPin(void);
    virtual bool StreamingThreadUsingOutputPin(void);

    HRESULT ChangeOutputFormat
        (
        const AM_MEDIA_TYPE *pmt,
        REFERENCE_TIME tSegmentStart,
        REFERENCE_TIME tSegmentStop,
        double dSegmentRate
        );
    HRESULT ChangeMediaType(const CMediaType *pmt);
    HRESULT DynamicReconnect(const CMediaType *pmt);

protected:
    HRESULT SynchronousBlockOutputPin(void);
    HRESULT AsynchronousBlockOutputPin(HANDLE hNotifyCallerPinBlockedEvent);
    HRESULT UnblockOutputPin(void);

    void BlockOutputPin(void);
    void ResetBlockState(void);

    static HRESULT WaitEvent(HANDLE hEvent);

    enum BLOCK_STATE
    {
        NOT_BLOCKED,
        PENDING,
        BLOCKED
    };

    // This lock should be held when the following class members are
    // being used: m_hNotifyCallerPinBlockedEvent, m_BlockState,
    // m_dwBlockCallerThreadID and m_dwNumOutstandingOutputPinUsers.
    CCritSec m_BlockStateLock;

    // This event should be signaled when the output pin is
    // not blocked.  This is a manual reset event.  For more
    // information on events, see the documentation for
    // CreateEvent() in the Windows SDK.
    HANDLE m_hUnblockOutputPinEvent;

    // This event will be signaled when block operation succeedes or
    // when the user cancels the block operation.  The block operation
    // can be canceled by calling IPinFlowControl2::Block( 0, NULL )
    // while the block operation is pending.
    HANDLE m_hNotifyCallerPinBlockedEvent;

    // The state of the current block operation.
    BLOCK_STATE m_BlockState;

    // The ID of the thread which last called IPinFlowControl::Block().
    // For more information on thread IDs, see the documentation for
    // GetCurrentThreadID() in the Windows SDK.
    DWORD m_dwBlockCallerThreadID;

    // The number of times StartUsingOutputPin() has been sucessfully
    // called and a corresponding call to StopUsingOutputPin() has not
    // been made.  When this variable is greater than 0, the streaming
    // thread is calling IPin::NewSegment(), IPin::EndOfStream(),
    // IMemInputPin::Receive() or IMemInputPin::ReceiveMultiple().  The
    // streaming thread could also be calling: DynamicReconnect(),
    // ChangeMediaType() or ChangeOutputFormat().  The output pin cannot
    // be blocked while the output pin is being used.
    DWORD m_dwNumOutstandingOutputPinUsers;

    // This event should be set when the IMediaFilter::Stop() is called.
    // This is a manual reset event.  It is also set when the output pin
    // delivers a flush to the connected input pin.
    HANDLE m_hStopEvent;
    IGraphConfig* m_pGraphConfig;

    // TRUE if the output pin's allocator's samples are read only.
    // Otherwise FALSE.  For more information, see the documentation
    // for IMemInputPin::NotifyAllocator().
    BOOL m_bPinUsesReadOnlyAllocator;

private:
    HRESULT Initialize(void);
    HRESULT ChangeMediaTypeHelper(const CMediaType *pmt);

    #ifdef DEBUG
    void AssertValid(void);
    #endif // DEBUG
};

class CAutoUsingOutputPin
{
public:
    CAutoUsingOutputPin( CDynamicOutputPin* pOutputPin, HRESULT* phr );
    ~CAutoUsingOutputPin();

private:
    CDynamicOutputPin* m_pOutputPin;
};

inline CAutoUsingOutputPin::CAutoUsingOutputPin( CDynamicOutputPin* pOutputPin, HRESULT* phr ) :
    m_pOutputPin(NULL)
{
    // The caller should always pass in valid pointers.
    ASSERT( NULL != pOutputPin );
    ASSERT( NULL != phr );

    // Make sure the user initialized phr.
    ASSERT( S_OK == *phr );

    HRESULT hr = pOutputPin->StartUsingOutputPin();
    if( FAILED( hr ) )
    {
        *phr = hr;
        return;
    }

    m_pOutputPin = pOutputPin;
}

inline CAutoUsingOutputPin::~CAutoUsingOutputPin()
{
    if( NULL != m_pOutputPin )
    {
        m_pOutputPin->StopUsingOutputPin();
    }
}

#ifdef DEBUG

inline HRESULT CDynamicOutputPin::Deliver(IMediaSample *pSample)
{
    // The caller should call StartUsingOutputPin() before calling this
    // method.
    ASSERT(StreamingThreadUsingOutputPin());

    return CBaseOutputPin::Deliver(pSample);
}

inline HRESULT CDynamicOutputPin::DeliverEndOfStream(void)
{
    // The caller should call StartUsingOutputPin() before calling this
    // method.
    ASSERT( StreamingThreadUsingOutputPin() );

    return CBaseOutputPin::DeliverEndOfStream();
}

inline HRESULT CDynamicOutputPin::DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{
    // The caller should call StartUsingOutputPin() before calling this
    // method.
    ASSERT(StreamingThreadUsingOutputPin());

    return CBaseOutputPin::DeliverNewSegment(tStart, tStop, dRate);
}

#endif // DEBUG

//=====================================================================
//=====================================================================
// Memory allocators
//
// the shared memory transport between pins requires the input pin
// to provide a memory allocator that can provide sample objects. A
// sample object supports the IMediaSample interface.
//
// CBaseAllocator handles the management of free and busy samples. It
// allocates CMediaSample objects. CBaseAllocator is an abstract class:
// in particular it has no method of initializing the list of free
// samples. CMemAllocator is derived from CBaseAllocator and initializes
// the list of samples using memory from the standard IMalloc interface.
//
// If you want your buffers to live in some special area of memory,
// derive your allocator object from CBaseAllocator. If you derive your
// IMemInputPin interface object from CBaseMemInputPin, you will get
// CMemAllocator-based allocation etc for free and will just need to
// supply the Receive handling, and media type / format negotiation.
//=====================================================================
//=====================================================================


//=====================================================================
//=====================================================================
// Defines CMediaSample
//
// an object of this class supports IMediaSample and represents a buffer
// for media data with some associated properties. Releasing it returns
// it to a freelist managed by a CBaseAllocator derived object.
//=====================================================================
//=====================================================================

class CMediaSample : public IMediaSample2    // The interface we support
{

protected:

    friend class CBaseAllocator;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆高清免费国产一区| 久久先锋影音av| 亚洲第一激情av| 欧美视频一区二区三区| 一区二区三区精品| 91官网在线免费观看| 亚洲成人先锋电影| 日韩欧美国产一区在线观看| 麻豆精品在线视频| 国产日韩欧美一区二区三区乱码 | 日韩一区二区免费视频| 秋霞国产午夜精品免费视频| 精品免费一区二区三区| 国产精品自产自拍| 国产精品传媒入口麻豆| 欧美日韩精品高清| 狠狠色狠狠色综合日日91app| 国产亚洲欧洲一区高清在线观看| 成人黄页在线观看| 亚洲第四色夜色| 久久久久久一级片| 成人ar影院免费观看视频| 国产成人在线视频网站| 中文字幕欧美区| 欧美性受xxxx| 国产美女久久久久| 亚洲精品日日夜夜| 日韩视频一区二区三区在线播放 | 国产亚洲精品bt天堂精选| 91丝袜国产在线播放| 午夜精品一区二区三区免费视频 | 国产在线一区二区综合免费视频| 中文字幕精品在线不卡| 欧美久久一二区| 国产精品88av| 亚洲第一二三四区| 国产精品不卡一区二区三区| 欧美高清你懂得| 成人精品视频一区二区三区| 日韩av一区二区三区四区| 国产精品视频线看| 日韩欧美精品在线视频| 色屁屁一区二区| 国产一区二区福利| 亚洲成年人影院| 中文字幕亚洲在| 久久嫩草精品久久久精品一| 欧美三级视频在线| 成人动漫精品一区二区| 蜜臀久久99精品久久久久宅男| 最新国产の精品合集bt伙计| 久久一区二区视频| 欧美精品一卡两卡| 91视视频在线直接观看在线看网页在线看 | 一区二区三区中文免费| 国产偷国产偷亚洲高清人白洁| 欧美老年两性高潮| 一本一道久久a久久精品| 国产成人亚洲综合色影视| 日韩av中文字幕一区二区| 亚洲最新视频在线观看| 亚洲天堂福利av| 亚洲国产高清aⅴ视频| 26uuu亚洲综合色| 日韩一区二区免费电影| 欧美精品v日韩精品v韩国精品v| 色欧美日韩亚洲| av午夜一区麻豆| 成人午夜视频免费看| 国产乱人伦精品一区二区在线观看| 日韩av电影免费观看高清完整版在线观看| 国产精品伦理在线| 久久久不卡影院| 久久久久97国产精华液好用吗| 精品日韩欧美一区二区| 日韩你懂的电影在线观看| 欧美一区二区高清| 欧美精品vⅰdeose4hd| 69精品人人人人| 欧美一区午夜精品| 日韩欧美高清dvd碟片| 欧美一区中文字幕| 日韩视频免费观看高清完整版在线观看| 欧美色区777第一页| 欧美日韩午夜在线| 91精品国产一区二区三区| 91精品国产综合久久香蕉的特点| 91精品国产91久久综合桃花| 56国语精品自产拍在线观看| 欧美一区二区三区四区五区 | 肉色丝袜一区二区| 日韩vs国产vs欧美| 久久国产福利国产秒拍| 韩日精品视频一区| 国产一区二区免费在线| 成人福利在线看| 色综合久久88色综合天天6 | av电影在线观看不卡| 色婷婷久久99综合精品jk白丝| 欧美午夜一区二区三区免费大片| 欧美日韩国产精品自在自线| 日韩欧美国产电影| 亚洲国产精品激情在线观看| 亚洲免费观看高清完整版在线 | 在线日韩一区二区| 欧美美女直播网站| 精品噜噜噜噜久久久久久久久试看 | 老司机精品视频一区二区三区| 精品一区二区三区免费视频| 成人黄色小视频在线观看| 色哟哟一区二区在线观看| 777奇米成人网| 日本一区二区在线不卡| 亚洲国产精品一区二区www在线 | 精品国产乱码久久| 亚洲三级在线免费| 青青草国产成人99久久| 不卡av电影在线播放| 在线电影一区二区三区| 国产喷白浆一区二区三区| 亚洲在线中文字幕| 国产一区二区三区蝌蚪| 91久久精品国产91性色tv| 精品国产一二三区| 一区二区在线观看不卡| 国产一本一道久久香蕉| 欧美中文字幕一区| 国产性天天综合网| 日韩精品一级中文字幕精品视频免费观看| 国产丶欧美丶日本不卡视频| 欧美日韩免费电影| 国产精品九色蝌蚪自拍| 日韩在线播放一区二区| 91视频在线看| 久久精品夜色噜噜亚洲a∨| 色综合久久久久| 精品久久久久久无| 亚洲国产婷婷综合在线精品| 不卡在线视频中文字幕| 欧美一级高清片在线观看| 亚洲专区一二三| 成人avav影音| 久久麻豆一区二区| 免费成人av资源网| 欧洲中文字幕精品| 国产精品狼人久久影院观看方式| 久久福利视频一区二区| 欧美剧情电影在线观看完整版免费励志电影 | 日韩欧美一区二区三区在线| 一二三四区精品视频| caoporn国产一区二区| 国产色婷婷亚洲99精品小说| 奇米精品一区二区三区在线观看 | 久久婷婷色综合| 日本不卡一区二区三区高清视频| 在线区一区二视频| 中文字幕一区二区三区在线不卡 | 国产三级一区二区三区| 精品一区二区三区不卡| 欧美一区二区私人影院日本| 午夜婷婷国产麻豆精品| 在线观看亚洲专区| 亚洲精品视频免费观看| 一本大道久久a久久精品综合| 日韩影视精彩在线| 欧美三级资源在线| 午夜精品一区二区三区免费视频 | 国产成人精品aa毛片| 久久奇米777| 国产毛片精品国产一区二区三区| 精品成a人在线观看| 国产综合成人久久大片91| 精品国产99国产精品| 国产在线播放一区三区四| 欧美成人aa大片| 国产一区中文字幕| 国产视频在线观看一区二区三区| 国产精品99久久久久久有的能看| 国产欧美视频一区二区| 成人精品电影在线观看| 亚洲欧美偷拍另类a∨色屁股| 91麻豆福利精品推荐| 亚洲国产一区二区三区| 91精品国产欧美一区二区成人| 日韩国产欧美一区二区三区| 欧美一区二区免费| 国产福利一区二区三区视频| 中文字幕av一区二区三区高| 91网站最新地址| 亚洲成在人线免费| 欧美xingq一区二区| 国产69精品久久99不卡| 亚洲天堂福利av| 欧美精品在线视频| 国产精品综合一区二区三区| 国产精品私房写真福利视频| 欧美亚洲另类激情小说| 美女脱光内衣内裤视频久久网站| 国产午夜精品福利| 欧美体内she精视频|