Home
FAQ
Player
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

v4lframe.h

Go to the documentation of this file.
00001 //==========================================================================
00002 //
00003 //  Project:        libfg - Frame Grabber interface for Linux
00004 //
00005 //  Module:         Frame interface
00006 //
00007 //  Description:    Each frame captured by the FRAMEGRABBER returns a FRAME
00008 //                  (defined here).  It contains the raw frame data, as well
00009 //                  as information about the frame's size and format.
00010 //
00011 //  Author:         Gavin Baker <gavinb@antonym.org>
00012 //
00013 //  Homepage:       http://www.antonym.org/libfg
00014 //
00015 //--------------------------------------------------------------------------
00016 //
00017 //  libfg - Frame Grabber interface for Linux
00018 //  Copyright (c) 2002 Gavin Baker
00019 //
00020 //  This library is free software; you can redistribute it and/or
00021 //  modify it under the terms of the GNU Lesser General Public
00022 //  License as published by the Free Software Foundation; either
00023 //  version 2.1 of the License, or (at your option) any later version.
00024 //
00025 //  This library is distributed in the hope that it will be useful,
00026 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00027 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00028 //  Lesser General Public License for more details.
00029 //
00030 //  You should have received a copy of the GNU Lesser General Public
00031 //  License along with this library; if not, write to the Free Software
00032 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00033 //  or obtain a copy from the GNU website at http://www.gnu.org/
00034 //
00035 //==========================================================================
00036 
00037 #ifndef __V4LFRAME_H__
00038 #define __V4LFRAME_H__
00039 
00040 //==========================================================================
00041 //  Types
00042 //==========================================================================
00043 
00044 #include <stddef.h>
00045 
00046 //--------------------------------------------------------------------------
00047 //
00048 //  Type:           FRAME
00049 //
00050 //  Description:    Represents a single image in the output from the
00051 //                  frame grabber.  Carries with it the dimensions,
00052 //                  format and the data buffer.  The type of the data
00053 //                  depends on the format flag (uses the VIDEO_* flags from
00054 //                  Video4Linux), so RGB24 would be a triplet of chars,
00055 //                  while RGB32 would be an int.
00056 //
00057 //--------------------------------------------------------------------------
00058 
00059 typedef struct
00060 {
00061     int     width;
00062     int     height;
00063     int     depth;
00064     int     format;
00065     size_t  size;
00066     void*   data;
00067 
00068 } FRAME;
00069 
00070 
00071 typedef struct
00072 {
00073     char    red;
00074     char    green;
00075     char    blue;
00076 } FRAME_RGB;
00077 
00078 
00079 //==========================================================================
00080 //  Prototypes
00081 //==========================================================================
00082 
00083 //--------------------------------------------------------------------------
00084 
00085 FRAME* frame_new( int width, int height, int format );
00086 
00087 void frame_release( FRAME* fr );
00088 
00089 void* frame_get_data( FRAME* fr );
00090 
00091 int frame_get_size( FRAME* fr );
00092 
00093 int frame_get_width( FRAME* fr );
00094 
00095 int frame_get_height( FRAME* fr );
00096 
00097 int frame_save( FRAME* fr, const char* filename );
00098     
00099 //==========================================================================
00100 
00101 #endif /*  __V4LFRAME_H__ */

Generated on Tue May 3 14:15:36 2005 for Player by doxygen 1.3.6