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

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

?? amfilter.h

?? 用DirectX制作高級(jí)動(dòng)畫(huà)-[Advanced.Animation.with.DirectX]
?? H
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
//------------------------------------------------------------------------------
// File: AMFilter.h
//
// Desc: DirectShow base classes - efines class hierarchy for streams
//       architecture.
//
// Copyright (c) 1992-2002 Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------


#ifndef __FILTER__
#define __FILTER__

/* The following classes are declared in this header: */

class CBaseMediaFilter;     // IMediaFilter support
class CBaseFilter;          // IBaseFilter,IMediaFilter support
class CBasePin;             // Abstract base class for IPin interface
class CEnumPins;            // Enumerate input and output pins
class CEnumMediaTypes;      // Enumerate the pin's preferred formats
class CBaseOutputPin;       // Adds data provider member functions
class CBaseInputPin;        // Implements IMemInputPin interface
class CMediaSample;         // Basic transport unit for IMemInputPin
class CBaseAllocator;       // General list guff for most allocators
class CMemAllocator;        // Implements memory buffer allocation


//=====================================================================
//=====================================================================
//
// QueryFilterInfo and QueryPinInfo AddRef the interface pointers
// they return.  You can use the macro below to release the interface.
//
//=====================================================================
//=====================================================================

#define QueryFilterInfoReleaseGraph(fi) if ((fi).pGraph) (fi).pGraph->Release();

#define QueryPinInfoReleaseFilter(pi) if ((pi).pFilter) (pi).pFilter->Release();

//=====================================================================
//=====================================================================
// Defines CBaseMediaFilter
//
// Abstract base class implementing IMediaFilter.
//
// Typically you will derive your filter from CBaseFilter rather than
// this,  unless you are implementing an object such as a plug-in
// distributor that needs to support IMediaFilter but not IBaseFilter.
//
// Note that IMediaFilter is derived from IPersist to allow query of
// class id.
//=====================================================================
//=====================================================================

class AM_NOVTABLE CBaseMediaFilter : public CUnknown,
                                     public IMediaFilter
{

protected:

    FILTER_STATE    m_State;            // current state: running, paused
    IReferenceClock *m_pClock;          // this filter's reference clock
    // note: all filters in a filter graph use the same clock

    // offset from stream time to reference time
    CRefTime        m_tStart;

    CLSID	    m_clsid;            // This filters clsid
                                        // used for serialization
    CCritSec        *m_pLock;           // Object we use for locking

public:

    CBaseMediaFilter(
        const TCHAR     *pName,
        LPUNKNOWN pUnk,
        CCritSec  *pLock,
	REFCLSID   clsid);

    virtual ~CBaseMediaFilter();

    DECLARE_IUNKNOWN

    // override this to say what interfaces we support where
    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);

    //
    // --- IPersist method ---
    //

    STDMETHODIMP GetClassID(CLSID *pClsID);

    // --- IMediaFilter methods ---

    STDMETHODIMP GetState(DWORD dwMSecs, FILTER_STATE *State);

    STDMETHODIMP SetSyncSource(IReferenceClock *pClock);

    STDMETHODIMP GetSyncSource(IReferenceClock **pClock);

    // default implementation of Stop and Pause just record the
    // state. Override to activate or de-activate your filter.
    // Note that Run when called from Stopped state will call Pause
    // to ensure activation, so if you are a source or transform
    // you will probably not need to override Run.
    STDMETHODIMP Stop();
    STDMETHODIMP Pause();


    // the start parameter is the difference to be added to the
    // sample's stream time to get the reference time for
    // its presentation
    STDMETHODIMP Run(REFERENCE_TIME tStart);

    // --- helper methods ---

    // return the current stream time - ie find out what
    // stream time should be appearing now
    virtual HRESULT StreamTime(CRefTime& rtStream);

    // Is the filter currently active? (running or paused)
    BOOL IsActive() {
        CAutoLock cObjectLock(m_pLock);
        return ((m_State == State_Paused) || (m_State == State_Running));
    };
};

