Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

videoio1394dc.h

Go to the documentation of this file.
00001 /* 00002 * videoio1394dc.h 00003 * 00004 * Copyright: 00005 * Copyright (c) 2002 Ryutaroh Matsumoto <ryutaroh@rmatsumoto.org> 00006 * 00007 * The contents of this file are subject to the Mozilla Public License 00008 * Version 1.0 (the "License"); you may not use this file except in 00009 * compliance with the License. You may obtain a copy of the License at 00010 * http://www.mozilla.org/MPL/ 00011 * 00012 * Software distributed under the License is distributed on an "AS IS" 00013 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00014 * the License for the specific language governing rights and limitations 00015 * under the License. 00016 * 00017 * 00018 * Classes to support streaming video input from IEEE 1394 cameras. 00019 * Detailed explanation can be found at src/ptlib/unix/video4dc1394.cxx 00020 * 00021 * $Log: videoio1394dc.h,v $ 00022 * Revision 1.2 2002/05/30 22:49:35 dereks 00023 * correct implementation of GetInputDeviceNames(). 00024 * 00025 * Revision 1.1 2002/02/20 02:37:26 dereks 00026 * Initial release of Firewire camera support for linux. 00027 * Many thanks to Ryutaroh Matsumoto <ryutaroh@rmatsumoto.org>. 00028 * 00029 * 00030 */ 00031 00032 00033 #ifndef _PVIDEOIO1394DC 00034 00035 #define _PVIDEOIO1394DC 00036 00037 #ifdef __GNUC__ 00038 #pragma interface 00039 #endif 00040 00041 #include <libraw1394/raw1394.h> 00042 #include <libdc1394/dc1394_control.h> 00043 00047 class PVideoInput1394DcDevice : public PVideoInputDevice 00048 { 00049 PCLASSINFO(PVideoInput1394DcDevice, PVideoInputDevice); 00050 public: 00053 PVideoInput1394DcDevice(); 00054 00057 ~PVideoInput1394DcDevice(); 00058 00061 BOOL Open( 00062 const PString & deviceName, 00063 BOOL startImmediate = TRUE 00064 ); 00065 00068 BOOL IsOpen(); 00069 00072 BOOL Close(); 00073 00076 BOOL Start(); 00077 00080 BOOL Stop(); 00081 00084 BOOL IsCapturing(); 00085 00088 static PStringList GetInputDeviceNames(); 00089 00095 PINDEX GetMaxFrameBytes(); 00096 00099 BOOL GetFrameData( 00100 BYTE * buffer, 00101 PINDEX * bytesReturned = NULL 00102 ); 00103 00106 BOOL GetFrameDataNoDelay( 00107 BYTE * buffer, 00108 PINDEX * bytesReturned = NULL 00109 ); 00110 00111 00114 int GetBrightness(); 00115 00118 BOOL SetBrightness(unsigned newBrightness); 00119 00120 00123 int GetWhiteness(); 00124 00127 BOOL SetWhiteness(unsigned newWhiteness); 00128 00129 00132 int GetColour(); 00133 00136 BOOL SetColour(unsigned newColour); 00137 00138 00141 int GetContrast(); 00142 00145 BOOL SetContrast(unsigned newContrast); 00146 00147 00150 int GetHue(); 00151 00154 BOOL SetHue(unsigned newHue); 00155 00156 00159 BOOL GetParameters (int *whiteness, int *brightness, 00160 int *colour, int *contrast, int *hue); 00161 00164 BOOL GetFrameSizeLimits( 00165 unsigned & minWidth, 00166 unsigned & minHeight, 00167 unsigned & maxWidth, 00168 unsigned & maxHeight 00169 ) ; 00170 00171 void ClearMapping(); 00172 00173 int GetNumChannels(); 00174 BOOL SetChannel( 00175 int channelNumber 00176 ); 00177 BOOL SetFrameRate( 00178 unsigned rate 00179 ); 00180 BOOL SetVideoFormat( 00181 VideoFormat videoFormat 00182 ); 00183 BOOL SetFrameSize( 00184 unsigned width, 00185 unsigned height 00186 ); 00187 BOOL SetColourFormat( 00188 const PString & colourFormat // New colour format for device. 00189 ); 00190 00191 00194 BOOL TestAllFormats(); 00195 00201 BOOL SetFrameSizeConverter( 00202 unsigned width, 00203 unsigned height, 00204 BOOL bScaleNotCrop 00205 ); 00206 00213 BOOL SetColourFormatConverter( 00214 const PString & colourFormat // New colour format for device. 00215 ); 00216 00217 00218 protected: 00219 raw1394handle_t handle; 00220 BOOL is_capturing; 00221 BOOL UseDMA; 00222 nodeid_t * camera_nodes; 00223 int numCameras; 00224 dc1394_cameracapture camera; 00225 int capturing_duration; 00226 PString desiredColourFormat; 00227 unsigned desiredFrameWidth; 00228 unsigned desiredFrameHeight; 00229 }; 00230 00231 #endif 00232 00233 00234 // End Of File ///////////////////////////////////////////////////////////////

Generated on Sat Jul 24 15:35:57 2004 for PWLib by doxygen 1.3.7