Webcam Class Reference

#include <webcam.h>

List of all members.


Detailed Description

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)
wcClientRegisterClient (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< wcClientwcClientList
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

Constructor & Destructor Documentation

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.


Member Function Documentation

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  ) 

unsigned int Webcam::GetPalette ( void   ) 

int Webcam::SetBrightness ( int  v  ) 

int Webcam::SetContrast ( int  v  ) 

int Webcam::SetColour ( int  v  ) 

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]

int Webcam::GetColour ( void   )  [inline]

int Webcam::GetContrast ( void   )  [inline]

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().

HWND Webcam::GetHwnd (  )  [inline]

Definition at line 126 of file webcam.h.

void Webcam::SetFlip ( bool  b  )  [inline]

Definition at line 128 of file webcam.h.

int Webcam::SetTargetFps ( wcClient client,
int  fps 
)

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 
)

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 
)

Definition at line 541 of file webcam.cpp.

Referenced by PhoneUIBox::changeVolume().

unsigned char * Webcam::GetVideoFrame ( wcClient client  ) 

void Webcam::FreeVideoBuffer ( wcClient client,
unsigned char *  buffer 
)

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]

Definition at line 604 of file webcam.cpp.

Referenced by camOpen().

void Webcam::KillThread (  )  [private]

Definition at line 612 of file webcam.cpp.

Referenced by camClose().

void Webcam::WebcamThreadWorker (  )  [private]

Definition at line 633 of file webcam.cpp.

Referenced by run().

LRESULT CALLBACK Webcam::frameReadyCallbackProc ( HWND  hWnd,
LPVIDEOHDR  lpVHdr 
) [static, private]

Definition at line 229 of file webcam.cpp.

Referenced by Webcam().

LRESULT CALLBACK Webcam::ErrorCallbackProc ( HWND  hWnd,
int  nErrID,
LPSTR  lpErrorText 
) [static, private]

Definition at line 241 of file webcam.cpp.

Referenced by Webcam().

LRESULT CALLBACK Webcam::StatusCallbackProc ( HWND  hWnd,
int  nID,
LPSTR  lpStatusText 
) [static, private]

Definition at line 248 of file webcam.cpp.

Referenced by Webcam().

void Webcam::SetSize ( int  width,
int  height 
) [private]

Definition at line 275 of file webcam.cpp.

Referenced by camOpen().

void Webcam::readCaps ( void   )  [private]

Definition at line 259 of file webcam.cpp.

Referenced by camOpen(), SetBrightness(), SetColour(), SetContrast(), SetHue(), SetPalette(), and SetSize().


Member Data Documentation

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]

Definition at line 153 of file webcam.h.

Referenced by Webcam().

QPtrList<wcClient> Webcam::wcClientList [private]

Definition at line 159 of file webcam.h.

Referenced by ProcessFrame(), RegisterClient(), and UnregisterClient().

QMutex Webcam::WebcamLock [private]

int Webcam::hDev [private]

QString Webcam::DevName [private]

Definition at line 167 of file webcam.h.

Referenced by camOpen(), and Webcam().

unsigned char* Webcam::picbuff1 [private]

Definition at line 168 of file webcam.h.

Referenced by camClose(), camOpen(), Webcam(), and WebcamThreadWorker().

int Webcam::imageLen [private]

Definition at line 169 of file webcam.h.

Referenced by Webcam().

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().

Definition at line 173 of file webcam.h.

Referenced by KillThread(), StartThread(), Webcam(), and WebcamThreadWorker().

int Webcam::wcFormat [private]

Definition at line 174 of file webcam.h.

Referenced by camOpen(), ProcessFrame(), and Webcam().

bool Webcam::wcFlip [private]

Definition at line 175 of file webcam.h.

Referenced by ProcessFrame(), and Webcam().

QTime Webcam::cameraTime [private]

Definition at line 177 of file webcam.h.

Referenced by ProcessFrame().

int Webcam::frameCount [private]

Definition at line 178 of file webcam.h.

Referenced by camOpen(), and ProcessFrame().

int Webcam::totalCaptureMs [private]

Definition at line 179 of file webcam.h.

Referenced by camOpen(), and ProcessFrame().

CAPTUREPARMS Webcam::capParams [private]

Definition at line 183 of file webcam.h.

Referenced by camOpen(), and readCaps().

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]

Definition at line 187 of file webcam.h.

Referenced by readCaps(), SetSize(), and Webcam().

struct video_picture Webcam::vPic [read, private]

struct video_clip Webcam::vClips [read, private]

Definition at line 189 of file webcam.h.


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:14 2010 for MythTV by  doxygen 1.5.5