Download Source Code

CWinDcQueue Class Reference

Provides a thread safe frame queue. More...

#include <WinDcQueue.h>

Collaboration diagram for CWinDcQueue:

Collaboration graph
[legend]
List of all members.

Public Member Functions

CFrameGetNextQueuedFrame ()
 Returns a pointe to the next queued frame.
CWinDcQueue::CFrameAdvanceTailPtr ()
 Adds a frame to the queue.
CWinDcQueue::CFrameAdvanceHeadPtr ()
 Removes a frame from the queue.
CWinDcQueue::CFrameGetOpenFrame ()
 Returns a pointer to the next open frame.
BOOL WaitFrame (DWORD dwTimeout=30)
 Waits for a frame to be added to the queue.
void Destroy ()
 Destroys the frame queue.
BOOL Create (DWORD dwSize, HDC hDC, long lWidth, long lHeight, BOOL bDibSection=FALSE)
 Creates the specified frame queue and initializes it for use.
 CWinDcQueue ()
 Constructor.
virtual ~CWinDcQueue ()
 Destructor.
DWORD Size ()
 Returns the total number of image frames.
DWORD GetFramesQueued ()
 Returns the number of frames in the queue waiting processing.
long GetWidth ()
 Returns the width of a single video frame.
long GetHeight ()
 Returns the height of a single video frame.
void SetAvgFrameDelay (LONGLONG llDelay)
 Sets the average delay between frame additions.
LONGLONG GetAvgFrameDelay ()
 Returns the previously set average delay between frame additions.
 operator CTlLock * ()
 Returns a pointer to the frame queue thread lock.

Classes

class  CFrame
 Class encapsulates the data for a single frame. More...

Detailed Description

Provides a thread safe frame queue.

This class provides a thread save frame queue using CWinDc class objects to buffer individual frames. This can be useful for passing generated frames from one thread to another thread for use.


Member Function Documentation

BOOL CWinDcQueue::Create DWORD  dwSize,
HDC  hDC,
long  lWidth,
long  lHeight,
BOOL  bDibSection = FALSE
 

Creates the specified frame queue and initializes it for use.

Parameters:
[in] dwSize - Number of frames in the queue
[in] hDC - Handle to the Device Context
[in] lWidth - Width of a single image
[in] lHeight - Height of a single image
[in] bDibSection - Non-zero if each frame should be a DIB section. Set to non-zero if you need access to the raw image buffer.
Returns:
Non-zero if success
See also:

BOOL CWinDcQueue::WaitFrame DWORD  dwTimeout = 30  ) 
 

Waits for a frame to be added to the queue.

Parameters:
[in] dwTimeout - Maximum time in milli-seconds to wait for a new frame.
Returns:
Non-zero if a frame appears in the queue before the timeout expires.
See also:


The documentation for this class was generated from the following files:
  • inc/WinDcQueue.h
  • WinDcQueue.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL