forked from micsthepick/cfg-cam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
camset.h
45 lines (37 loc) · 1.49 KB
/
camset.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef CAMSET_H
#define CAMSET_H
#define VideoProcAmp_PowerlineFrequency (13)
#define CameraControl_AutoExposurePriority (19)
#include <string>
#include <dshow.h>
#include <vector>
#include <stdint.h>
#include <iostream>
#include <fstream>
#include <exception>
using namespace std;
extern bool ignoreFriendlyName;
enum {
GET_SETT = 1, //get settings
SET_SETT = 2, //set settings
DIS_SETT = 4, //display settings
DIS_INFO = 8 //display info
};
void ListMyDevicesInfo(); //list of video device info
void MyDevicesSettings(int gsd); //device settings manipulation
void DisplayDeviceInformation(IEnumMoniker *pEnum); //display properties of found devices
void DisplayDeviceSettings(); //from RAM
void SetDeviceSettings(IEnumMoniker *pEnum); //set settings to devices
void GetDeviceSettings(IEnumMoniker *pEnum); //get settings from devices
HRESULT EnumerateDevices(REFGUID category, IEnumMoniker **ppEnum); //Enumerate devices of given category to get devices monikers
string ConvertBSTRToMBS(BSTR bstr); //general variant string to standard string conversion
string ConvertWCSToMBS(const wchar_t* pstr, long wslen); //intermediate string conversion
class CamSetAll {
public:
CamSetAll();
~CamSetAll();
void loadSett(string cfgfilename); //load settings from .cfg file
void saveSett(string cfgfilename); //save current settings to .cfg file
void displayFoundDevices(); //list all available video capture devices
};
#endif // CAMSET_H