//=====================================================================
//=====================================================================
// Defines CBaseFilter
//
// An abstract class providing basic IBaseFilter support for pin
// enumeration and filter information reading.
//
// We cannot derive from CBaseMediaFilter since methods in IMediaFilter
// are also in IBaseFilter and would be ambiguous. Since much of the code
// assumes that they derive from a class that has m_State and other state
// directly available, we duplicate code from CBaseMediaFilter rather than
// having a member variable.
//
// Derive your filter from this, or from a derived object such as
// CTransformFilter.
//=====================================================================
//=====================================================================


class AM_NOVTABLE CBaseFilter : public CUnknown,        // Handles an IUnknown
                    public IBaseFilter,     // The Filter Interface
                    public IAMovieSetup     // For un/registration
{

friend class CBasePin;

protected:
    FILTER_STATE    m_State;            // current state: running, paused
    IReferenceClock *m_pClock;          // this graph's ref clock
    CRefTime        m_tStart;           // offset from stream time to reference time
    CLSID	    m_clsid;            // This filters clsid
                                        // used for serialization
    CCritSec        *m_pLock;           // Object we use for locking

    WCHAR           *m_pName;           // Full filter name
    IFilterGraph    *m_pGraph;          // Graph we belong to
    IMediaEventSink *m_pSink;           // Called with notify events
    LONG            m_PinVersion;       // Current pin version

public:

    CBaseFilter(
        const TCHAR *pName,     // Object description
        LPUNKNOWN pUnk,         // IUnknown of delegating object
        CCritSec  *pLock,       // Object who maintains lock
	REFCLSID   clsid);      // The clsid to be used to serialize this filter

    CBaseFilter(
        TCHAR     *pName,       // Object description
        LPUNKNOWN pUnk,         // IUnknown of delegating object
        CCritSec  *pLock,       // Object who maintains lock
	REFCLSID   clsid,       // The clsid to be used to serialize this filter
        HRESULT   *phr);        // General OLE return code
#ifdef UNICODE
    CBaseFilter(
        const CHAR *pName,     // Object description
        LPUNKNOWN pUnk,         // IUnknown of delegating object
        CCritSec  *pLock,       // Object who maintains lock
	REFCLSID   clsid);      // The clsid to be used to serialize this filter

    CBaseFilter(
        CHAR     *pName,       // Object description
        LPUNKNOWN pUnk,         // IUnknown of delegating object
        CCritSec  *pLock,       // Object who maintains lock
	REFCLSID   clsid,       // The clsid to be used to serialize this filter
        HRESULT   *phr);        // General OLE return code
#endif
    ~CBaseFilter();

    DECLARE_IUNKNOWN

    // override this to say what interfaces we support where
    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
#ifdef DEBUG
    STDMETHODIMP_(ULONG) NonDelegatingRelease();
#endif

    //
    // --- IPersist method ---
    //

    STDMETHODIMP GetClassID(CLSID *pClsID);

    // --- IMediaFilter methods ---

    STDMETHODIMP GetState(DWORD dwMSecs, FILTER_STATE *State);

    STDMETHODIMP SetSyncSource(IReferenceClock *pClock);

    STDMETHODIMP GetSyncSource(IReferenceClock **pClock);


    // override Stop and Pause so we can activate the pins.
    // Note that Run will call Pause first if activation needed.
    // Override these if you want to activate your filter rather than
    // your pins.
    STDMETHODIMP Stop();
    STDMETHODIMP Pause();

    // the start parameter is the difference to be added to the
    // sample's stream time to get the reference time for
    // its presentation
    STDMETHODIMP Run(REFERENCE_TIME tStart);

    // --- helper methods ---

    // return the current stream time - ie find out what
    // stream time should be appearing now
    virtual HRESULT StreamTime(CRefTime& rtStream);

    // Is the filter currently active?
    BOOL IsActive() {
        CAutoLock cObjectLock(m_pLock);
        return ((m_State == State_Paused) || (m_State == State_Running));
    };

    // Is this filter stopped (without locking)
    BOOL IsStopped() {
        return (m_State == State_Stopped);
    };

    //
    // --- IBaseFilter methods ---
    //

    // pin enumerator
    STDMETHODIMP EnumPins(
                    IEnumPins ** ppEnum);


    // default behaviour of FindPin assumes pin ids are their names
    STDMETHODIMP FindPin(
        LPCWSTR Id,
        IPin ** ppPin
    );

    STDMETHODIMP QueryFilterInfo(
                    FILTER_INFO * pInfo);

    STDMETHODIMP JoinFilterGraph(
                    IFilterGraph * pGraph,
                    LPCWSTR pName);

    // return a Vendor information string. Optional - may return E_NOTIMPL.
    // memory returned should be freed using CoTaskMemFree
    // default implementation returns E_NOTIMPL
    STDMETHODIMP QueryVendorInfo(
                    LPWSTR* pVendorInfo
            );

    // --- helper methods ---

    // send an event notification to the filter graph if we know about it.
    // returns S_OK if delivered, S_FALSE if the filter graph does not sink
    // events, or an error otherwise.
    HRESULT NotifyEvent(
        long EventCode,
        LONG_PTR EventParam1,
        LONG_PTR EventParam2);

    // return the filter graph we belong to
    IFilterGraph *GetFilterGraph() {
        return m_pGraph;
    }

    // Request reconnect
    // pPin is the pin to reconnect
    // pmt is the type to reconnect with - can be NULL
    // Calls ReconnectEx on the filter graph
    HRESULT ReconnectPin(IPin *pPin, AM_MEDIA_TYPE const *pmt);

    // find out the current pin version (used by enumerators)
    virtual LONG GetPinVersion();
    void IncrementPinVersion();

    // you need to supply these to access the pins from the enumerator
    // and for default Stop and Pause/Run activation.
    virtual int GetPinCount() PURE;
    virtual CBasePin *GetPin(int n) PURE;

    // --- IAMovieSetup methods ---

    STDMETHODIMP Register();    // ask filter to register itself
    STDMETHODIMP Unregister();  // and unregister itself

    // --- setup helper methods ---
    // (override to return filters setup data)

    virtual LPAMOVIESETUP_FILTER GetSetupData(){ return NULL; }

};


