- Reestructuración de ficheros y directorios general
- merge v0.01 --> Añadido fileselector - Añadidas fuentes de Gem y Pure Data - pix2jpg incluído en Gem. Archivos de construcción de Gem modificados. - Añadido fichero ompiling.txt con instrucciones de compilación
This commit is contained in:
parent
c9adfd020b
commit
e85d191b46
3100 changed files with 775434 additions and 3073 deletions
32
Gem/plugins/filmTEST/Makefile.am
Normal file
32
Gem/plugins/filmTEST/Makefile.am
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src @GEM_EXTERNAL_CPPFLAGS@
|
||||
|
||||
pkglib_LTLIBRARIES= gem_filmTEST.la
|
||||
|
||||
gem_filmTEST_la_CXXFLAGS =
|
||||
gem_filmTEST_la_LDFLAGS = -module -avoid-version -shared
|
||||
if WINDOWS
|
||||
gem_filmTEST_la_LDFLAGS += -no-undefined
|
||||
endif
|
||||
gem_filmTEST_la_LIBADD =
|
||||
|
||||
# RTE
|
||||
gem_filmTEST_la_CXXFLAGS += @GEM_RTE_CFLAGS@ @GEM_ARCH_CXXFLAGS@
|
||||
gem_filmTEST_la_LDFLAGS += @GEM_RTE_LIBS@ @GEM_ARCH_LDFLAGS@
|
||||
# flags for building Gem externals
|
||||
gem_filmTEST_la_CXXFLAGS += @GEM_EXTERNAL_CFLAGS@
|
||||
gem_filmTEST_la_LIBADD += -L$(top_builddir) @GEM_EXTERNAL_LIBS@
|
||||
# gem_filmTEST_la @MOREFLAGS@
|
||||
|
||||
# Dependencies
|
||||
gem_filmTEST_la_CXXFLAGS +=
|
||||
gem_filmTEST_la_LIBADD +=
|
||||
|
||||
# convenience symlinks
|
||||
include $(srcdir)/../symlink_ltlib.mk
|
||||
|
||||
|
||||
### SOURCES
|
||||
gem_filmTEST_la_SOURCES= filmTEST.cpp filmTEST.h
|
||||
|
121
Gem/plugins/filmTEST/filmTEST.cpp
Normal file
121
Gem/plugins/filmTEST/filmTEST.cpp
Normal file
|
@ -0,0 +1,121 @@
|
|||
////////////////////////////////////////////////////////
|
||||
//
|
||||
// GEM - Graphics Environment for Multimedia
|
||||
//
|
||||
// zmoelnig@iem.kug.ac.at
|
||||
//
|
||||
// Implementation file
|
||||
//
|
||||
// Copyright (c) 1997-1999 Mark Danks.
|
||||
// Copyright (c) Günther Geiger.
|
||||
// Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
|
||||
// For information on usage and redistribution, and for a DISCLAIMER OF ALL
|
||||
// WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "filmTEST.h"
|
||||
#include "plugins/PluginFactory.h"
|
||||
#include "Gem/RTE.h"
|
||||
#include "Gem/Properties.h"
|
||||
|
||||
using namespace gem::plugins;
|
||||
|
||||
REGISTER_FILMFACTORY("test", filmTEST);
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
//
|
||||
// filmTEST
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
filmTEST :: filmTEST(void)
|
||||
{
|
||||
m_image.image.setCsizeByFormat(GL_RGBA);
|
||||
m_image.image.xsize=320;
|
||||
m_image.image.ysize=240;
|
||||
m_image.image.reallocate();
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// really open the file ! (OS dependent)
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
bool filmTEST :: open(const std::string filename, const gem::Properties&wantProps)
|
||||
{
|
||||
m_numFrames=100;
|
||||
m_fps=20;
|
||||
|
||||
changeImage(0,0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void filmTEST::close(void) {}
|
||||
bool filmTEST::isThreadable(void) {return true;}
|
||||
|
||||
void filmTEST::setProperties(gem::Properties&props) {
|
||||
}
|
||||
|
||||
void filmTEST::getProperties(gem::Properties&props) {
|
||||
std::vector<std::string> keys=props.keys();
|
||||
unsigned int i=0;
|
||||
for(i=0; i<keys.size(); i++) {
|
||||
std::string key=keys[i];
|
||||
props.erase(key);
|
||||
#define SETPROP(k, v) } else if(k == key) { double d=(double)v; props.set(key, v)
|
||||
if(""==key) {
|
||||
SETPROP("fps", m_fps);
|
||||
SETPROP("frames", m_numFrames);
|
||||
SETPROP("width", m_image.image.xsize);
|
||||
SETPROP("height", m_image.image.ysize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
// render
|
||||
//
|
||||
/////////////////////////////////////////////////////////
|
||||
pixBlock* filmTEST :: getFrame(){
|
||||
return &m_image;
|
||||
}
|
||||
|
||||
film::errCode filmTEST :: changeImage(int imgNum, int trackNum){
|
||||
unsigned char*data=m_image.image.data;
|
||||
unsigned int size=m_image.image.xsize*m_image.image.ysize*m_image.image.csize;
|
||||
|
||||
unsigned char value=(unsigned char)imgNum;
|
||||
|
||||
while(size-->0) {
|
||||
*data++=value;
|
||||
value++;
|
||||
}
|
||||
|
||||
m_image.newimage=true;
|
||||
|
||||
return film::SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
bool filmTEST::enumProperties(gem::Properties&readprops, gem::Properties&writeprops) {
|
||||
readprops.clear();
|
||||
writeprops.clear();
|
||||
|
||||
double d=0;
|
||||
|
||||
readprops.set("width", d);
|
||||
readprops.set("height", d);
|
||||
readprops.set("fps", d);
|
||||
readprops.set("frames", d);
|
||||
|
||||
return true;
|
||||
}
|
69
Gem/plugins/filmTEST/filmTEST.h
Normal file
69
Gem/plugins/filmTEST/filmTEST.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*-----------------------------------------------------------------
|
||||
|
||||
GEM - Graphics Environment for Multimedia
|
||||
|
||||
Load an digital video (like AVI, Mpeg, Quicktime) into a pix block (Linux)
|
||||
|
||||
Copyright (c) 1997-1999 Mark Danks. mark@danks.org
|
||||
Copyright (c) Günther Geiger. geiger@epy.co.at
|
||||
Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
|
||||
For information on usage and redistribution, and for a DISCLAIMER OF ALL
|
||||
WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
|
||||
|
||||
|
||||
-----------------------------------------------------------------*/
|
||||
|
||||
#ifndef _INCLUDE_GEMPLUGIN__FILMTEST_FILMTEST_H_
|
||||
#define _INCLUDE_GEMPLUGIN__FILMTEST_FILMTEST_H_
|
||||
#include "plugins/film.h"
|
||||
#include "Gem/Image.h"
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
-------------------------------------------------------------------
|
||||
CLASS
|
||||
filmTEST
|
||||
|
||||
Loads in a film
|
||||
|
||||
KEYWORDS
|
||||
pix
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
-----------------------------------------------------------------*/
|
||||
namespace gem { namespace plugins {
|
||||
class GEM_EXPORT filmTEST : public film {
|
||||
public:
|
||||
|
||||
//////////
|
||||
// Constructor
|
||||
filmTEST(void);
|
||||
|
||||
//////////
|
||||
// open a movie up
|
||||
virtual bool open(const std::string filename, const gem::Properties&);
|
||||
|
||||
virtual void close(void);
|
||||
|
||||
//////////
|
||||
// get the next frame
|
||||
virtual pixBlock* getFrame(void);
|
||||
|
||||
//////////
|
||||
// set the next frame to read;
|
||||
virtual errCode changeImage(int imgNum, int trackNum = -1);
|
||||
|
||||
virtual bool enumProperties(gem::Properties&readprops, gem::Properties&writeprops);
|
||||
|
||||
virtual void getProperties(gem::Properties&props);
|
||||
virtual void setProperties(gem::Properties&props);
|
||||
|
||||
virtual bool isThreadable(void);
|
||||
|
||||
//-----------------------------------
|
||||
pixBlock m_image;
|
||||
double m_fps;
|
||||
unsigned int m_numFrames;
|
||||
};};};
|
||||
|
||||
#endif // for header file
|
Loading…
Add table
Add a link
Reference in a new issue