34 #include <FreeImage.h> 105 glDeleteTextures(1, &
m_glid);
124 glGenTextures(1, &
m_glid);
139 return SetBuffer(p_width, p_height, p_buffer, p_format, p_type);
151 if ( pFile==NULL )
return false;
154 FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
155 FIBITMAP *m_pImage = NULL;
161 if( fif == FIF_UNKNOWN ) {
166 if( (fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif) ) {
176 if( (fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif) ) {
178 m_pImage = FreeImage_LoadFromMemory( fif, (FIMEMORY*)
m_pFile->
GetData(), 0);
185 if (m_pImage != NULL)
189 FIBITMAP* pImageScaled = NULL;
191 p_width = FreeImage_GetWidth(m_pImage);
192 p_height = FreeImage_GetHeight(m_pImage);
194 bool size_mult_4 = ( p_width % 4 ) != 0 || ( p_height % 4) == 0;
195 bool size_power_2 = ( !Mathd.IsPowerOfTwo( (
int)p_width ) || !Mathd.IsPowerOfTwo( (
int)p_height ) );
196 bool resize_image =
false;
202 if (!Mathd.IsPowerOfTwo(p_width)) p_width =
NextPowerOf2( p_width );
203 if (!Mathd.IsPowerOfTwo(p_height)) p_height =
NextPowerOf2( p_height );
209 p_width = p_width / 4;
210 p_width = p_width * 4;
212 p_height = p_height / 4;
213 p_height = p_height* 4;
219 pImageScaled = FreeImage_Rescale( m_pImage, p_width, p_height, FILTER_BICUBIC );
221 FreeImage_Unload( m_pImage );
222 m_pImage = pImageScaled;
226 MOuint bpp = FreeImage_GetBPP(m_pImage);
227 FREE_IMAGE_COLOR_TYPE colortype = FreeImage_GetColorType(m_pImage);
228 FREE_IMAGE_TYPE image_type = FreeImage_GetImageType(m_pImage);
230 MOuint red_mask = FreeImage_GetRedMask(m_pImage);
231 MOuint blue_mask = FreeImage_GetBlueMask(m_pImage);
232 MOuint green_mask = FreeImage_GetGreenMask(m_pImage);
233 MOuint pitch = FreeImage_GetPitch(m_pImage);
236 +
" image_type:"+
IntToStr(image_type)
238 +
" > blue_mask: " +
IntToStr(blue_mask)
239 +
" green_mask:"+
IntToStr(green_mask)
240 +
" red_mask:"+
IntToStr(red_mask) );
247 p_format = GL_LUMINANCE;
277 if ( image_type==FIT_BITMAP && (fif==FIF_JPEG || fif==FIF_PNG) ) {
279 for(
int j = 0; j < (int)p_height; j++) {
281 BYTE *pixel = (BYTE *) FreeImage_GetScanLine( m_pImage, j );
282 for(
int i = 0; i < (int)p_width; i++) {
283 BYTE tmp = pixel[FI_RGBA_RED];
284 pixel[FI_RGBA_RED] = pixel[FI_RGBA_BLUE];
286 pixel[FI_RGBA_BLUE] = tmp;
301 if ( image_type==FIT_BITMAP && fif==FIF_PNG ) {
303 for(
int j = 0; j < (int)p_height; j++) {
305 BYTE *pixel = (BYTE *) FreeImage_GetScanLine( m_pImage, j );
306 for(
int i = 0; i < (int)p_width; i++) {
307 BYTE tmp = pixel[FI_RGBA_RED];
308 pixel[FI_RGBA_RED] = pixel[FI_RGBA_BLUE];
310 pixel[FI_RGBA_BLUE] = tmp;
337 res =
SetBuffer(p_width, p_height, FreeImage_GetBits(m_pImage), p_format);
339 FreeImage_Unload(m_pImage);
353 moText extension = p_filename;
355 return (!stricmp(extension,
"tga") ||
356 !stricmp(extension,
"jpg") ||
357 !stricmp(extension,
"png") ||
358 !stricmp(extension,
"gif") ||
359 !stricmp(extension,
"bmp") ||
360 !stricmp(extension,
"xpm") ||
361 !stricmp(extension,
"ppm") ||
362 !stricmp(extension,
"exr") ||
363 !stricmp(extension,
"web") ||
364 !stricmp(extension,
"hdr") ||
365 !stricmp(extension,
"mng") ||
366 !stricmp(extension,
"jp2") ||
367 !stricmp(extension,
"tif") ||
368 !stricmp(extension,
"j2k") ||
369 !stricmp(extension,
"j2c") ||
370 !stricmp(extension,
"ico") ||
371 !stricmp(extension,
"pcx") ||
372 !stricmp(extension,
"psd"));
378 return Load( pValue );
407 glTexSubImage2D(
m_param.
target, 0, 0, 0, p_width, p_height, p_format, p_type, p_buffer);
431 if ( p_buffer == NULL ) {
440 p_format!=GL_RGB && p_format!=GL_RGBA ) {
444 if ( p_type!=GL_UNSIGNED_BYTE && p_type!=GL_FLOAT && p_type!=GL_BYTE ) {
450 glGetTexImage(
m_param.
target, 0, p_format, p_type, p_buffer);
471 FIBITMAP* fbitmap = NULL;
472 FIBITMAP* fbitmapcopy = NULL;
474 BYTE* tempbuffer = NULL;
478 if (x0 == 0 && y0 == 0 && x1 == 0 && y1 == 0) {
481 if (tempbuffer==NULL)
return false;
482 if (!
GetBuffer( tempbuffer, GL_RGBA, GL_UNSIGNED_BYTE ) )
return false;
485 fbitmap = FreeImage_ConvertFromRawBits( (BYTE*)tempbuffer,
GetWidth(),
GetHeight(), pitch, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK,
false );
487 delete [] tempbuffer;
491 int ww = (x1 - x0 - 1);
492 int hh = (y1 - y0 - 1);
495 if (tempbuffer==NULL)
return false;
497 if (!
GetBuffer( tempbuffer, GL_RGBA, GL_UNSIGNED_BYTE ) )
return false;
500 fbitmap = FreeImage_ConvertFromRawBits( (BYTE*)tempbuffer,
GetWidth(),
GetHeight(), pitch, bpp, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK,
false );
501 fbitmapcopy = FreeImage_Copy( fbitmap, x0, y0, x1, y1 );
502 FreeImage_Unload(fbitmap);
503 fbitmap = fbitmapcopy;
505 delete [] tempbuffer;
514 if (fbitmap && FreeImage_GetHistogram( (FIBITMAP *)fbitmap, (DWORD*)
Histogram, FICC_BLACK )) {
520 for(
int ih=0; ih <256; ih++) {
521 Total+= Histogram[ih];
547 for(
int ih=0; ih <256; ih++) {
551 Totals[zone]+= Histogram[ih];
555 for(
int z=0;z<5;z++) {
556 if (Totals[z]>0)
Contrast+= Group[z] / Totals[z];
562 }
else MODebug2->
Error(
moText(
"moTexture::CalculateLuminanceAndConstrast Histogram error"));
564 if (fbitmap) FreeImage_Unload( fbitmap );
591 if (p_src_mob==NULL)
return GetGLId();
600 int lineWidth =
m_width * p_depth;
606 for(
MOuint i = 0; i < (m_height >> 1); i++)
608 memcpy(tmp_buffer, top, lineWidth);
609 memcpy(top, bottom, lineWidth);
610 memcpy(bottom, tmp_buffer, lineWidth);
612 top =(
MOubyte*)((BYTE*) top + lineWidth);
613 bottom =(
MOubyte*)((BYTE*) bottom - lineWidth);
619 if (p_src_tex != NULL)
674 p_width = ( p_width / 4 ) * 4;
675 p_height = ( p_height / 4 ) * 4;
696 else if (
RenderMan()->IsTextureNonPowerOf2Disabled())
725 if (bytes_per_pixel>0) resized = resized || bytes_per_pixel!=(int)
m_buffer_bytespp;
728 bool create_buffer = force_creation;
730 if ( resized || force_creation ) {
736 create_buffer =
true;
761 for (i = 1; i < p_seed; i *= 2);
770 GLenum pixel_format = GL_RGBA;
771 GLenum pixel_type_format = GL_UNSIGNED_BYTE;
772 void* blankdata = NULL;
774 MOint* i_blankdata = NULL;
779 pixel_format = GL_RGBA;
780 pixel_type_format = GL_UNSIGNED_BYTE;
783 ub_blankdata = (
MOubyte*) blankdata;
786 pixel_format = GL_RGBA;
787 pixel_type_format = GL_UNSIGNED_BYTE;
790 ub_blankdata = (
MOubyte*) blankdata;
795 pixel_format = GL_RGBA_INTEGER;
796 pixel_type_format = GL_INT;
799 i_blankdata = (
MOint*) blankdata;
803 pixel_format = GL_RGBA;
804 pixel_type_format = GL_FLOAT;
807 f_blankdata = (
MOfloat*) blankdata;
811 pixel_format = GL_RGBA;
812 pixel_type_format = GL_UNSIGNED_BYTE;
815 i_blankdata = (
MOint*) blankdata;
826 if (i_blankdata)
delete [] i_blankdata;
827 if (ub_blankdata)
delete [] ub_blankdata;
828 if (f_blankdata)
delete [] f_blankdata;
849 if(fif != FIF_UNKNOWN) {
853 cout << message << endl;
862 if ( newfilename==
moText(
"") ) {
882 thumbnailfilename = newfilename;
885 FREE_IMAGE_FORMAT fif = FIF_PNG;
886 FREE_IMAGE_TYPE fit = FIT_BITMAP;
887 FIBITMAP* fbitmap = NULL;
891 MODebug2->
Error(
"moTexture::CreateThumbnail > no width or height, texture surface is 0.");
895 unsigned int bpp = 24;
896 unsigned int bytesperpixel = 3;
897 unsigned int pitch = bytesperpixel *
GetWidth();
899 GLenum gbufferformat = GL_BGR;
901 GLenum gbufferformat = GL_RGB;
903 GLenum gcomponenttype = GL_UNSIGNED_BYTE;
905 if ( p_bufferformat ==
moText(
"PNGA")) {
908 options = PNG_DEFAULT;
909 thumbnailfilename+=
moText(
".png");
913 gbufferformat = GL_BGRA;
915 gbufferformat = GL_RGBA;
917 }
else if ( p_bufferformat ==
moText(
"PNGF")) {
920 options = PNG_DEFAULT;
921 thumbnailfilename+=
moText(
".png");
925 gbufferformat = GL_BGRA;
927 gbufferformat = GL_RGBA;
929 gcomponenttype = GL_FLOAT;
931 }
else if ( p_bufferformat ==
moText(
"PNG")) {
933 options = PNG_DEFAULT;
934 thumbnailfilename+=
moText(
".png");
936 if ( p_bufferformat ==
moText(
"JPG") || p_bufferformat ==
moText(
"JPGNORMAL")) {
939 options = JPEG_QUALITYNORMAL;
940 thumbnailfilename+=
moText(
".jpg");
942 }
else if ( p_bufferformat ==
moText(
"JPGSUPERB") ) {
945 options = JPEG_QUALITYSUPERB;
946 thumbnailfilename+=
moText(
".jpg");
948 }
else if ( p_bufferformat ==
moText(
"JPGBAD") ) {
951 options = JPEG_QUALITYBAD;
952 thumbnailfilename+=
moText(
".jpg");
954 }
else if ( p_bufferformat ==
moText(
"JPGAVERAGE") ) {
957 options = JPEG_QUALITYAVERAGE;
958 thumbnailfilename+=
moText(
".jpg");
960 }
else if ( p_bufferformat ==
moText(
"JPGGOOD") ) {
963 options = JPEG_QUALITYGOOD;
964 thumbnailfilename+=
moText(
".jpg");
966 }
else if ( p_bufferformat ==
moText(
"TGA") ) {
970 thumbnailfilename+=
moText(
".tga");
972 }
else if ( p_bufferformat ==
moText(
"EXR") ) {
975 options = EXR_NONE | EXR_FLOAT;
976 thumbnailfilename+=
moText(
".exr");
978 gcomponenttype = GL_FLOAT;
980 bytesperpixel = 128/8;
983 }
else if ( p_bufferformat ==
moText(
"HDR") ) {
987 thumbnailfilename+=
moText(
".hdr");
988 }
else if ( p_bufferformat ==
moText(
"WEBP") ) {
992 thumbnailfilename+=
moText(
".webp");
994 }
else if ( p_bufferformat ==
moText(
"GIF") ) {
998 thumbnailfilename+=
moText(
".gif");
1000 }
else if ( p_bufferformat ==
moText(
"TIFF") ) {
1004 thumbnailfilename+=
moText(
".tif");
1006 }
else if ( p_bufferformat ==
moText(
"XPM") ) {
1010 thumbnailfilename+=
moText(
".xpm");
1012 }
else if ( p_bufferformat ==
moText(
"PFM") ) {
1016 thumbnailfilename+=
moText(
".pfm");
1018 }
else if ( p_bufferformat ==
moText(
"PBM") ) {
1022 thumbnailfilename+=
moText(
".pbm");
1024 }
else if ( p_bufferformat ==
moText(
"JXR") ) {
1028 thumbnailfilename+=
moText(
".jxr");
1030 }
else if ( p_bufferformat ==
moText(
"J2K") ) {
1034 thumbnailfilename+=
moText(
".j2k");
1036 }
else if ( p_bufferformat ==
moText(
"BMP") ) {
1040 thumbnailfilename+=
moText(
".bmp");
1043 pitch = bytesperpixel *
GetWidth();
1046 if (gcomponenttype==GL_UNSIGNED_BYTE)
1049 if (gcomponenttype==GL_FLOAT) {
1060 glGetTexImage( GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, (
void *)
m_pBufferData );
1065 MODebug2->
Error(
"moTexture::CreateThumbnail > no memory for buffer data allocation or invalid component type.");
1070 MODebug2->
Error(
"moTexture::CreateThumbnail > GetBuffer from texture " +
GetName()+
" failed.");
1089 fbitmap = FreeImage_ConvertFromRawBitsEx( TRUE, (BYTE*)
m_pBufferData,
1114 unsigned int fwidth = FreeImage_GetWidth(fbitmap);
1115 unsigned int fheight = FreeImage_GetHeight(fbitmap);
1116 unsigned int fpitch = FreeImage_GetPitch(fbitmap);
1117 unsigned int fbpp = FreeImage_GetBPP(fbitmap);
1123 MODebug2->
Error(
"moTexture::CreateThumbnail > freeimage width and height does not match texture wxh > fwidth:" +
IntToStr(fwidth) +
" fheight:" +
IntToStr(fheight) );
1128 MODebug2->
Error(
"moTexture::CreateThumbnail > freeimage bpp and pitch does not match texture > fpitch:" +
IntToStr(fpitch) +
" vs pitch:" +
IntToStr(pitch) +
" fbpp (bits per pixel):" +
IntToStr(bpp) +
" vs bpp:" +
IntToStr(bpp) );
1148 FIBITMAP* fbitmap2 = NULL;
1154 fbitmap2 = FreeImage_Copy( fbitmap, 0, 0, w, h);
1155 if (fbitmap2 && fbitmap) { FreeImage_Unload( fbitmap ); fbitmap=fbitmap2; }
1161 if (w!=(
int)
GetWidth() || h!=(int)
GetHeight()) fbitmap2 = FreeImage_Rescale( fbitmap, w, h, FILTER_BICUBIC );
1162 if (fbitmap2 && fbitmap) { FreeImage_Unload( fbitmap ); fbitmap=fbitmap2; }
1170 if (!FreeImage_Save( fif, fbitmap, thumbnailfilename, options )) {
1171 MODebug2->
Error(
"moTexture::CreateThumbnail > not saved to disc. thumbnailfilename: " + thumbnailfilename);
1174 if (fbitmap) { FreeImage_Unload( fbitmap ); }
1186 return thumbnailfilename;
1208 for( i = 0; i<256; i++)
Histogram[i] = 0;
1238 FreeImage_CloseMemory((FIMEMORY*)
hmem);
1243 hmem = FreeImage_OpenMemory();
1258 options = JPEG_QUALITYAVERAGE;
1312 if ( FreeImage_SaveToMemory( (FREE_IMAGE_FORMAT)
fif, (FIBITMAP *)p_bitmap, (FIMEMORY*)
hmem,
options ) ) {
1316 m_width = FreeImage_GetWidth((FIBITMAP *)p_bitmap);
1317 m_height = FreeImage_GetHeight((FIBITMAP *)p_bitmap);
1321 if (FreeImage_GetHistogram( (FIBITMAP *)p_bitmap, (DWORD*)
Histogram, FICC_BLACK )) {
1327 for(
int ih=0; ih <256; ih++) {
1328 Total+= Histogram[ih];
1356 for(
int ih=0; ih <256; ih++) {
1360 Totals[zone]+= Histogram[ih];
1364 for(
int z=0;z<5;z++) {
1365 if (Totals[z]>0)
Contrast+= Group[z] / Totals[z];
1394 FreeImage_TellMemory((FIMEMORY*)
hmem);
1395 FreeImage_SeekMemory( (FIMEMORY*)hmem, 0L, SEEK_SET);
1400 pImage = FreeImage_LoadFromMemory( (FREE_IMAGE_FORMAT)
fif, (FIMEMORY*)hmem, 0);
1402 switch (FreeImage_GetBPP(pImage))
1413 if (FreeImage_GetBlueMask(pImage) == 0x000000FF)
_format = GL_BGR;
1426 if (FreeImage_GetBlueMask(pImage) == 0x000000FF)
_format = GL_BGRA_EXT;
1445 return (
MOubyte*)FreeImage_GetBits(pImage);
1452 FreeImage_Unload( (FIBITMAP*)p_bitmap );
1465 FreeImage_Unload( pImage );
1482 if (p_bitmap != NULL)
1507 glGenTextures(1, &
m_glid);
1513 }
else MODebug2->
Push(
moText(
"moTextureMemory::GetReference no bitmap in memory ") );
1515 }
else MODebug2->
Error(
moText(
"moTextureMemory::GetReference Error: object not initialized") );
1526 glDeleteTextures(1,&
m_glid);
1536 FreeImage_CloseMemory( (FIMEMORY*)
hmem );
1542 fif = (int)FIF_UNKNOWN;
1661 moTextArray copy_filter_0;
1662 copy_filter_0.Add(
moText( this->
m_name+
" shaders/Copy.cfg "+this->
m_name+
"copyStart") );
1671 moTextArray copy_filter_0;
1672 copy_filter_0.Add(
moText( this->
m_name+
" shaders/Copy.cfg "+this->
m_name+
"copyEnd") );
1681 moTextArray copy_filter_0;
1682 copy_filter_0.Add(
moText( this->
m_name+
"copyStart "+this->
m_name+
"copyEnd shaders/TexInterpolator.cfg "+this->
m_name+
"") );
1903 PeliV = fmod( (
float)p_cycle, (
float)1.0 );
1975 moText begin = p_filename;
1977 return !stricmp(begin,
"multiple");
1983 return Load(pValue);
1993 for (
int i = 0; i < nframes; i++)
2087 #ifdef MO_DIRECTSHOW 2182 switch(stream_state) {
2199 return stream_state;
2288 moFile FileName(p_filename);
2290 return (!stricmp(extension,
".avi") ||
2291 !stricmp(extension,
".mov") ||
2292 !stricmp(extension,
".mpg") ||
2293 !stricmp(extension,
".mp4")||
2294 !stricmp(extension,
".ogg") ||
2295 !stricmp(extension,
".ogm") ||
2296 !stricmp(extension,
".ogv") ||
2297 !stricmp(extension,
".webm") ||
2298 !stricmp(extension,
".web") ||
2299 !stricmp(extension,
".mpv") ||
2300 !stricmp(extension,
".mkv") ||
2301 !stricmp(extension,
".m2v"));
2308 bool quicktime =
false;
2310 extension = p_filename;
2313 if (extension==
moText(
"mov")) quicktime =
true;
2365 return Load( pValue );
virtual moStreamState State()
virtual void Seek(long frame, float rate=1.0)
MOboolean Initialized()
Pregunta si está inicializado.
Parámetros internos de una textura.
moFile * GetFile(moText p_FileName)
virtual MOboolean LoadFromBitmap(moBitmap *p_bitmap)
Guarda el bitmap con el formato elegido en memoria.
virtual void SetInterpolation(MOuint p_FrameJump, MOuint p_InterpolationTime)
static void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
moVideoFormat GetVideoFormat()
Devuelve el formato de video.
void Error(moText p_text)
Anuncia y registra un error.
virtual MOboolean Finish()
virtual MOulong GetPosition()
bool DestroyRetreivedBucket()
MOboolean m_bBuildedFromFile
MOuint SetFBOandAttachPoint(moFBO *p_fbo)
virtual void GetFrame(MOuint p_i)
moValueBase & GetSubValue(MOint p_indexsubvalue=0)
moTextureFilter * m_pCopyStart
void GetFrame(MOuint p_i)
virtual ~moTextureMemory()
void CalculateSize(MOuint p_width, MOuint p_height)
MOboolean BuildFromBuffer(MOuint p_width, MOuint p_height, const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
virtual moPlayMode GetPlayMode()
virtual MOboolean Finish()
void GetFrame(MOuint p_i)
moTextureFilter * Get(MOuint p_idx)
virtual ~moTextureAnimated()
moDefineDynamicArray(moTextureArray) moTexture
virtual MOboolean Finish()
LIBMOLDEO_API moText0 FloatToStr(double a)
moRenderManager * GetRenderMan()
virtual void SetVolume(float volume)
moResourceManager * m_pResourceManager
virtual MOboolean BuildFromMemory()
Construye la textura opengl desde el bitmap en memoria.
MOboolean IsTextureNonPowerOf2Disabled() const
MOboolean Load(moParam *p_param)
MOuint GetDataWidth() const
MOfloat m_fFramesPerSecond
bool Unlock()
Libera el acceso al buffer interno.
const moTexParam MODefTex2DParams
Parámetros internos predeterminados de una textura.
MOboolean BuildEmpty(MOuint p_width, MOuint p_height)
moTextureFilterIndex * GetTextureFilterIndex()
MOboolean LoadMovieFile(moText p_filename)
virtual void SetContrast(float contrast)
bool Lock()
Paraliza el acceso al buffer interno.
virtual MOboolean Init()
Inicializa el objeto.
MOboolean MipMapTexture(GLint p_min_filter)
virtual void SetSaturation(float saturation)
moText GetExtension()
Get absolute path and filename "/D/PP/myFileName.txt".
const moTextFilterParam & GetTextFilterParam()
MOboolean CheckErrors(moText p_location)
moFileManager * m_pFileMan
void Apply(MOuint p_i, MOfloat p_fade, const moTextFilterParam &p_params)
virtual void SetBalance(float balance)
virtual void SetVolume(float volume)=0
Fija el nivel de volumen.
moShaderManager * GetShaderMan()
MOint ScreenHeight() const
void FlipBufferVert(MOubyte *pBuffer, MOint p_depth)
void SetTextureCount(MOuint p_tex_count)
moShader * m_pShaderInterpolate
void AddFrame(moTexture *p_texture)
moText CreateThumbnail(moText p_bufferformat, int w, int h, moText newfilename=moText(""))
MOboolean m_bInterpolating
clase de para manejar textos
void SetFBOAttachPoint(MOuint p_fbo_attach_point)
MOuint GetDataHeight() const
virtual MOboolean ActivateInterpolation(MOboolean activate=true)
virtual MOulong GetPosition()=0
La posición del stream en cuadros.
Grafo de reproducción de video.
moDWord Histogram[256]
Histogram.
MOint ScreenWidth() const
void Unload(moBitmap *p_bitmap)
void SetFBO(moFBO *p_fbo)
void Log(moText p_text)
Escribe un mensaje en el archivo de registro (log)
virtual MOboolean NeedsInterpolation()
virtual void SetFrameCount(MOuint p_nframes)
MOuint AddTexture(MOuint p_width, MOuint p_height, const moTexParam &p_param, MOuint p_glid, MOuint &p_attach_point)
virtual MOulong GetFramesLength()=0
La cantidad de frames, el largo del stream.
MOboolean SupportedFile(moText p_filename)
virtual moStreamState GetState()
Estado de la reproducción.
virtual void SetSaturation(float saturation)=0
virtual bool BuildLiveVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
Grafo de reproducción de video en modo vivo, asyncronicamente reproducido en función del clock...
MOboolean SupportedFile(moText p_filename)
virtual MOboolean Finish()
MOboolean GetBuffer(GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
moFileManager * GetFileMan()
void SetName(moText p_name)
virtual MOint Interpolate()
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
static MOuint NextPowerOf2(MOuint p_seed)
MOboolean ValidTexture(MOuint p_i)
moBitmap * LoadFromMemory()
clase base para el manejo de una textura
moText GetCompletePath()
Get inmediate folder name: return "PP" for "PP/myFileName.txt".
Administrador de recursos.
virtual void SetPlayMode(moPlayMode playmode)
MOuint m_fbo_attach_point
MOfloat m_InterpolationPosition
void EmptyBucket()
Libera el espacio de memoria.
MOuint m_InterpolationTime
virtual MOuint GetActualFrame()
bool CalculateLuminanceAndConstrast(int x0=0, int y0=0, int x1=0, int y1=0)
virtual void Stop()=0
Detener la reproducción del video.
void SetFrame(MOuint p_i, moTexture *p_texture)
virtual MOboolean IsInterpolating()
Clase que implementa un administrador de shaders.
virtual void Play()=0
Reproducir el video.
static moDebug * MODebug2
Clase de impresión de errores para depuración.
virtual void SetContrast(float contrast)=0
virtual bool BuildLiveQTVideoGraph(moText filename, moBucketsPool *pBucketsPool)=0
moTexture & operator=(const moTexture &p_src_tex)
moDataManager * GetDataMan()
MOboolean m_bBitmapInMemory
MOboolean Load(moText p_FileName, MOboolean bWaitForDownload=false)
moTextureFilter * m_pCopyEnd
MOboolean BuildFromFile(moText p_filename)
moTexParam GetTexParam() const
virtual void SetHue(float hue)=0
Espacio en memoria para compartir datos entre objetos.
void Push(moText p_text)
Apila el mensaje dentro de la pila de mensajes.
virtual void SetHue(float hue)
moValue & GetValue(MOint i=-1)
MOuint LoadFilters(moParam *p_param)
MOboolean Load(moParam *p_param)
MOboolean Load(moParam *p_param)
MOint Luminance
average luminance
virtual void SetFramesPerSecond(MOfloat p_fps)
bool IsPowerOfTwo(int iValue)
MOboolean SupportedFile(moText p_filename)
virtual void SetBrightness(float brightness)
moTextureFilter * m_pInterpolator
void CopyFromTex(moTexture *p_src_tex, MOboolean p_copy_glid, MOboolean p_copy_moid, MOboolean p_copy_type, MOboolean p_copy_name)
LIBMOLDEO_API moText0 IntToStr(int a)
MOboolean m_bInterpolation
moTextureArray m_textures_array
MOubyte * GetBuffer()
Devuelve el puntero al buffer de datos.
MOboolean Reload(bool force_kill=true)
moBucket * RetreiveBucket()
virtual bool InitGraph()=0
Inicialización del grafo.
virtual MOboolean Finish()
virtual MOboolean BuildFromBitmap(moBitmap *p_bitmap, moText p_bufferformat="JPG")
Guarda el bitmap con el formato elegido en memoria, luego construye la textura opengl.
virtual void SetBalance(float balance)=0
Fija el balance entre canal izquierdo y derecho en caso de haberlos.
MOuint GetSubValueCount()
MOboolean RectTexture(GLenum p_target) const
virtual MObyte * GetFrameBuffer(MOlong *size)=0
Puntero al frame buffer.
moBucketsPool m_BucketsPool
una textura asociada a una animación de cuadros
static void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char *message)
MOboolean m_bInitialized
Valor de inicialización.
virtual void Seek(MOuint frame, float rate=1.0)=0
Busca y posiciona.
bool ResetBufferData(bool force_creation=false, int bytes_per_pixel=0)
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
MOint Contrast
average contrast
virtual void Pause()=0
Pausa la reproducción del video.
moDataManager * m_pDataMan
virtual MOboolean IsInterpolationActive()
MOboolean SetBuffer(const GLvoid *p_buffer, GLenum p_format=GL_RGBA, GLenum p_type=GL_UNSIGNED_BYTE)
MOulong moGetTicks()
Devuelve en milisegundos el valor del reloj de Moldeo.