📄 y8filter.h
字号:
/*+++ *******************************************************************\
*
* 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) 2008 Conexant Systems, Inc.
* All rights reserved.
*
\******************************************************************* ---*/
#ifndef Y8FILTER_H
#define Y8FILTER_H
// Class supporting the Y8Convert input pin
#define NUM_PINS 2
#define OUTPUT_PIN_INDEX 0
#define INPUT_PIN_INDEX 1
class CY8Filter : public CBaseFilter
{
public:
public:
CCritSec* getCriticalSection(){return &_critical_section;}
static CUnknown * WINAPI CreateInstance(LPUNKNOWN lpunk, HRESULT *phr);
CY8Filter(LPUNKNOWN lpunk, HRESULT *phr);
~CY8Filter();
DECLARE_IUNKNOWN;
DWORD getWidth(){return _video_header.bmiHeader.biWidth;}
DWORD getHeight(){return _video_header.bmiHeader.biHeight;}
VIDEOINFOHEADER* getVideoInfoHeader(){return &_video_header;}
VOID setInputFormat(VIDEOINFOHEADER* p_format);
int GetPinCount();
CBasePin * GetPin(int n);
STDMETHODIMP Stop();
STDMETHODIMP Pause();
STDMETHODIMP Run(REFERENCE_TIME tStart);
STDMETHODIMP QueryFilterInfo(FILTER_INFO * pInfo);
public:
void convertBuffer(
PBYTE p_input_buffer,
PBYTE p_output_buffer,
DWORD input_buffer_size,
DWORD output_buffer_size,
CMediaType* pmt);
CMediaType* m_pOutputMediaType;
private:
CBasePin* _pins[NUM_PINS];
CCritSec _critical_section;
VIDEOINFOHEADER _video_header;
};
#endif //Y8FILTER_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -