Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phImageCapture.cpp

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission : 
00003         Realtime Vision Processing System
00004     
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008     
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifdef HAVE_CONFIG_H
00027     #include <phissionconfig.h>
00028 #endif
00029 
00030 #include <phStandard.h>
00031 
00032 #include <ImageDefinitions.h>
00033 
00034 #include <phObject.h>
00035 #include <phMutex.h>
00036 #include <phSemaphore.h>
00037 #include <phCondition.h>
00038 #include <phRWLock.h>
00039 #include <phThread.h>
00040 #include <phList.h>
00041 #include <phTimeStamp.h>
00042 #include <phTimeInterval.h>
00043 #include <phLiveObject.h>
00044 #include <phDataObject.h>
00045 #include <phImage.h>
00046 #include <phCaptureInterface.h>
00047 
00048 #include <phImageCapture.h>
00049 
00050 #include <phError.h>
00051 #include <phMemory.h>
00052 #include <phPrint.h>
00053 
00054 /* ---------------------------------------------------------------------- */
00055 phImageCapture::phImageCapture()
00056 {
00057     phFUNCTION("phImageCapture::phImageCapture")
00058     
00059     setName("phImageCapture");
00060 
00061     rc = this->lock();
00062     phPRINT_RC(rc,NULL,"this->lock()");
00063 
00064     this->m_defer_apply = 0;
00065     this->m_changed_array = NULL;
00066 
00067     /* Allocate the live source object to facilitate the thread-safe output */
00068     this->m_imageOutput = new phImage(); 
00069     /* Call the phCaptureInterface method to assign the pointer for 
00070      * live source output */
00071     rc = this->setLiveSourceOutput(this->m_imageOutput);
00072     phPRINT_RC(rc,NULL,"this->setLiveSourceOutput()");
00073     
00074     /* Cause applySettings to update all the settings */
00075     rc = ph_int32_array_new(&this->m_changed_array);
00076     phPRINT_RC(rc,NULL,"ph_int32_array_new failed.");
00077     
00078     ph_int32_array_append(this->m_changed_array,phCHANGE_INIT);
00079 
00080     /* Set the default image settings */
00081     this->m_brightness = 65536 / 2;
00082     this->m_hue        = 65536 / 2;
00083     this->m_color      = 65536 / 2;
00084     this->m_contrast   = 65536 / 2;
00085     this->m_whiteness  = 65536 / 2;
00086     this->m_format     = phImageRGB24;
00087     this->m_depth      = 24;
00088     this->m_width      = 160;
00089     this->m_height     = 120;
00090     this->m_channel    = 1;
00091 
00092     
00093     rc = this->unlock();
00094     phPRINT_RC(rc,NULL,"this->unlock()");
00095 }
00096 
00097 /* ---------------------------------------------------------------------- */
00098 phImageCapture::~phImageCapture()
00099 {
00100     phFUNCTION("phImageCapture::~phImageCapture")
00101 
00102     /* Acquire both locks that are visible for this object */
00103     rc = this->lock();
00104     phPRINT_RC(rc,NULL,"this->lock()");
00105 
00106     rc = this->m_settings_lock.lock();
00107     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock()");
00108     
00109     rc = ph_int32_array_free(&this->m_changed_array);
00110     phPRINT_RC(rc,NULL,"ph_int32_array_free");
00111 
00112     /* Delete the allocated live source output object */
00113     phDelete(this->m_imageOutput);
00114 }
00115 
00116 /* ---------------------------------------------------------------------- */
00117 /* setChannel - This sets the channel value for this V4LCapture object.
00118  *  If the device is open, it applies the channel setting. When the
00119  *  device is open, this is called and the current channel setting 
00120  *  applied. This means that this function only needs to be called
00121  *  once during the object's instance. Opening and closing of the device
00122  *  will maintain the same channel.
00123  * 
00124  * PRE: this is a valid V4LCapture object.
00125  *
00126  * POST: The new channel value is set and applied is appropriate.
00127  */
00128 /* ---------------------------------------------------------------------- */
00129 int phImageCapture::setChannel(int channelNumber )
00130 {
00131     phFUNCTION("phImageCapture::setChannel")
00132     int changed = 0;
00133 
00134     rc = this->m_settings_lock.lock();
00135     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock() failed");
00136    
00137     if (this->m_channel != channelNumber)
00138     {
00139         this->m_channel = channelNumber;
00140         ph_int32_array_append(this->m_changed_array,phCHANGE_CHANNEL);
00141         changed = 1;
00142     }
00143     
00144     /* apply the settings only if another method (one that called this 
00145      * method) isn't going to apply the settings on our behalf; And
00146      * check to see if anything really changed, otherwise we won't need
00147      * to apply */
00148     if (changed)
00149     {
00150         rc = this->applySettings();
00151         phPRINT_RC(rc,NULL,"applyChannelSettings()");
00152     }
00153 
00154     rc = this->m_settings_lock.unlock();
00155     phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00156             
00157     return phSUCCESS;
00158 }
00159 /* ---------------------------------------------------------------------- */
00160 /* setPicture - This applied picture settings to the open device.
00161  *  The device doesn't need to be open for this to be called.
00162  *  When the device is openned, any previous values stored for the
00163  *  picture settings will be applied.
00164  * 
00165  * PRE: Initial settings for brightness, etc.
00166  *
00167  * POST: New values set and applied to device settings as appropriate.
00168  * 
00169  */
00170 /* ---------------------------------------------------------------------- */
00171 int phImageCapture::setPicture(int brightness,
00172                                int hue,
00173                                int color,
00174                                int contrast,
00175                                int whiteness,
00176                                uint32_t format )
00177 {
00178     phFUNCTION("phImageCapture::setPicture")
00179     int changed = 0;
00180 
00181     rc = this->m_settings_lock.lock();
00182     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock() failed");
00183     
00184     /* threshold the values at the high spot */
00185     if (brightness >= 65536)    brightness  = 65535;
00186     if (hue >= 65536)           hue         = 65535;
00187     if (color >= 65536)         color       = 65535;
00188     if (contrast >= 65536)      contrast    = 65535;
00189     if (whiteness >= 65536)     whiteness   = 65535;
00190     
00191     /* Check the passed 'brightness' value for validity and whether it's 
00192      * different */
00193     if ((brightness >= 0) && (this->m_brightness != brightness))
00194     {
00195         this->m_brightness = brightness;
00196         ph_int32_array_append(this->m_changed_array,phCHANGE_BRIGHTNESS);
00197         changed = 1;
00198     }
00199     /* Check the passed 'hue' value for validity and whether it's 
00200      * different */
00201     if ((hue >= 0) && (this->m_hue != hue))
00202     {
00203         this->m_hue = hue;
00204         ph_int32_array_append(this->m_changed_array,phCHANGE_HUE);
00205         changed = 1;
00206     }
00207     /* Check the passed 'color' value for validity and whether it's 
00208      * different */
00209     if ((color >= 0) && (this->m_color != color))
00210     {
00211         this->m_color = color;
00212         ph_int32_array_append(this->m_changed_array,phCHANGE_COLOR);
00213         changed = 1;
00214     }
00215     /* Check the passed 'contrast' value for validity and whether it's 
00216      * different */
00217     if ((contrast >= 0) && (this->m_contrast != contrast))
00218     {
00219         this->m_contrast = contrast;
00220         ph_int32_array_append(this->m_changed_array,phCHANGE_CONTRAST);
00221         changed = 1;
00222     }
00223     /* Check the passed 'whiteness' value for validity and whether it's 
00224      * different */
00225     if ((whiteness >= 0) && (this->m_whiteness != whiteness))
00226     {
00227         this->m_whiteness = whiteness;
00228         ph_int32_array_append(this->m_changed_array,phCHANGE_WHITENESS);
00229         changed = 1;
00230     }
00231     /* Check the passed 'format' value for validity and whether it's 
00232      * different */
00233     if ((format & phImageValidFormatMask) &&
00234         (format != phImageNOFORMAT) && (format != this->m_format))
00235     {
00236         this->m_format = format;
00237         ph_int32_array_append(this->m_changed_array,phCHANGE_FORMAT);
00238         changed = 1;
00239     }
00240 
00241     /* apply the settings only if another method (one that called this 
00242      * method) isn't going to apply the settings on our behalf; And
00243      * check to see if anything really changed, otherwise we won't need
00244      * to apply */
00245     if (changed)
00246     {
00247         rc = this->applySettings();
00248         phPRINT_RC(rc,NULL,"this->applySettings()");
00249     }
00250 
00251     rc = this->m_settings_lock.unlock();
00252     phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00253 
00254     return phSUCCESS;
00255 }
00256 
00257 /* ---------------------------------------------------------------------- */
00258 int phImageCapture::setBrightness(int value)
00259 {
00260     return this->setPicture(value,-1,-1,-1,-1,phImageNOFORMAT);
00261 }
00262 
00263 /* ---------------------------------------------------------------------- */
00264 int phImageCapture::setHue(int value)
00265 {
00266     return this->setPicture(-1,value,-1,-1,-1,phImageNOFORMAT);
00267 }
00268 
00269 /* ---------------------------------------------------------------------- */
00270 int phImageCapture::setColor(int value)
00271 {
00272     return this->setPicture(-1,-1,value,-1,-1,phImageNOFORMAT);
00273 }
00274 
00275 /* ---------------------------------------------------------------------- */
00276 int phImageCapture::setContrast(int value)
00277 {
00278     return this->setPicture(-1,-1,-1,value,-1,phImageNOFORMAT);
00279 }
00280 
00281 /* ---------------------------------------------------------------------- */
00282 int phImageCapture::setWhiteness(int value)
00283 {
00284     return this->setPicture(-1,-1,-1,-1,value,phImageNOFORMAT);
00285 }
00286 
00287 /* ---------------------------------------------------------------------- */
00288 int phImageCapture::setFormat(uint32_t format)
00289 {
00290     return this->setPicture(-1,-1,-1,-1,-1,format);
00291 }
00292 
00293 /* ---------------------------------------------------------------------- */
00294 /* setSize - This allows setting of the image capture size apart from 
00295  * 
00296  * This function facilitates the proper flexible operation of phSystem
00297  * by allowing the user to set the appropriate device for a capture 
00298  * class when multiple capture devices exist.
00299  */
00300 /* ---------------------------------------------------------------------- */
00301 int phImageCapture::setSize( int width, int height )
00302 {
00303     phFUNCTION("phImageCapture::setSize")
00304     int changed = 0;
00305 
00306     rc = this->m_settings_lock.lock();
00307     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock() failed");
00308    
00309     if ((width > 0) && (this->m_width != width))
00310     {
00311         this->m_width = width;
00312         ph_int32_array_append(this->m_changed_array,phCHANGE_WIDTH);
00313         changed = 1;
00314     }
00315     if ((height > 0) && (this->m_height != height))
00316     {
00317         this->m_height = height;
00318         ph_int32_array_append(this->m_changed_array,phCHANGE_HEIGHT);
00319         changed = 1;
00320     }
00321  
00322     /* apply the settings only if another method (one that called this 
00323      * method) isn't going to apply the settings on our behalf; And
00324      * check to see if anything really changed, otherwise we won't need
00325      * to apply */
00326     if (changed)
00327     {
00328         rc = this->applySettings();
00329         phPRINT_RC(rc,NULL,"applySettings()");
00330     }
00331 
00332     rc = this->m_settings_lock.unlock();
00333     phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00334  
00335     return phSUCCESS;
00336 }
00337 
00338 /* ---------------------------------------------------------------------- */
00339 int phImageCapture::getColour()
00340 { 
00341     return this->getColor();      
00342 };
00343 /* ---------------------------------------------------------------------- */
00344 int phImageCapture::setColour( int value )
00345 {
00346     return this->setColor(value); 
00347 };
00348 
00349 /* ---------------------------------------------------------------------- */
00350 /* setPath - This allows setting of the device name apart from passing
00351  * it as an argument of open.
00352  *
00353  * This function facilitates the proper flexible operation of phSystem
00354  * by allowing the user to set the appropriate device for a capture 
00355  * class when multiple capture devices exist.
00356  */
00357 /* ---------------------------------------------------------------------- */
00358 int phImageCapture::setPath( const char *path )
00359 {
00360     phFUNCTION("phImageCapture::setPath")
00361     
00362     int locked = 0;
00363     int length = ((path == NULL) ? 0 : strlen(path));
00364 
00365     if (length == 0) return 1;
00366     
00367     rc = this->m_settings_lock.lock();
00368     phCHECK_RC(rc,NULL,"this->m_settings_lock.lock() failed");
00369     locked = 1;
00370 
00371     rc = this->phCaptureInterface::setPath(path);
00372     phCHECK_RC(rc,NULL,"this->phCaptureInterface::setPath");
00373 
00374     if (rc == 1) goto success;
00375     
00376     /* rc == phSUCCESS if we get this far */
00377     ph_int32_array_append(this->m_changed_array,phCHANGE_PATH);
00378 
00379     /* apply the settings only if another method (one that called this 
00380      * method) isn't going to apply the settings on our behalf; And
00381      * check to see if anything really changed, otherwise we won't need
00382      * to apply */
00383     /* A change in the path is determined by the return code of
00384      * phCaptureInterface::setPath(path) above */
00385     rc = this->applySettings();
00386     phPRINT_RC(rc,NULL,"this->applySettings()");
00387     
00388 success:
00389     if (locked)
00390     {
00391         rc = this->m_settings_lock.unlock();
00392         locked = 0;
00393         phCHECK_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00394     }
00395     
00396     return phSUCCESS;
00397 error:
00398     if (locked == 1)
00399     {
00400         rc = this->m_settings_lock.unlock();
00401         phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00402         locked = 0;
00403     }
00404     
00405     return phFAIL;
00406 }
00407 
00408 
00409 /* ---------------------------------------------------------------------- */
00410 /* set - this allows the setting of all the capture settings at once.
00411  *       It makes it easier in terms of efficiency since 'applySettings'
00412  *       will be called only once. 
00413  */
00414 /* ---------------------------------------------------------------------- */
00415 int phImageCapture::set( int w, 
00416                          int h, 
00417                          char *path,
00418                          int channel,
00419                          int brightness,
00420                          int hue,
00421                          int color,
00422                          int contrast,
00423                          int whiteness,
00424                          uint32_t format )
00425 {
00426     phFUNCTION("phImageCapture::set")
00427     int we_defered_apply = 0;
00428 
00429     rc = this->m_settings_lock.lock();
00430     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock() failed");
00431     
00432     if (this->m_defer_apply == 0)
00433     {
00434         this->m_defer_apply = 1;
00435         we_defered_apply = 1;
00436     }
00437 
00438     /* Set the size values */
00439     rc = this->setSize(w,h);
00440     phPRINT_RC(rc,NULL,"this->setSize(w,h) failed.");
00441 
00442     /* Set the path value */
00443     if (path != NULL)
00444     {
00445         rc = this->setPath(path);
00446         phPRINT_RC(rc,NULL,"this->setPath() failed." );
00447     }
00448     
00449     /* set the channel value */
00450     rc = this->setChannel(channel);
00451     phPRINT_RC(rc,NULL,"this->setChannel()");
00452     
00453     /* Set the image settings */
00454     rc = this->setPicture(brightness,hue,color,
00455                           contrast,whiteness,format);
00456     phPRINT_RC(rc,NULL,"this->setPicture failed");
00457 
00458     /* Now we can call the applySettings method */
00459     if (we_defered_apply == 1)
00460     {
00461         this->m_defer_apply = 0;
00462     }
00463     
00464     /* apply the settings only if another method (one that called this 
00465      * method) isn't going to apply the settings on our behalf; And
00466      * check to see if anything really changed, otherwise we won't need
00467      * to apply */
00468     if (ph_int32_array_get_length(this->m_changed_array) > 0)
00469     {
00470         rc = this->applySettings();
00471         phPRINT_RC(rc,NULL,"this->applySettings()");
00472     }
00473     
00474     rc = this->m_settings_lock.unlock();
00475     phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock() failed");
00476 
00477     return phSUCCESS;
00478 }
00479 
00480 /* ---------------------------------------------------------------------- */
00481 int phImageCapture::getChannel()
00482 {
00483     return this->m_channel;
00484 }
00485 
00486 /* ---------------------------------------------------------------------- */
00487 int phImageCapture::getBrightness()
00488 {
00489     return this->m_brightness;
00490 }
00491 
00492 /* ---------------------------------------------------------------------- */
00493 int phImageCapture::getHue()
00494 {
00495     return this->m_hue;
00496 }
00497 
00498 /* ---------------------------------------------------------------------- */
00499 int phImageCapture::getColor()
00500 {
00501     return this->m_color;
00502 }
00503 
00504 /* ---------------------------------------------------------------------- */
00505 int phImageCapture::getContrast()
00506 {
00507     return this->m_contrast;
00508 }
00509 
00510 /* ---------------------------------------------------------------------- */
00511 int phImageCapture::getWhiteness()
00512 {
00513     return this->m_whiteness;
00514 }
00515 
00516 /* ---------------------------------------------------------------------- */
00517 int phImageCapture::getWidth()
00518 {
00519     return this->m_width;
00520 }
00521 
00522 /* ---------------------------------------------------------------------- */
00523 int phImageCapture::getHeight()
00524 {
00525     return this->m_height;
00526 }
00527 
00528 /* ---------------------------------------------------------------------- */
00529 int32_t phImageCapture::getFormat()
00530 {
00531     return this->m_format;
00532 }
00533 
00534 /* ---------------------------------------------------------------------- */
00535 /* getImageSize - This calculates the size in bytes that is needed
00536  * to store a copy of a frame in memory */
00537 /* ---------------------------------------------------------------------- */
00538 uint32_t   phImageCapture::getImageSize()
00539 {
00540     phFUNCTION("phImageCapture::getImageSize")
00541     uint32_t s = 0;
00542     
00543     rc = this->m_settings_lock.lock();
00544     phPRINT_RC(rc,NULL,"this->m_settings_lock.lock()");
00545     
00546     /* image_size is modified by this macro */
00547     phIMAGE_SIZE_IN_BYTES(s,
00548                           this->m_width,
00549                           this->m_height,
00550                           this->m_format );
00551 
00552     rc = this->m_settings_lock.unlock();
00553     phPRINT_RC(rc,NULL,"this->m_settings_lock.unlock()");
00554     
00555     return s;
00556 }
00557 
00558 /* ---------------------------------------------------------------------- */
00559 int phImageCapture::getMaxBrightness()
00560 {
00561     return 65535;
00562 }
00563 /* ---------------------------------------------------------------------- */
00564 int phImageCapture::getMaxHue()
00565 {
00566     return 65535;
00567 }
00568 /* ---------------------------------------------------------------------- */
00569 int phImageCapture::getMaxColor()
00570 {
00571     return 65535;
00572 }
00573 /* ---------------------------------------------------------------------- */
00574 int phImageCapture::getMaxContrast()
00575 {
00576     return 65535;
00577 }
00578 /* ---------------------------------------------------------------------- */
00579 int phImageCapture::getMaxWhiteness()
00580 {
00581     return 65535;
00582 }
00583 /* ---------------------------------------------------------------------- */
00584 int phImageCapture::getMaxWidth()
00585 {
00586     return 65534;
00587 }
00588 /* ---------------------------------------------------------------------- */
00589 int phImageCapture::getMaxHeight()
00590 {
00591     return 65534;
00592 }
00593 
00594 /* ---------------------------------------------------------------------- */
00595 /* copyImage - This copies data from the m_buffer to the copydest buffer.
00596  *  A capture doesn't have to be running for this to work.
00597  *
00598  * PRE: This class is a valid instance. copydest class is a valid instance.
00599  *
00600  * POST: NULL or data has been copied into copydest buffer.
00601  *
00602  * Note: This function doesn't have to lock the capture object, only
00603  * the capture object's image variable. Any changes made to the 
00604  * m_buffer image var will cause it to be locked so this is thread safe.
00605  */
00606 /* ---------------------------------------------------------------------- */
00607 int phImageCapture::copyImage( phImage &copydest, int wait )
00608 {
00609     phFUNCTION("phImageCapture::getImage")
00610     int locked = 0;
00611 
00612     if (wait == 1)
00613     {
00614         while (this->m_imageOutput->isNull())
00615         {
00616             phYield();
00617         }
00618     }
00619     
00620     /* lock the device to hold off other cooperating processes */
00621     rc = this->m_imageOutput->readLock();
00622     phCHECK_RC(rc,NULL,"m_imageOutput->readLock failed");
00623     locked = 1;
00624 
00625     rc = this->m_imageOutput->getCopy(copydest);
00626     phCHECK_RC(rc,NULL,"m_imageOutput->getCopy failed");
00627     
00628     /* unlock the device */
00629     rc = this->m_imageOutput->rwUnlock();
00630     locked = 0;
00631     phCHECK_RC(rc,NULL,"m_imageOutput->rwUnlock failed");
00632     
00633     /* We have to yield someone who might be beating up the CPU
00634      * and causing the capture thread to not get it's fair share.
00635      * This can be a problem because I've noticed ioctl's failing
00636      * and it could be missed interrupts.. ? */
00637     phYield();
00638     
00639     return phSUCCESS;
00640 error:
00641     if (locked == 1)
00642     {
00643         rc = this->m_imageOutput->rwUnlock();
00644         phPRINT_RC(rc,NULL,"m_imageOutput->rwUnlock failed");
00645         locked = 0;
00646     }
00647 
00648     return phFAIL;
00649 }
00650 
00651 /* ---------------------------------------------------------------------- */
00652 phImage *phImageCapture::getImage( )
00653 {
00654     return this->m_imageOutput;
00655 }
00656 
00657 /* ---------------------------------------------------------------------- */
00658 int phImageCapture::applySettings()
00659 {
00660     phFUNCTION("phImageCapture::applySettings")
00661     int locked = 0;
00662     int set_locked = 0;
00663 
00664     phMUTEX_LOCK(this->m_settings_lock,set_locked);
00665   
00666     if (this->m_defer_apply == 0)
00667     {
00668         phTHIS_LOCK(locked);
00669 
00670         /* this->m_defer_apply = 1; */ /*  ???  */
00671         
00672         rc = this->onApplySettings();
00673         phCHECK_RC(rc,NULL,"this->onApplySettings()");
00674     
00675         /* this->m_defer_apply = 0; */ /*  ???  */
00676         
00677         phTHIS_UNLOCK(locked);
00678     }
00679     
00680     phMUTEX_UNLOCK(this->m_settings_lock,set_locked);
00681     
00682     return phSUCCESS;
00683 error:
00684     phMUTEX_ERROR_UNLOCK(this->m_settings_lock,set_locked);
00685     phTHIS_ERROR_UNLOCK(locked);
00686 
00687     return phFAIL;
00688 }
00689 
00690 /* ---------------------------------------------------------------------- */
00691 /* m_settings and this are locked upon entry */
00692 int phImageCapture::onApplySettings()
00693 {
00694     phFUNCTION("phImageCapture::onApplySettings")
00695     
00696     rc = ph_int32_array_empty(this->m_changed_array);
00697     phCHECK_RC(rc,NULL,"ph_int332_array_empty");
00698     
00699     return phSUCCESS;
00700 error:
00701     return phFAIL;
00702 }
00703 
00704 /* ---------------------------------------------------------------------- */
00705 int phImageCapture::open(char *path)
00706 {
00707     phFUNCTION("phImageCapture::open")
00708     return phSUCCESS;
00709 }
00710 
00711 /* ---------------------------------------------------------------------- */
00712 int phImageCapture::close()
00713 {
00714     phFUNCTION("phImageCapture::close")
00715     return phSUCCESS;
00716 }
00717 
00718 /* ---------------------------------------------------------------------- */
00719 int phImageCapture::isOpen()
00720 {
00721     return 0;
00722 }
00723 




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:02 2007 for phission by  doxygen 1.4.4