00001
#ifndef VIDEOCOLLECTOR_HPP
00002
#define VIDEOCOLLECTOR_HPP
00003
00004
#ifdef HAVE_CONFIG_H
00005
#include <config.h>
00006
#endif
00007
00008
#include <qmap.h>
00009
#include <qlist.h>
00010
00011
#ifdef _OS_WIN32_
00012
#include <windows.h>
00013
#include <vfw.h>
00014
class CVideoDeviceWin32;
00015
#endif
00016
00017
#include "VideoDevice.h"
00018
00019 class CVideoCollector
00020 {
00021
private:
00022
static CVideoCollector *s_pVideoCollector;
00023 QList<CVideoDevice> m_Devices;
00024
00025
CVideoCollector();
00026
void Scan();
00027
00028
public:
00029
static CVideoCollector *
Instance();
00030
00031 uint
NumberOfVideoDevices()
const;
00032
CVideoDevice *
GetVideoDevice(uint n);
00033
00034
#ifdef _OS_WIN32_
00035
00036
00037
00038
00039
00040
00041
00042
static QMap<HWND, CVideoDeviceWin32 *>s_HWND2Video;
00043
00044
void RegisterDevice(HWND,
CVideoDeviceWin32 *);
00045
void UnregisterDevice(HWND);
00046
00047
00048
static LRESULT CALLBACK ControlCallback(HWND,
int);
00049
static LRESULT CALLBACK ErrorCallback(HWND,
int, LPTSTR);
00050
static LRESULT CALLBACK StatusCallback(HWND,
int, LPTSTR);
00051
static LRESULT CALLBACK VideoCallback(HWND, LPVIDEOHDR);
00052
static LRESULT CALLBACK YieldCallback(HWND);
00053
#endif
00054
};
00055
00056
#endif