You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 01/12/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgDirectShowCaptureGraph.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgDirectShowCaptureGraph.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__DIRECT__SHOW__CAPTURE__GRAPH__H__INCLUDED__
|
|
#define __LG__DIRECT__SHOW__CAPTURE__GRAPH__H__INCLUDED__
|
|
|
|
#include "DirectShowStreamVideo.h"
|
|
|
|
#define REGISTER_FILTERGRAPH
|
|
|
|
class CLgDirectShowCaptureGraph
|
|
{
|
|
public:
|
|
CLgDirectShowCaptureGraph();
|
|
virtual ~CLgDirectShowCaptureGraph();
|
|
|
|
public:
|
|
BOOL Create();
|
|
void Destroy();
|
|
CDirectShowStreamVideo *CreateStream( LPWSTR pDisplayName );
|
|
BOOL CreateStreamAll();
|
|
|
|
public:
|
|
BOOL SelectBestResolution( IBaseFilter *pFilter );
|
|
|
|
public:
|
|
BOOL Stop();
|
|
BOOL Start();
|
|
INT GetDirectShowStreamCount();
|
|
CDirectShowStreamVideo *GetDirectShowStream( INT nStream );
|
|
|
|
private:
|
|
typedef struct VIDEO_STREAM_INFO
|
|
{
|
|
CDirectShowStreamVideo* pStream;
|
|
WCHAR pDisplayName[MAX_PATH];
|
|
}VIDEO_STREAM_INFO, *PVIDEO_STREAM_INFO;
|
|
CLgArray<VIDEO_STREAM_INFO> m_StreamArray;
|
|
|
|
private:
|
|
ICaptureGraphBuilder2 *m_pCaptureGraphBuilder;
|
|
IGraphBuilder *m_pGraphBuilder;
|
|
IMediaControl *m_pMediaControl;
|
|
|
|
#ifdef REGISTER_FILTERGRAPH
|
|
private:
|
|
static HRESULT AddGraphToRot( IUnknown *pUnkGraph, DWORD *pdwRegister );
|
|
static void RemoveGraphFromRot( DWORD pdwRegister );
|
|
private:
|
|
DWORD m_dwGraphRegister;
|
|
#endif
|
|
};
|
|
|
|
#endif
|