//=====================================================================
//=====================================================================
// Defines CBasePin
//
// Abstract class that supports the basics of IPin
//=====================================================================
//=====================================================================

class  AM_NOVTABLE CBasePin : public CUnknown, public IPin, public IQualityControl
{

protected:

    WCHAR *         m_pName;		        // This pin's name
    IPin            *m_Connected;               // Pin we have connected to
    PIN_DIRECTION   m_dir;                      // Direction of this pin
    CCritSec        *m_pLock;                   // Object we use for locking
    bool            m_bRunTimeError;            // Run time error generated
    bool            m_bCanReconnectWhenActive;  // OK to reconnect when active
    bool            m_bTryMyTypesFirst;         // When connecting enumerate
                                                // this pin's types first
    CBaseFilter    *m_pFilter;                  // Filter we were created by
    IQualityControl *m_pQSink;                  // Target for Quality messages
    LONG            m_TypeVersion;              // Holds current type version
    CMediaType      m_mt;                       // Media type of connection

    CRefTime        m_tStart;                   // time from NewSegment call
    CRefTime        m_tStop;                    // time from NewSegment
    double          m_dRate;                    // rate from NewSegment

#ifdef DEBUG
    LONG            m_cRef;                     // Ref count tracing
#endif

    // displays pin connection information

#ifdef DEBUG
    void DisplayPinInfo(IPin *pReceivePin);
    void DisplayTypeInfo(IPin *pPin, const CMediaType *pmt);
#else
    void DisplayPinInfo(IPin *pReceivePin) {};
    void DisplayTypeInfo(IPin *pPin, const CMediaType *pmt) {};
#endif

