- 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:
Santi Noreña 2013-02-04 18:00:17 +01:00
parent c9adfd020b
commit e85d191b46
3100 changed files with 775434 additions and 3073 deletions

View file

@ -0,0 +1,33 @@
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
AM_CPPFLAGS = -I$(top_srcdir)/src @GEM_EXTERNAL_CPPFLAGS@
pkglib_LTLIBRARIES=
gemhelpdir=$(pkglibdir)
dist_gemhelp_DATA =
pkglib_LTLIBRARIES+=gem_videoTEST.la
dist_gemhelp_DATA +=test-videoplugin.pd
gem_videoTEST_la_CXXFLAGS =
gem_videoTEST_la_LDFLAGS = -module -avoid-version -shared
if WINDOWS
gem_videoTEST_la_LDFLAGS += -no-undefined
endif
gem_videoTEST_la_LIBADD =
# RTE
gem_videoTEST_la_CXXFLAGS += @GEM_RTE_CFLAGS@ @GEM_ARCH_CXXFLAGS@
gem_videoTEST_la_LDFLAGS += @GEM_RTE_LIBS@ @GEM_ARCH_LDFLAGS@
# flags for building Gem externals
gem_videoTEST_la_CXXFLAGS += @GEM_EXTERNAL_CFLAGS@
gem_videoTEST_la_LIBADD += -L$(top_builddir) @GEM_EXTERNAL_LIBS@
# gem_videoTEST_la @MOREFLAGS@
# convenience symlinks
include $(srcdir)/../symlink_ltlib.mk
### SOURCES
gem_videoTEST_la_SOURCES= videoTEST.cpp videoTEST.h

View file

@ -0,0 +1,2 @@
#N canvas 8 49 505 112 10;
#X text 89 47 Nothing special about this backend...;

View file

@ -0,0 +1,168 @@
#include "videoTEST.h"
#include "plugins/PluginFactory.h"
using namespace gem::plugins;
REGISTER_VIDEOFACTORY("test", videoTEST);
static double getRandom(void) {
static unsigned int random_nextseed = 1489853723;
random_nextseed = random_nextseed * 435898247 + 938284281;
return random_nextseed * (1./4294967296.);;
}
videoTEST::videoTEST(void) :
m_name(std::string("test")),
m_open(false),
m_type(0)
{
m_pixBlock.image.xsize = 64;
m_pixBlock.image.ysize = 64;
m_pixBlock.image.setCsizeByFormat(GL_RGBA);
m_pixBlock.image.reallocate();
}
videoTEST::~videoTEST(void) {
}
bool videoTEST::open(gem::Properties&props) {
setProperties(props);
return (m_open);
}
static void setNoise(unsigned char*data, unsigned int count) {
unsigned int i=0;
for(i=0; i<count;i++) {
*data++=(255*getRandom());
*data++=(255*getRandom());
*data++=(255*getRandom());
*data++=255;
}
}
static void setRed(unsigned char*data, unsigned int count) {
unsigned int i=0;
for(i=0; i<count;i++) {
data[chRed]=255;
data[chGreen]=0;
data[chBlue]=0;
data[chAlpha]=255;
data+=4;
}
}
static void setGreen(unsigned char*data, unsigned int count) {
unsigned int i=0;
for(i=0; i<count;i++) {
data[chRed]=0;
data[chGreen]=255;
data[chBlue]=0;
data[chAlpha]=255;
data+=4;
}
}
static void setBlue(unsigned char*data, unsigned int count) {
unsigned int i=0;
for(i=0; i<count;i++) {
data[chRed]=0;
data[chGreen]=0;
data[chBlue]=255;
data[chAlpha]=255;
data+=4;
}
}
pixBlock*videoTEST::getFrame(void) {
m_pixBlock.image.setCsizeByFormat(GL_RGBA);
m_pixBlock.image.reallocate();
const unsigned int count = m_pixBlock.image.xsize * m_pixBlock.image.ysize;
unsigned int i=0;
unsigned char*data=m_pixBlock.image.data;
switch(m_type) {
case 1: setRed(data, count); break;
case 2: setGreen(data, count); break;
case 3: setBlue(data, count); break;
default: setNoise(data, count); break;
}
m_pixBlock.newimage = true;
return &m_pixBlock;
}
std::vector<std::string>videoTEST::enumerate(void) {
std::vector<std::string>result;
result.push_back("test");
return result;
}
bool videoTEST::setDevice(int ID) {
m_open=(0==ID);
return m_open;
}
bool videoTEST::setDevice(std::string device) {
m_open=("test"==device);
return m_open;
}
bool videoTEST::enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
readable.clear();
writeable.clear();
writeable.set("width", 64); readable.set("width", 64);
writeable.set("height", 64); readable.set("height", 64);
writeable.set("type", std::string("noise"));
return true;
}
void videoTEST::setProperties(gem::Properties&props) {
m_props=props;
double d;
if(props.get("width", d)) {
if(d>0)
m_pixBlock.image.xsize = d;
}
if(props.get("height", d)) {
if(d>0)
m_pixBlock.image.ysize = d;
}
std::string s;
if(props.get("type", s)) {
if("noise"==s)
m_type=0;
else if("red"==s)
m_type=1;
else if("green"==s)
m_type=2;
else if("blue"==s)
m_type=3;
}
}
void videoTEST::getProperties(gem::Properties&props) {
std::vector<std::string>keys=props.keys();
unsigned int i;
for(i=0; i<keys.size(); i++) {
if("width"==keys[i]) {
props.set(keys[i], m_pixBlock.image.xsize);
}
if("height"==keys[i]) {
props.set(keys[i], m_pixBlock.image.ysize);
}
}
}
std::vector<std::string>videoTEST::dialogs(void) {
std::vector<std::string>result;
return result;
}
bool videoTEST::provides(const std::string name) {
return (name==m_name);
}
std::vector<std::string>videoTEST::provides(void) {
std::vector<std::string>result;
result.push_back(m_name);
return result;
}
const std::string videoTEST::getName(void) {
return m_name;
}

View file

@ -0,0 +1,57 @@
#ifndef _INCLUDE_GEMPLUGIN__VIDEOTEST_VIDEOTEST_H_
#define _INCLUDE_GEMPLUGIN__VIDEOTEST_VIDEOTEST_H_
#include "plugins/video.h"
#include "Gem/Image.h"
namespace gem { namespace plugins {
class GEM_EXPORT videoTEST : public video {
private:
std::string m_name;
bool m_open;
pixBlock m_pixBlock;
Properties m_props;
unsigned int m_type;
public:
videoTEST(void);
virtual ~videoTEST(void);
virtual bool open(gem::Properties&props);
virtual pixBlock *getFrame(void);
virtual std::vector<std::string>enumerate(void);
virtual bool setDevice(int ID);
virtual bool setDevice(const std::string);
virtual bool enumProperties(gem::Properties&readable,
gem::Properties&writeable);
virtual void setProperties(gem::Properties&props);
virtual void getProperties(gem::Properties&props);
virtual std::vector<std::string>dialogs(void);
// for pix_video: query whether this backend provides access to this class of devices
// (e.g. "dv")
virtual bool provides(const std::string);
// get a list of all provided devices
virtual std::vector<std::string>provides(void);
// get's the name of the backend (e.g. "v4l")
virtual const std::string getName(void);
virtual bool isThreadable(void) {return true;}
virtual bool reset(void) {return true;}
virtual void releaseFrame(void) {}
virtual bool grabAsynchronous(bool) {return true;}
virtual bool dialog(std::vector<std::string>names=std::vector<std::string>()) {return false;}
virtual bool setColor(int) {return false;}
virtual void close(void) {};
virtual bool start(void) {return true;};
virtual bool stop(void) {return true;};
};
};}; // namespace
#endif // for header file

