funcoesHAIRCAPTURE.cpp File Reference

#include "funcoesHAIRCAPTURE.h"
#include "jpeg.c"

Include dependency graph for funcoesHAIRCAPTURE.cpp:

Go to the source code of this file.

Namespaces

namespace  HAIR

Functions

bool FileExist (char *lcharFILE)
 Test for FileExist.
uchar SAT (int val)
 SUMMARY.....: Limite saturation color.
void * ThreadAoVivo (HAIR::CAPTURE *VIDEO)
 SUMMARY.....: Execute the Method Live.
std::string ToString (float Cnumero)
 Convert a float number in string.
std::string ToString (int Cnumero)
 Convert an integer number in string.
void update (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h)
 SUMMARY.....: Feedback function for play mpeg.


Function Documentation

bool FileExist ( char *  lcharFILE  ) 

Test for FileExist.

Definition at line 37 of file funcoesHAIRCAPTURE.cpp.

Referenced by CAPTURE::SaveJPG().

00038 {
00039    bool lboolRETORNO = true;
00040 
00041    struct stat lstatFILE;
00042 
00043    if ( stat(lcharFILE,&lstatFILE))
00044    {
00045       lboolRETORNO = false;
00046       printf(" > File not exist! \n");
00047    }
00048 
00049    if(lstatFILE.st_size<=0)
00050    {
00051       lboolRETORNO = false;
00052       printf(" > File error!");
00053    }
00054 
00055    return lboolRETORNO;
00056 }

uchar SAT ( int  val  ) 

SUMMARY.....: Limite saturation color.

TYPE........: Function for save frame jpeg NAME........: Sat CREATED.....: Nov-05-2005 MODIFIED....: Nov-11-2005

Parameters:
val Value color

Definition at line 79 of file funcoesHAIRCAPTURE.cpp.

Referenced by CAPTURE::SaveJPG().

00080 {
00081 
00082    if      (val <   0) return 0;
00083    else if (val > 255) return 255;
00084    return (uchar) val;
00085 }

void* ThreadAoVivo ( HAIR::CAPTURE VIDEO  ) 

SUMMARY.....: Execute the Method Live.

Definition at line 67 of file funcoesHAIRCAPTURE.cpp.

References VIDEO.

Referenced by CAPTURE::Show().

00068 {
00069   VIDEO->Live();
00070 }

std::string ToString ( float  Cnumero  ) 

Convert a float number in string.

Definition at line 22 of file funcoesHAIRCAPTURE.cpp.

00023 {
00024    char sz[101];
00025    sprintf(sz, "%G", Cnumero);
00026    std::string lreturn(sz);
00027 
00028    return lreturn;
00029 }

std::string ToString ( int  Cnumero  ) 

Convert an integer number in string.

Definition at line 14 of file funcoesHAIRCAPTURE.cpp.

Referenced by CAPTURE::GetTouch().

00015 {
00016    char sz[101];
00017    sprintf(sz, "%d", Cnumero);
00018    std::string lreturn(sz);
00019    return lreturn;
00020 }

void update ( SDL_Surface *  screen,
Sint32  x,
Sint32  y,
Uint32  w,
Uint32  h 
)

SUMMARY.....: Feedback function for play mpeg.

TYPE........: Function NAME........: UPDATE CREATED.....: Nov-05-2005 MODIFIED....: Nov-11-2005

Parameters:
screen Surface for display mpeg
x First position
y First positon
w Width of video
h height of video

Definition at line 98 of file funcoesHAIRCAPTURE.cpp.

Referenced by CAPTURE::PlayMPEG().

00099 {
00100    SDL_UpdateRect(screen, x, y, w, h);
00101 }


Generated on Tue Apr 3 11:59:09 2007 for NETi TECNOLOGIA - libHAIRCAPTURE by  doxygen 1.5.0-1