Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd0af32a1f | ||
|
|
74b5a32679 | ||
|
|
77eb4db494 | ||
|
|
221b560aa4 | ||
|
|
2b04b5b90c | ||
|
|
e229b7df3a |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,5 +7,6 @@ PTZControl/PTZControl.vcxproj.filters
|
||||
PTZControl/PTZControl.vcxproj.user
|
||||
PTZControl/PTZControlDEU.docx
|
||||
PTZControl/PTZControl.exe
|
||||
PTZControl/PTZControl.aps
|
||||
*.docx
|
||||
*.bak
|
||||
|
||||
Binary file not shown.
@@ -27,7 +27,9 @@
|
||||
#define REG_NORESET _T("NoReset")
|
||||
#define REG_NOGUARD _T("NoGuard")
|
||||
|
||||
#define DEFAULT_DEVICE_NAME_1 _T("PTZ Pro 2")
|
||||
// Allow the cameras with the following tags in the device name.
|
||||
// This will match all Logitech PRT Pro, PTZ Pro 2 and Rally camers.
|
||||
#define DEFAULT_DEVICE_NAME_1 _T("PTZ Pro")
|
||||
#define DEFAULT_DEVICE_NAME_2 _T("Logi Rally")
|
||||
|
||||
#define TIMER_FOCUS_CHECK 4711
|
||||
|
||||
Binary file not shown.
@@ -495,6 +495,9 @@ CStringArray aStrCameraNameToSearch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// save the camera names.
|
||||
m_strCameraDeviceNames = strCameras;
|
||||
|
||||
// On SHIFT and CTRL key down we show all found camera device names.
|
||||
if (theApp.m_bShowDevices || (::GetAsyncKeyState(VK_SHIFT) & 0x8000) && (::GetAsyncKeyState(VK_CONTROL) & 0x8000))
|
||||
@@ -789,7 +792,8 @@ void CPTZControlDlg::OnBtUnpushed()
|
||||
void CPTZControlDlg::OnBtSettings()
|
||||
{
|
||||
CSettingsDlg dlg;
|
||||
dlg.m_strCameraName = m_strCameraDeviceName;
|
||||
dlg.m_strCameraName = m_strCameraDeviceNames;
|
||||
dlg.m_strCameraName.Replace(_T("\r\n"), _T(", "));
|
||||
dlg.m_bLogitechCameraControl = GetCurrentWebCam().UseLogitechMotionControl();
|
||||
dlg.m_iMotorIntervalTimer = GetCurrentWebCam().GetMotorIntervalTimer();
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ protected:
|
||||
CString m_strTooltips[NUM_MAX_WEBCAMS][CWebcamController::NUM_PRESETS];
|
||||
|
||||
HACCEL m_hAccel;
|
||||
CString m_strCameraDeviceName;
|
||||
CString m_strCameraDeviceNames;
|
||||
int m_iCurrentWebCam; // zero based index to m_aWebCams
|
||||
int m_iNumWebCams;
|
||||
|
||||
|
||||
@@ -16,42 +16,42 @@
|
||||
#define IDC_CHECK1 1001
|
||||
#define IDC_CH_LOGITECHCONTROL 1001
|
||||
#define IDC_BT_UP 1002
|
||||
#define IDC_ED_TOOLTIP_1_1 1002
|
||||
#define IDC_ED_TOOLTIP_1_1 1002
|
||||
#define IDC_BT_DOWN 1003
|
||||
#define IDC_ED_TOOLTIP_1_2 1003
|
||||
#define IDC_ED_TOOLTIP_1_2 1003
|
||||
#define IDC_BT_HOME 1004
|
||||
#define IDC_ED_TOOLTIP_1_3 1004
|
||||
#define IDC_ED_TOOLTIP_1_3 1004
|
||||
#define IDC_BT_MEMORY 1005
|
||||
#define IDC_ED_TOOLTIP_1_4 1005
|
||||
#define IDC_ED_TOOLTIP_1_4 1005
|
||||
#define IDC_BT_PRESET1 1006
|
||||
#define IDC_ED_TOOLTIP_1_5 1006
|
||||
#define IDC_ED_TOOLTIP_1_5 1006
|
||||
#define IDC_BT_PRESET2 1007
|
||||
#define IDC_ED_TOOLTIP_1_6 1007
|
||||
#define IDC_ED_TOOLTIP_1_6 1007
|
||||
#define IDC_BT_PRESET3 1008
|
||||
#define IDC_ED_TOOLTIP_1_7 1008
|
||||
#define IDC_ED_TOOLTIP_1_7 1008
|
||||
#define IDC_BT_PRESET4 1009
|
||||
#define IDC_ED_TOOLTIP_1_8 1009
|
||||
#define IDC_ED_TOOLTIP_1_8 1009
|
||||
#define IDC_BT_PRESET5 1010
|
||||
#define IDC_ED_CAMERA 1010
|
||||
#define IDC_BT_PRESET6 1011
|
||||
#define IDC_EDIT1 1011
|
||||
#define IDC_ED_MOTORTIME 1011
|
||||
#define IDC_BT_PRESET7 1012
|
||||
#define IDC_ED_TOOLTIP_2_1 1012
|
||||
#define IDC_ED_TOOLTIP_2_1 1012
|
||||
#define IDC_BT_PRESET8 1013
|
||||
#define IDC_ED_TOOLTIP_2_2 1013
|
||||
#define IDC_BT_ZOOM_IN 1014
|
||||
#define IDC_ED_TOOLTIP_2_3 1014
|
||||
#define IDC_ED_TOOLTIP_2_3 1014
|
||||
#define IDC_BT_ZOOM_OUT 1015
|
||||
#define IDC_ED_TOOLTIP_2_4 1015
|
||||
#define IDC_ED_TOOLTIP_2_4 1015
|
||||
#define IDC_BT_EXIT 1016
|
||||
#define IDC_ED_TOOLTIP_2_5 1016
|
||||
#define IDC_ED_TOOLTIP_2_5 1016
|
||||
#define IDC_BT_SETTINGS 1017
|
||||
#define IDC_ED_TOOLTIP_2_6 1017
|
||||
#define IDC_ED_TOOLTIP_2_6 1017
|
||||
#define IDC_BT_WEBCAM1 1018
|
||||
#define IDC_ED_TOOLTIP_2_7 1018
|
||||
#define IDC_ED_TOOLTIP_2_7 1018
|
||||
#define IDC_BT_WEBCAM2 1019
|
||||
#define IDC_ED_TOOLTIP_2_8 1019
|
||||
#define IDC_ED_TOOLTIP_2_8 1019
|
||||
#define DC_BT_SETTINGS 32791
|
||||
|
||||
// Next default values for new objects
|
||||
@@ -59,7 +59,7 @@
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||
#define _APS_NEXT_COMMAND_VALUE 32793
|
||||
#define _APS_NEXT_COMMAND_VALUE 32799
|
||||
#define _APS_NEXT_CONTROL_VALUE 1012
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
||||
25
README.md
25
README.md
@@ -2,9 +2,16 @@
|
||||
|
||||
## History
|
||||
This small program is designed to control a Logitech PTZ 2 Pro. The camera was purchased to stream our church services.
|
||||
Unfortunately, it quickly turned out that the operation with the remote control is possible but cumbersome and inaccurate, since the camera was installed directly behind and above the video technician. So I made the decision to build a corresponding control program.
|
||||
Some month later we bought a second camera and the program was extended by the function to control another camera. A maximum of two cameras are supported.
|
||||
And finally I added support for the Logitech Rally.
|
||||
Unfortunately, it quickly turned out that the operation with the remote control is possible but cumbersome and inaccurate. The camera was installed directly behind and above the video technician and always pointing back with the remote control was not comfortable.
|
||||
The control Logitech software shipped with the camera is completely worthless.
|
||||
So, I made the decision to build a corresponding control program.
|
||||
Some months later we bought a second camera, and the program was extended by the function to control another camera. A maximum of two cameras are supported.
|
||||
And finally, I added support for the Logitech Rally.
|
||||
|
||||
### Where is the basic code from?
|
||||
It wasn't easy to get code that shows how to control a PTZ camera.
|
||||
Finally I contacted Lgoitech and I received download link to the `Logitech Collaboration Software Reference Kit` (Logitech CSRK)
|
||||
I found some Lync remote control code in it, that gave me some hints and the guids and usage for the Logitect camera interface.
|
||||
|
||||
## Used interfaces
|
||||
The program directly uses the camera media control via the Windows SDK (see links in the source code).
|
||||
@@ -61,6 +68,18 @@ If you click on a direction button once, the motor is turned on and off again af
|
||||
If the direction button remains pressed, the motor remains switched on for the corresponding direction until the button is released again.
|
||||
This control seems more effective and accurate to me and is the standard. The disadvantage is that if the timer interval is too small, the camera does not react immediately when a button is clicked. But since precision was more important to me because our camera is installed relatively far away from the podium, I use this setting with a 70msec timer.
|
||||
|
||||
## Hotkeys
|
||||
The program has serveral hotkeys that allows a control without the mouse when it has the focus.
|
||||
- Pan-Tilt control with Left, Right, Up, Down keys.
|
||||
- Home position with Num-0, Home keys.
|
||||
- Memory function with the M-key.
|
||||
- Recall stored position with the numeric keys 1-8 or the numeric key pad keys Num-1 to Num-8.#
|
||||
- Open the setings dialog with Num-Divide or Num-Multiply
|
||||
- Zoom in/out Page-Up/Down, Num+Plus, Num-Minus
|
||||
- Select Camera 1. Alt+1, Alt+Num-1, Alt+Page-Up
|
||||
- Select Camera 2. Alt+2, Alt+Num-2, Alt+Page-Down
|
||||
|
||||
|
||||
## Command Line Options
|
||||
A few options can be set from the command line. Command-line switches override the settings in the registry.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user