View file

@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "videoTEST", "videoTEST.vcproj", "{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Release = Release
ReleaseDummy = ReleaseDummy
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.Release.ActiveCfg = Release|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.Release.Build.0 = Release|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.ReleaseDummy.ActiveCfg = ReleaseDummy|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.ReleaseDummy.Build.0 = ReleaseDummy|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="videoTEST"
ProjectGUID="{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}"
RootNamespace="gem"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)"
IntermediateDirectory="$(ProjectDir)/$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="2"
FavorSizeOrSpeed="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\src&quot;;&quot;$(ProjectDir)\..\..\src&quot;;&quot;$(ProjectDir)\..\..\..\..\pd\src&quot;;&quot;$(ProgramFiles)\pd\src&quot;"
PreprocessorDefinitions="HAVE_TEST_H;NT;WIN32;_WINDOWS;__WIN32__;_LANGUAGE_C_PLUS_PLUS;WIN32_LEAN_AND_MEAN"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="0"
DefaultCharIsUnsigned="FALSE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="Gem.lib pd.lib vfw32.lib OLDNAMES.lib libcpmt.lib msvcrt.lib msvcprt.lib"
OutputFile="$(OutDir)/gem_$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)\..\..\build\win-vs2003&quot;;&quot;$(ProjectDir)\..\..\..\..\pd\bin&quot;;&quot;$(ProgramFiles)\pd\bin&quot;"
ProgramDatabaseFile="$(ProjectDir)/$(ProjectName).pdb"
ImportLibrary="$(ProjectDir)/$(TargetName).lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\./gem.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="ReleaseDummy|Win32"
OutputDirectory="$(SolutionDir)"
IntermediateDirectory="$(ProjectDir)/$(ConfigurationName)"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="2"
FavorSizeOrSpeed="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\src&quot;;&quot;$(ProjectDir)\..\..\src&quot;;&quot;$(ProjectDir)\..\..\..\..\pd\src&quot;;&quot;$(ProgramFiles)\pd\src&quot;"
PreprocessorDefinitions="NT;WIN32;_WINDOWS;__WIN32__;_LANGUAGE_C_PLUS_PLUS;WIN32_LEAN_AND_MEAN"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
EnableEnhancedInstructionSet="0"
DefaultCharIsUnsigned="FALSE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="Gem.lib pd.lib vfw32.lib OLDNAMES.lib"
OutputFile="$(OutDir)/gem_$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)\..\..\build\win-vs2003&quot;;&quot;$(ProjectDir)\..\..\..\..\pd\bin&quot;;&quot;$(ProgramFiles)\pd\bin&quot;"
ProgramDatabaseFile="$(ProjectDir)/$(ProjectName).pdb"
ImportLibrary="$(ProjectDir)/$(TargetName).lib"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\./gem.tlb"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\videoTEST.cpp">
</File>
<File
RelativePath="..\videoTEST.h">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "videoTEST", "videoTEST.vcproj", "{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Release = Release
ReleaseDummy = ReleaseDummy
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.Release.ActiveCfg = Release|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.Release.Build.0 = Release|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.ReleaseDummy.ActiveCfg = ReleaseDummy|Win32
{FF21A158-2BDE-483F-85C3-80C9DF0A0ABC}.ReleaseDummy.Build.0 = ReleaseDummy|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="videoTEST"
ProjectGUID="{AEFA779E-A699-4C47-8406-FBEED28AACF1}"
RootNamespace="gem"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\..\..\build\win-vs2008\plugin.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\./gem.tlb"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="HAVE_TEST_H"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="ReleaseDummy|Win32"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops;..\..\..\build\win-vs2008\plugin.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\./gem.tlb"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalLibraryDirectories=""
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\videoTEST.cpp"
>
</File>
<File
RelativePath="..\videoTEST.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>