ksplugin.h

来自「完整的基于Conxant平台的USB电视棒的WIN驱动程序。」· C头文件 代码 · 共 59 行

H
59
字号
/*+++ *******************************************************************\ 
* 
*  Copyright and Disclaimer: 
*  
*     --------------------------------------------------------------- 
*     This software is provided "AS IS" without warranty of any kind, 
*     either expressed or implied, including but not limited to the 
*     implied warranties of noninfringement, merchantability and/or 
*     fitness for a particular purpose.
*     --------------------------------------------------------------- 
*   
*     Copyright (c) 2004 Conexant Systems, Inc. 
*     All rights reserved. 
*
\******************************************************************* ---*/ 

#ifndef __KSPLUGIN_H__
#define __KSPLUGIN_H__

#include "CopyProtection.h"
#include "Provider.h"

class CKsPlugin : public CUnknown, public IDistributorNotify
{
public:
    CKsPlugin(LPUNKNOWN p_unknown, HRESULT* p_hr);
    virtual ~CKsPlugin();

    static CUnknown* WINAPI CreateInstance(LPUNKNOWN p_unknown, HRESULT* p_hr);
    DECLARE_IUNKNOWN;

    /* CUnknown */
    HRESULT STDMETHODCALLTYPE NonDelegatingQueryInterface(REFIID riid, void** ppv);
    ULONG STDMETHODCALLTYPE NonDelegatingAddRef();
    ULONG STDMETHODCALLTYPE NonDelegatingRelease();

    /* IDistributorNotify */
    HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME start_time);
    HRESULT STDMETHODCALLTYPE Stop();
    HRESULT STDMETHODCALLTYPE NotifyGraphChange();
    HRESULT STDMETHODCALLTYPE Pause();
    HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock* p_clock);

private:
    HRESULT createThread();
    void exitThread();
    STDMETHODIMP threadFunction();
    static DWORD WINAPI threadFunctionWrapper(LPVOID p_param);

	ULONG				_ref_count;
    HANDLE              _thread_handle;
    HANDLE              _event_handle;
    IBaseFilter*        _p_base_filter;
    IUnknown*           _p_unknown;
    CCopyProtection*    _p_cp_notify;
};

#endif // __KSPLUGIN_H__

⌨️ 快捷键说明

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