    // used to agree a media type for a pin connection

    // given a specific media type, attempt a connection (includes
    // checking that the type is acceptable to this pin)
    HRESULT
    AttemptConnection(
        IPin* pReceivePin,      // connect to this pin
        const CMediaType* pmt   // using this type
    );

    // try all the media types in this enumerator - for each that
    // we accept, try to connect using ReceiveConnection.
    HRESULT TryMediaTypes(
                        IPin *pReceivePin,      // connect to this pin
                        const CMediaType *pmt,        // proposed type from Connect
                        IEnumMediaTypes *pEnum);    // try this enumerator

    // establish a connection with a suitable mediatype. Needs to
    // propose a media type if the pmt pointer is null or partially
    // specified - use TryMediaTypes on both our and then the other pin's
    // enumerator until we find one that works.
    HRESULT AgreeMediaType(
                        IPin *pReceivePin,      // connect to this pin
                        const CMediaType *pmt);       // proposed type from Connect

public:

    CBasePin(
        TCHAR *pObjectName,         // Object description
        CBaseFilter *pFilter,       // Owning filter who knows about pins
        CCritSec *pLock,            // Object who implements the lock
        HRESULT *phr,               // General OLE return code

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品国产更新| 成人av电影观看| 亚洲国产精品久久久久秋霞影院 | 亚洲欧美色综合| 国产视频一区二区三区在线观看| 欧美xxx久久| 日韩午夜电影在线观看| 欧美一个色资源| 9191久久久久久久久久久| 欧美日韩国产小视频| 欧美年轻男男videosbes| 欧美美女视频在线观看| 欧美一区二区三区婷婷月色| 91精品国产综合久久婷婷香蕉 | 亚洲午夜在线电影| 亚洲一区在线电影| 天堂蜜桃91精品| 男女男精品视频网| 国产在线不卡一区| 大尺度一区二区| 色综合天天视频在线观看| 91美女片黄在线观看91美女| 91福利在线看| 在线91免费看| 欧美sm极限捆绑bd| 国产精品天美传媒沈樵| 日韩理论在线观看| 日韩专区在线视频| 国产原创一区二区| 91在线免费播放| 欧美日韩高清一区二区三区| 日韩一区二区三区视频在线观看| 久久亚洲精品国产精品紫薇| 国产精品女主播av| 亚洲成在人线免费| 九色综合国产一区二区三区| 丁香啪啪综合成人亚洲小说| 日本久久精品电影| 日韩三区在线观看| 中文字幕av不卡| 亚洲成人1区2区| 韩国精品一区二区| 色吧成人激情小说| 精品国偷自产国产一区| 中文字幕一区视频| 免费久久精品视频| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美日韩国产综合一区二区三区| 久久综合国产精品| 亚洲制服丝袜av| 国产乱色国产精品免费视频| 日本精品一级二级| 久久婷婷国产综合精品青草| 伊人色综合久久天天| 国内外成人在线视频| 欧美亚日韩国产aⅴ精品中极品| 日韩女优毛片在线| 亚洲精品高清在线| 国产一区二区三区在线观看精品| 一本大道久久a久久综合| 欧美精品一区二区三| 亚洲精品国产无套在线观| 精品系列免费在线观看| 91官网在线观看| 国产精品色在线观看| 美女免费视频一区| 91国偷自产一区二区三区观看| 26uuu久久天堂性欧美| 亚洲一区欧美一区| 成人高清av在线| 日韩欧美亚洲国产另类| 亚洲综合一区二区精品导航| 懂色av一区二区三区免费看| 911精品国产一区二区在线| 综合分类小说区另类春色亚洲小说欧美 | 欧美亚洲高清一区| 国产精品欧美极品| 国产精一区二区三区| 91精品国产一区二区三区| 亚洲精品伦理在线| av激情成人网| 国产午夜亚洲精品理论片色戒 | 99久久国产免费看| 久久久久国产成人精品亚洲午夜| 日韩影视精彩在线| 欧美影院一区二区| 亚洲精品高清在线| 成人国产精品免费网站| 国产午夜精品久久久久久久 | 在线观看亚洲a| 国产精品短视频| 高清不卡一区二区| 久久精品人人做人人爽人人| 青青草国产精品97视觉盛宴| 欧美日韩久久不卡| 亚洲国产成人91porn| 日本韩国精品在线| 亚洲综合一区二区三区| 99精品国产91久久久久久| 国产精品久久国产精麻豆99网站| 国产在线不卡一区| 亚洲国产成人av网| 欧美在线看片a免费观看| 亚洲欧美激情在线| 91网址在线看| 亚洲免费色视频| 91福利在线看| 亚洲成人综合在线| 欧美日韩小视频| 天堂在线亚洲视频| 91精品国产入口在线| 日韩—二三区免费观看av| 欧美一区二区三区四区五区| 三级精品在线观看| 日韩免费一区二区| 国产在线视频不卡二| 久久久三级国产网站| 福利电影一区二区| 成人免费在线观看入口| 色噜噜狠狠色综合欧洲selulu| 一区二区三区四区亚洲| 欧美日韩精品欧美日韩精品 | 成人国产亚洲欧美成人综合网| 中文字幕不卡在线播放| 成人av网址在线| 亚洲一区二区四区蜜桃| 欧美色精品在线视频| 日本欧美韩国一区三区| 久久影院午夜论| 成人av午夜影院| 亚洲一区精品在线| 日韩免费视频线观看| 国产成人精品亚洲777人妖| 亚洲天堂精品在线观看| 欧美日韩视频在线观看一区二区三区 | 欧美日韩国产高清一区二区三区| 亚洲v日本v欧美v久久精品| 欧美一区二区日韩一区二区| 国产一区二区三区综合| 亚洲三级在线观看| 欧美乱妇15p| 国产不卡在线视频| 亚洲一区二区三区视频在线| 日韩精品专区在线影院重磅| 国产成人免费9x9x人网站视频| 亚洲人成7777| 日韩久久精品一区| 91丝袜美女网| 美女视频黄免费的久久 | 日本在线观看不卡视频| 久久亚洲一级片| 色婷婷激情综合| 九九国产精品视频| 亚洲美女精品一区| 日韩精品一区二区三区在线| 91香蕉视频污在线| 美女高潮久久久| 亚洲欧美区自拍先锋| 欧美大片在线观看一区二区| 99视频有精品| 久草在线在线精品观看| 一区二区三区四区精品在线视频| 日韩精品一区二区三区蜜臀| 92精品国产成人观看免费| 激情综合色播激情啊| 亚洲综合网站在线观看| 欧美激情一区不卡| 欧美一区在线视频| 91免费观看在线| 国产精品中文欧美| 日韩精品亚洲专区| 亚洲欧洲综合另类| 欧美国产日韩a欧美在线观看| 777亚洲妇女| 91福利社在线观看| 成人av在线播放网站| 精品亚洲成a人| 日韩精品一二区| 亚洲一级片在线观看| 国产精品午夜春色av| 久久影音资源网| 日韩欧美电影一区| 欧美日韩三级在线| 91视频com| 成人高清在线视频| 国产精品一区二区x88av| 蜜臀精品久久久久久蜜臀| 亚洲一区影音先锋| 一区二区三区高清| 亚洲色图欧美在线| 国产精品欧美一级免费| 久久久久久久久久久黄色| 欧美成人艳星乳罩| 91精品国产91综合久久蜜臀| 欧美综合久久久| 色av成人天堂桃色av| 99久久99久久久精品齐齐| 成人污污视频在线观看| 国产99久久久国产精品潘金| 奇米综合一区二区三区精品视频 |