#include <webcam.h>
Definition at line 101 of file webcam.h.
Public Member Functions | |
| Webcam (QWidget *parent=0, QWidget *localVideoWidget=0) | |
| virtual | ~Webcam (void) |
| virtual void | run () |
| bool | camOpen (QString WebcamName, int width, int height) |
| void | camClose (void) |
| bool | SetPalette (unsigned int palette) |
| unsigned int | GetPalette (void) |
| int | SetBrightness (int v) |
| int | SetContrast (int v) |
| int | SetColour (int v) |
| int | SetHue (int v) |
| int | GetBrightness (void) |
| int | GetColour (void) |
| int | GetContrast (void) |
| int | GetHue (void) |
| QString | GetName (void) |
| HWND | GetHwnd () |
| void | SetFlip (bool b) |
| int | SetTargetFps (wcClient *client, int fps) |
| int | GetActualFps () |
| void | GetMaxSize (int *x, int *y) |
| void | GetMinSize (int *x, int *y) |
| void | GetCurSize (int *x, int *y) |
| int | isGreyscale (void) |
| wcClient * | RegisterClient (int format, int fps, QObject *eventWin) |
| void | UnregisterClient (wcClient *client) |
| void | ChangeClientFps (wcClient *client, int fps) |
| unsigned char * | GetVideoFrame (wcClient *client) |
| void | FreeVideoBuffer (wcClient *client, unsigned char *buffer) |
| void | ProcessFrame (unsigned char *frame, int fSize) |
Static Public Member Functions | |
| static QString | devName (QString WebcamName) |
Private Member Functions | |
| void | StartThread () |
| void | KillThread () |
| void | WebcamThreadWorker () |
| void | SetSize (int width, int height) |
| void | readCaps (void) |
Static Private Member Functions | |
| static LRESULT CALLBACK | frameReadyCallbackProc (HWND hWnd, LPVIDEOHDR lpVHdr) |
| static LRESULT CALLBACK | ErrorCallbackProc (HWND hWnd, int nErrID, LPSTR lpErrorText) |
| static LRESULT CALLBACK | StatusCallbackProc (HWND hWnd, int nID, LPSTR lpStatusText) |
Private Attributes | |
| HWND | hwndCap |
| HWND | hwndWebcam |
| QPtrList< wcClient > | wcClientList |
| QMutex | WebcamLock |
| int | hDev |
| QString | DevName |
| unsigned char * | picbuff1 |
| int | imageLen |
| int | frameSize |
| int | fps |
| int | actualFps |
| bool | killWebcamThread |
| int | wcFormat |
| bool | wcFlip |
| QTime | cameraTime |
| int | frameCount |
| int | totalCaptureMs |
| CAPTUREPARMS | capParams |
| BITMAPINFO | bitmapInfo |
| struct video_capability | vCaps |
| struct video_window | vWin |
| struct video_picture | vPic |
| struct video_clip | vClips |
| Webcam::Webcam | ( | QWidget * | parent = 0, |
|
| QWidget * | localVideoWidget = 0 | |||
| ) |
Definition at line 39 of file webcam.cpp.
| Webcam::~Webcam | ( | void | ) | [virtual] |
Definition at line 742 of file webcam.cpp.
| void Webcam::run | ( | void | ) | [virtual] |
Definition at line 628 of file webcam.cpp.
| QString Webcam::devName | ( | QString | WebcamName | ) | [static] |
Definition at line 86 of file webcam.cpp.
| bool Webcam::camOpen | ( | QString | WebcamName, | |
| int | width, | |||
| int | height | |||
| ) |
Definition at line 103 of file webcam.cpp.
Referenced by PhoneUIBox::PhoneUIBox(), and WebcamSettingsBox::WebcamSettingsBox().
| void Webcam::camClose | ( | void | ) |
Definition at line 201 of file webcam.cpp.
Referenced by camOpen(), PhoneUIBox::~PhoneUIBox(), and ~Webcam().
| bool Webcam::SetPalette | ( | unsigned int | palette | ) |
Definition at line 295 of file webcam.cpp.
Referenced by camOpen(), WebcamSettingsBox::checkPaletteModes(), and WebcamSettingsBox::WebcamSettingsBox().
| unsigned int Webcam::GetPalette | ( | void | ) |
Definition at line 339 of file webcam.cpp.
Referenced by camOpen(), WebcamSettingsBox::SettingDisplayTimerExpiry(), and WebcamSettingsBox::WebcamSettingsBox().
| int Webcam::SetBrightness | ( | int | v | ) |
Definition at line 364 of file webcam.cpp.
Referenced by WebcamSettingsBox::brightnessDown(), WebcamSettingsBox::brightnessUp(), and PhoneUIBox::changeVolume().
| int Webcam::SetContrast | ( | int | v | ) |
Definition at line 383 of file webcam.cpp.
Referenced by PhoneUIBox::changeVolume(), WebcamSettingsBox::contrastDown(), and WebcamSettingsBox::contrastUp().
| int Webcam::SetColour | ( | int | v | ) |
Definition at line 403 of file webcam.cpp.
Referenced by PhoneUIBox::changeVolume(), WebcamSettingsBox::colourDown(), and WebcamSettingsBox::colourUp().
| int Webcam::SetHue | ( | int | v | ) |
Definition at line 423 of file webcam.cpp.
Referenced by WebcamSettingsBox::hueDown(), and WebcamSettingsBox::hueUp().
| int Webcam::GetBrightness | ( | void | ) | [inline] |
Definition at line 120 of file webcam.h.
Referenced by PhoneUIBox::PhoneUIBox(), and WebcamSettingsBox::SettingDisplayTimerExpiry().
| int Webcam::GetColour | ( | void | ) | [inline] |
Definition at line 121 of file webcam.h.
Referenced by PhoneUIBox::PhoneUIBox(), and WebcamSettingsBox::SettingDisplayTimerExpiry().
| int Webcam::GetContrast | ( | void | ) | [inline] |
Definition at line 122 of file webcam.h.
Referenced by PhoneUIBox::PhoneUIBox(), and WebcamSettingsBox::SettingDisplayTimerExpiry().
| int Webcam::GetHue | ( | void | ) | [inline] |
Definition at line 123 of file webcam.h.
Referenced by WebcamSettingsBox::SettingDisplayTimerExpiry().
| QString Webcam::GetName | ( | void | ) | [inline] |
Definition at line 124 of file webcam.h.
Referenced by WebcamSettingsBox::SettingDisplayTimerExpiry().
| int Webcam::SetTargetFps | ( | wcClient * | client, | |
| int | fps | |||
| ) |
Definition at line 445 of file webcam.cpp.
Referenced by WebcamSettingsBox::fpsDown(), WebcamSettingsBox::fpsUp(), and WebcamSettingsBox::WebcamSettingsBox().
| int Webcam::GetActualFps | ( | ) |
Definition at line 461 of file webcam.cpp.
Referenced by WebcamSettingsBox::SettingDisplayTimerExpiry().
| void Webcam::GetMaxSize | ( | int * | x, | |
| int * | y | |||
| ) |
Definition at line 466 of file webcam.cpp.
Referenced by WebcamSettingsBox::SettingDisplayTimerExpiry().
| void Webcam::GetMinSize | ( | int * | x, | |
| int * | y | |||
| ) |
Definition at line 475 of file webcam.cpp.
Referenced by WebcamSettingsBox::SettingDisplayTimerExpiry().
| void Webcam::GetCurSize | ( | int * | x, | |
| int * | y | |||
| ) |
Definition at line 484 of file webcam.cpp.
Referenced by camOpen(), PhoneUIBox::PhoneUIBox(), and WebcamSettingsBox::SettingDisplayTimerExpiry().
| int Webcam::isGreyscale | ( | void | ) |
Definition at line 490 of file webcam.cpp.
Referenced by camOpen(), and WebcamSettingsBox::SettingDisplayTimerExpiry().
| wcClient * Webcam::RegisterClient | ( | int | format, | |
| int | fps, | |||
| QObject * | eventWin | |||
| ) |
Definition at line 501 of file webcam.cpp.
Referenced by PhoneUIBox::PhoneUIBox(), and PhoneUIBox::StartVideo().
| void Webcam::UnregisterClient | ( | wcClient * | client | ) |
Definition at line 559 of file webcam.cpp.
Referenced by PhoneUIBox::StopVideo(), and PhoneUIBox::~PhoneUIBox().
| void Webcam::ChangeClientFps | ( | wcClient * | client, | |
| int | fps | |||
| ) |
| unsigned char * Webcam::GetVideoFrame | ( | wcClient * | client | ) |
Definition at line 586 of file webcam.cpp.
Referenced by PhoneUIBox::DrawLocalWebcamImage(), and PhoneUIBox::TransmitLocalWebcamImage().
| void Webcam::FreeVideoBuffer | ( | wcClient * | client, | |
| unsigned char * | buffer | |||
| ) |
Definition at line 596 of file webcam.cpp.
Referenced by PhoneUIBox::DrawLocalWebcamImage(), and PhoneUIBox::TransmitLocalWebcamImage().
| void Webcam::ProcessFrame | ( | unsigned char * | frame, | |
| int | fSize | |||
| ) |
Definition at line 653 of file webcam.cpp.
Referenced by frameReadyCallbackProc(), and WebcamThreadWorker().
| void Webcam::StartThread | ( | ) | [private] |
| void Webcam::KillThread | ( | ) | [private] |
| void Webcam::WebcamThreadWorker | ( | ) | [private] |
| LRESULT CALLBACK Webcam::frameReadyCallbackProc | ( | HWND | hWnd, | |
| LPVIDEOHDR | lpVHdr | |||
| ) | [static, private] |
| LRESULT CALLBACK Webcam::ErrorCallbackProc | ( | HWND | hWnd, | |
| int | nErrID, | |||
| LPSTR | lpErrorText | |||
| ) | [static, private] |
| LRESULT CALLBACK Webcam::StatusCallbackProc | ( | HWND | hWnd, | |
| int | nID, | |||
| LPSTR | lpStatusText | |||
| ) | [static, private] |
| void Webcam::SetSize | ( | int | width, | |
| int | height | |||
| ) | [private] |
| void Webcam::readCaps | ( | void | ) | [private] |
Definition at line 259 of file webcam.cpp.
Referenced by camOpen(), SetBrightness(), SetColour(), SetContrast(), SetHue(), SetPalette(), and SetSize().
HWND Webcam::hwndCap [private] |
Definition at line 152 of file webcam.h.
Referenced by camClose(), camOpen(), readCaps(), SetPalette(), SetSize(), and Webcam().
HWND Webcam::hwndWebcam [private] |
QPtrList<wcClient> Webcam::wcClientList [private] |
Definition at line 159 of file webcam.h.
Referenced by ProcessFrame(), RegisterClient(), and UnregisterClient().
QMutex Webcam::WebcamLock [private] |
Definition at line 160 of file webcam.h.
Referenced by ChangeClientFps(), FreeVideoBuffer(), GetVideoFrame(), ProcessFrame(), RegisterClient(), SetTargetFps(), and UnregisterClient().
int Webcam::hDev [private] |
Definition at line 166 of file webcam.h.
Referenced by camClose(), camOpen(), readCaps(), SetBrightness(), SetColour(), SetContrast(), SetHue(), SetPalette(), SetSize(), Webcam(), WebcamThreadWorker(), and ~Webcam().
QString Webcam::DevName [private] |
unsigned char* Webcam::picbuff1 [private] |
Definition at line 168 of file webcam.h.
Referenced by camClose(), camOpen(), Webcam(), and WebcamThreadWorker().
int Webcam::imageLen [private] |
int Webcam::frameSize [private] |
Definition at line 170 of file webcam.h.
Referenced by camOpen(), Webcam(), and WebcamThreadWorker().
int Webcam::fps [private] |
Definition at line 171 of file webcam.h.
Referenced by camOpen(), SetTargetFps(), UnregisterClient(), and Webcam().
int Webcam::actualFps [private] |
Definition at line 172 of file webcam.h.
Referenced by GetActualFps(), ProcessFrame(), and UnregisterClient().
bool Webcam::killWebcamThread [private] |
Definition at line 173 of file webcam.h.
Referenced by KillThread(), StartThread(), Webcam(), and WebcamThreadWorker().
int Webcam::wcFormat [private] |
bool Webcam::wcFlip [private] |
QTime Webcam::cameraTime [private] |
int Webcam::frameCount [private] |
int Webcam::totalCaptureMs [private] |
CAPTUREPARMS Webcam::capParams [private] |
BITMAPINFO Webcam::bitmapInfo [private] |
Definition at line 184 of file webcam.h.
Referenced by GetMaxSize(), GetMinSize(), GetPalette(), readCaps(), SetPalette(), and SetSize().
struct video_capability Webcam::vCaps [read, private] |
Definition at line 186 of file webcam.h.
Referenced by GetMaxSize(), GetMinSize(), isGreyscale(), readCaps(), and Webcam().
struct video_window Webcam::vWin [read, private] |
struct video_picture Webcam::vPic [read, private] |
Definition at line 188 of file webcam.h.
Referenced by GetPalette(), readCaps(), SetBrightness(), SetColour(), SetContrast(), SetHue(), SetPalette(), and Webcam().
struct video_clip Webcam::vClips [read, private] |
1.5.5