Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

frame.h File Reference

Frame interface. More...

Go to the source code of this file.

Data Structures

struct  FRAME
 A single frame buffer. More...

struct  FRAME_RGB

Functions

FRAMEframe_new (int width, int height, int format)
 Create a new frame.

void frame_release (FRAME *fr)
void * frame_get_data (FRAME *fr)
int frame_get_size (FRAME *fr)
int frame_get_width (FRAME *fr)
int frame_get_height (FRAME *fr)
int frame_save (FRAME *fr, const char *filename)


Detailed Description

Frame interface.

libfg - Frame Grabber interface for Linux

Each frame captured by the FRAMEGRABBER returns a FRAME (defined here). It contains the raw frame data, as well as information about the frame's size and format.

Author:
Gavin Baker <gavinb@antonym.org>
Version:
Revision
1.4

Function Documentation

void* frame_get_data FRAME fr  ) 
 

Returns a pointer to the raw frame data.

Parameters:
fr The frame

int frame_get_height FRAME fr  ) 
 

Returns the size of the frame, given the dimensions and the pixel format.

Parameters:
fr The frame

int frame_get_size FRAME fr  ) 
 

Returns the size of the frame, given the dimensions and the pixel format.

Parameters:
fr The frame

int frame_get_width FRAME fr  ) 
 

Returns the size of the frame, given the dimensions and the pixel format.

Parameters:
fr The frame

FRAME* frame_new int  width,
int  height,
int  format
 

Create a new frame.

Creates a new frame buffer, of the given dimensions, for the specified pixel format.

Parameters:
width Width to allocate (pixels)
height Height to allocate (pixels)
format Pixel format (VIDEO_* flags)
Returns:
A new allocated frame buffer

void frame_release FRAME fr  ) 
 

Releases a frame and all its associated memory.

Parameters:
fr The frame to release

int frame_save FRAME fr,
const char *  filename
 

Saves the frame to a PNM file for external viewing

Parameters:
fr The frame to save
filename The output filename (eg. "capture.pnm")


Generated on Thu Nov 20 01:38:22 2003 for libfg by doxygen 1.3.4