...
 
Commits (21)
php
html/*
attic/*
/.project
/.cproject
/.pydevproject
/.externalToolBuilders
/.settings
.directory
generated*
sysroots
bitbake-logs
all_sources.lst
excluding.lst
including.lst
doxygen.tag
/image
/scripts
/html
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1785128059">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1785128059" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings />
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser" />
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser" />
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser" />
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1785128059" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1785128059.1698506499" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1361950007" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
<option id="cdt.managedbuild.option.gnu.cross.prefix.1643856183" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" />
<option id="cdt.managedbuild.option.gnu.cross.path.1554576622" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" />
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.398085647" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross" />
<builder arguments="php" command="${workspace_loc:/elphel-apps-php-extension/scripts/run_bitbake.sh}" enableCleanBuild="false" id="cdt.managedbuild.builder.gnu.cross.1296064386" incrementalBuildTarget="-c compile -f" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross" />
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.2029818847" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<option id="gnu.c.compiler.option.include.paths.861510255" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/php/main}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/sysroots/elphel393/usr/include-uapi}&quot;" />
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.419446190" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="ZEND_DEBUG=0" />
<listOptionValue builtIn="false" value="HAVE_JSON=1" />
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2080288843" superClass="cdt.managedbuild.tool.gnu.c.compiler.input" />
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1055849866" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<option id="gnu.cpp.compiler.option.include.paths.1048628822" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/php/main}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/sysroots/elphel393/usr/include-uapi}&quot;" />
</option>
<option id="gnu.cpp.compiler.option.preprocessor.def.779602450" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="ZEND_DEBUG=0" />
<listOptionValue builtIn="false" value="HAVE_JSON=1" />
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.2055376927" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input" />
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.2089628270" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker" />
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.921075502" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.524189337" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)" />
<additionalInput kind="additionalinput" paths="$(LIBS)" />
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.93002962" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver" />
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1691525308" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.1376284756" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/php/main}&quot;" />
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/elphel-apps-php-extension/sysroots/elphel393/usr/include-uapi}&quot;" />
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.631069107" superClass="cdt.managedbuild.tool.gnu.assembler.input" />
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="TSRM/tsrm_nw.c|TSRM/tsrm_win32.c|Zend/zend_static_allocator.c|ext/bcmath/|ext/calendar/|ext/com_dotnet/|ext/dba/|ext/elphel/include/|ext/enchant/|ext/ereg/regex/debug.c|ext/ereg/regex/main.c|ext/ereg/regex/split.c|ext/fileinfo/libmagic/elfclass.h|ext/fileinfo/libmagic/names.h|ext/fileinfo/libmagic/strcasestr.c|ext/ftp/|ext/gd/|ext/gmp/|ext/interbase/|ext/intl/|ext/ldap/|ext/mbstring/libmbfl/tests/|ext/mbstring/oniguruma/enc/cp1251.c|ext/mbstring/oniguruma/enc/gb18030.c|ext/mbstring/oniguruma/enc/mktable.c|ext/mbstring/oniguruma/onigposix.h|ext/mbstring/oniguruma/regposerr.c|ext/mbstring/oniguruma/regposix.c|ext/mbstring/oniguruma/testc.c|ext/mbstring/oniguruma/testu.c|ext/mbstring/oniguruma/win32/|ext/mbstring/ucgendat/|ext/mssql/|ext/mysql/mysql_mysqlnd.h|ext/mysqli/mysqli_embedded.c|ext/mysqli/mysqli_mysqlnd.h|ext/mysqlnd/config-win.h|ext/mysqlnd/mysqlnd.c|ext/mysqlnd/mysqlnd.h|ext/mysqlnd/mysqlnd_alloc.c|ext/mysqlnd/mysqlnd_alloc.h|ext/mysqlnd/mysqlnd_auth.c|ext/mysqlnd/mysqlnd_block_alloc.c|ext/mysqlnd/mysqlnd_block_alloc.h|ext/mysqlnd/mysqlnd_bt.c|ext/mysqlnd/mysqlnd_charset.c|ext/mysqlnd/mysqlnd_charset.h|ext/mysqlnd/mysqlnd_debug.c|ext/mysqlnd/mysqlnd_debug.h|ext/mysqlnd/mysqlnd_driver.c|ext/mysqlnd/mysqlnd_enum_n_def.h|ext/mysqlnd/mysqlnd_ext_plugin.c|ext/mysqlnd/mysqlnd_ext_plugin.h|ext/mysqlnd/mysqlnd_libmysql_compat.h|ext/mysqlnd/mysqlnd_loaddata.c|ext/mysqlnd/mysqlnd_net.c|ext/mysqlnd/mysqlnd_net.h|ext/mysqlnd/mysqlnd_plugin.c|ext/mysqlnd/mysqlnd_portability.h|ext/mysqlnd/mysqlnd_priv.h|ext/mysqlnd/mysqlnd_ps.c|ext/mysqlnd/mysqlnd_ps_codec.c|ext/mysqlnd/mysqlnd_result.c|ext/mysqlnd/mysqlnd_result.h|ext/mysqlnd/mysqlnd_result_meta.c|ext/mysqlnd/mysqlnd_result_meta.h|ext/mysqlnd/mysqlnd_reverse_api.c|ext/mysqlnd/mysqlnd_reverse_api.h|ext/mysqlnd/mysqlnd_statistics.c|ext/mysqlnd/mysqlnd_statistics.h|ext/mysqlnd/mysqlnd_structs.h|ext/mysqlnd/mysqlnd_wireprotocol.c|ext/mysqlnd/mysqlnd_wireprotocol.h|ext/mysqlnd/php_mysqlnd.c|ext/mysqlnd/php_mysqlnd.h|ext/oci8/|ext/odbc/|ext/opcache/|ext/openssl/|ext/pcre/pcrelib/dftables.c|ext/pcre/pcrelib/pcredemo.c|ext/pcre/pcrelib/pcreposix.c|ext/pcre/pcrelib/sljit/sljitNativeARM_64.c|ext/pcre/pcrelib/sljit/sljitNativeARM_T2_32.c|ext/pcre/pcrelib/sljit/sljitNativeMIPS_32.c|ext/pcre/pcrelib/sljit/sljitNativeMIPS_64.c|ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c|ext/pcre/pcrelib/sljit/sljitNativePPC_32.c|ext/pcre/pcrelib/sljit/sljitNativePPC_64.c|ext/pcre/pcrelib/sljit/sljitNativePPC_common.c|ext/pcre/pcrelib/sljit/sljitNativeSPARC_32.c|ext/pcre/pcrelib/sljit/sljitNativeSPARC_common.c|ext/pcre/pcrelib/sljit/sljitNativeTILEGX-encoder.c|ext/pcre/pcrelib/sljit/sljitNativeTILEGX_64.c|ext/pcre/pcrelib/sljit/sljitNativeX86_32.c|ext/pcre/pcrelib/sljit/sljitNativeX86_64.c|ext/pcre/pcrelib/sljit/sljitNativeX86_common.c|ext/pdo_dblib/|ext/pdo_firebird/|ext/pdo_mysql/php_pdo_mysql_sqlstate.h|ext/pdo_oci/|ext/pdo_odbc/|ext/pdo_pgsql/|ext/pgsql/|ext/pspell/|ext/recode/|ext/session/mod_mm.h|ext/shmop/|ext/skeleton/|ext/snmp/|ext/soap/|ext/sockets/win32_socket_constants.h|ext/sockets/windows_common.h|ext/sqlite3/libsqlite/|ext/standard/dns_win32.c|ext/standard/link_win32.c|ext/sybase_ct/|ext/sysvmsg/|ext/sysvsem/|ext/sysvshm/|ext/tidy/|ext/xmlrpc/|ext/xsl/|ext/zip/lib/php_zip_config.w32.h|main/internal_functions_nw.c|main/internal_functions_win32.c|netware/|sapi/aolserver/|sapi/apache/|sapi/apache2filter/|sapi/apache2handler/|sapi/apache_hooks/|sapi/caudium/|sapi/cli/cli_win32.c|sapi/continuity/|sapi/embed/|sapi/fpm/fpm/fpm_systemd.c|sapi/fpm/fpm/fpm_systemd.h|sapi/fpm/fpm/fpm_trace_mach.c|sapi/fpm/fpm/fpm_trace_pread.c|sapi/isapi/|sapi/litespeed/|sapi/milter/|sapi/nsapi/|sapi/phpdbg/|sapi/phttpd/|sapi/pi3web/|sapi/roxen/|sapi/thttpd/|sapi/tux/|sapi/webjames/|stub.c|win32/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="php" /></sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings" />
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="elphel-apps-php-extension.null.157875629" name="elphel-apps-php-extension" />
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders" />
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/elphel-apps-php-extension" />
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1785128059;cdt.managedbuild.toolchain.gnu.cross.base.1785128059.1698506499;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1055849866;cdt.managedbuild.tool.gnu.cpp.compiler.input.2055376927">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1785128059;cdt.managedbuild.toolchain.gnu.cross.base.1785128059.1698506499;cdt.managedbuild.tool.gnu.cross.c.compiler.2029818847;cdt.managedbuild.tool.gnu.c.compiler.input.2080288843">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="" />
</scannerConfigBuildInfo>
</storageModule>
</cproject>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>elphel-apps-php-extension</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
<filteredResources>
<filter>
<id>1471028872824</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-src</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef PHP_ELPHEL_H
#define PHP_ELPHEL_H 1
#ifdef ZTS
#include "TSRM.h"
#warning Using TSRM.h
#else
#warning Not using TSRM.h
#endif
#include <asm/elphel/c313a.h>
#include <asm/elphel/exifa.h>
#include <asm/elphel/autoexp.h>
ZEND_BEGIN_MODULE_GLOBALS(elphel)
int fd_exif;
int fd_exifdir;
int fd_exifmeta;
int exif_size; // to see if verify exif directory has changed
struct exif_dir_table_t exif_dir[ExifKmlNumber] ; //! store locations of the fields needed for KML generations in the Exif block
/// (circbuf.c) access to /dev/circbuf (mmap, lseek)
int fd_circ;
unsigned long * ccam_dma_buf;
unsigned long ccam_dma_buf_len; // in bytes
//struct framepars_t *framePars;
/// (framepars.c) access to /dev/frameparsall (write, lseek, mmap)
int fd_fparmsall;
struct framepars_all_t *frameParsAll;
struct framepars_t *framePars;
struct framepars_past_t *pastPars;
unsigned long *funcs2call; /// each parameter has a 32-bit mask of what pgm_function to call - other fields not used
unsigned long *globalPars; /// parameters that are not frame-related, their changes do not initiate any actions so they can be mmaped for both
unsigned long *multiSensIndex; /// indexes of individual sensor register shadows (first of 3)
unsigned long *multiSensRvrsIndex; /// reverse index (to parent) for the multiSensIndex
/// (gamma_tables.c) access to gammas
//static struct gamma_stuct_t gammas[GAMMA_CACHE_NUMBER] __attribute__ ((aligned (PAGE_SIZE)));
// struct gamma_stuct_t * gammas_p; /// to use with mmap
int fd_gamma_cache;
struct gamma_stuct_t * gamma_cache; /// array of gamma structures
//static struct histogram_stuct_t histograms[HISTOGRAM_CACHE_NUMBER] __attribute__ ((aligned (PAGE_SIZE)));
int fd_histogram_cache;
struct histogram_stuct_t * histogram_cache; /// array of histogram
ZEND_END_MODULE_GLOBALS(elphel)
//!currently ZTS is not defined
#ifdef ZTS
#define ELPHEL_G(v) TSRMG(elphel_globals_id, zend_elphel_globals *, v)
#else
#define ELPHEL_G(v) (elphel_globals.v)
#endif
#define PHP_ELPHEL_VERSION "1.0"
#define PHP_ELPHEL_EXTNAME "elphel"
#define ELPHEL_GLOBALPARS(x) (((unsigned long *) ELPHEL_G(globalPars))[x-FRAMEPAR_GLOBALS])
PHP_FUNCTION(elphel_get_frame); /// current absolute frame number (includes those that are not compressed)
PHP_FUNCTION(elphel_skip_frames); /// skip some frames (includes those that are not compressed) - will work even if no frames are compressed
PHP_FUNCTION(elphel_wait_frame_abs); /// wait for absolute frame number (includes those that are not compressed)
PHP_FUNCTION(elphel_framepars_get_raw);
PHP_FUNCTION(elphel_parse_P_name);
PHP_FUNCTION(elphel_is_global_par);
PHP_FUNCTION(elphel_is_frame_par);
PHP_FUNCTION(elphel_get_P_value);
PHP_FUNCTION(elphel_set_P_value);
PHP_FUNCTION(elphel_get_P_arr);
PHP_FUNCTION(elphel_set_P_arr);
PHP_FUNCTION(elphel_gamma_add);
PHP_FUNCTION(elphel_gamma_add_custom);
PHP_FUNCTION(elphel_gamma_get);
PHP_FUNCTION(elphel_gamma_get_index);
PHP_FUNCTION(elphel_gamma_get_raw);
PHP_FUNCTION(elphel_histogram_get_raw);
PHP_FUNCTION(elphel_histogram_get);
PHP_FUNCTION(elphel_get_state); /// compatibility with old code
PHP_FUNCTION(elphel_compressor_reset); /// these elphel_compressor_*() functions are for compatibility. Reset will now just stop, not actually reset
PHP_FUNCTION(elphel_compressor_run);
PHP_FUNCTION(elphel_compressor_stop);
PHP_FUNCTION(elphel_compressor_frame);
PHP_FUNCTION(elphel_reset_sensor);
PHP_FUNCTION(elphel_set_fpga_time);
PHP_FUNCTION(elphel_get_fpga_time);
PHP_FUNCTION(elphel_wait_frame); /// wait for compressed frame in a circular frame buffer - will wait forever if comressor is off
PHP_FUNCTION(elphel_fpga_read);
PHP_FUNCTION(elphel_fpga_write);
PHP_FUNCTION(elphel_gamma);
PHP_FUNCTION(elphel_reverse_gamma);
PHP_FUNCTION(elphel_histogram);
PHP_FUNCTION(elphel_reverse_histogram);
PHP_FUNCTION(elphel_get_exif_field);
PHP_FUNCTION(elphel_set_exif_field);
PHP_FUNCTION(elphel_get_interframe_meta);
PHP_FUNCTION(elphel_get_exif_elphel);
PHP_FUNCTION(elphel_get_circbuf_pointers);
PHP_FUNCTION(elphel_update_exif); // force to rebuild directory after Exif format was changed Usually done automatically
PHP_MINIT_FUNCTION(elphel);
PHP_MSHUTDOWN_FUNCTION(elphel);
PHP_RINIT_FUNCTION(elphel);
PHP_MINFO_FUNCTION(elphel);
extern zend_module_entry elphel_module_entry;
#define phpext_elphel_ptr &elphel_module_entry
//static void init_sens();
int splitConstantName(char * name);
int get_histogram_index (long color,long frame, long needreverse); /// histogram is availble for previous frame, not for the current one
unsigned long get_imageParamsThat (int indx, unsigned long frame);
#endif
#!/bin/bash
args="$@"
while (( "$#" )); do
shift
done
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Launching bitbake $args"
cd $DIR/../../poky
. ./oe-init-build-env
bitbake $args | sed -u 's@| @@'
exit 0
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -36,12 +36,15 @@ if test "$PHP_ELPHEL" != "no"; then
dnl fi
dnl
dnl if test -z "$ELPHEL_DIR"; then
dnl AC_MSG_RESULT([not found])
dnl AC_MSG_ERROR([Please reinstall the elphel distribution])
dnl AC_MSG_RESULT([not found])
dnl AC_MSG_ERROR([Please reinstall the elphel distribution])
dnl fi
dnl # --with-elphel -> add include path
dnl PHP_ADD_INCLUDE($ELPHEL_DIR/include)
ELPHEL_DIR=$abs_srcdir/ext/elphel
UAPI_DIR=$PKG_CONFIG_SYSROOT_DIR/usr/include-uapi
PHP_ADD_INCLUDE($ELPHEL_DIR/include)
PHP_ADD_INCLUDE($UAPI_DIR)
dnl # --with-elphel -> check for lib and symbol presence
dnl LIBNAME=elphel # you may want to change this
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,44 +8,51 @@
#warning Not using TSRM.h
#endif
#include "c313a.h"
#include "exifa.h"
#include "autoexp.h"
#include <elphel/c313a.h>
#include <elphel/exifa.h>
#include <elphel/x393_devices.h>
//#include <autoexp.h>
//#include <elphel/x393_devices.h>
ZEND_BEGIN_MODULE_GLOBALS(elphel)
int fd_exif;
int fd_exif[SENSOR_PORTS];
int fd_exifdir;
int fd_exifmeta;
int fd_exifmeta[SENSOR_PORTS];
int exif_size; // to see if verify exif directory has changed
struct exif_dir_table_t exif_dir[ExifKmlNumber] ; //! store locations of the fields needed for KML generations in the Exif block
/// (circbuf.c) access to /dev/circbuf (mmap, lseek)
int fd_circ;
unsigned long * ccam_dma_buf;
unsigned long ccam_dma_buf_len; // in bytes
int fd_circ[SENSOR_PORTS];
unsigned long * ccam_dma_buf[SENSOR_PORTS];
unsigned long ccam_dma_buf_len[SENSOR_PORTS]; // in bytes
//struct framepars_t *framePars;
/// (framepars.c) access to /dev/frameparsall (write, lseek, mmap)
int fd_fparmsall;
struct framepars_all_t *frameParsAll;
struct framepars_t *framePars;
struct framepars_past_t *pastPars;
unsigned long *funcs2call; /// each parameter has a 32-bit mask of what pgm_function to call - other fields not used
unsigned long *globalPars; /// parameters that are not frame-related, their changes do not initiate any actions so they can be mmaped for both
unsigned long *multiSensIndex; /// indexes of individual sensor register shadows (first of 3)
unsigned long *multiSensRvrsIndex; /// reverse index (to parent) for the multiSensIndex
int fd_fparmsall[SENSOR_PORTS];
struct framepars_all_t *frameParsAll[SENSOR_PORTS];
struct framepars_t *framePars[SENSOR_PORTS];
struct framepars_past_t *pastPars[SENSOR_PORTS];
unsigned long *funcs2call[SENSOR_PORTS]; ///< each parameter has a 32-bit mask of what pgm_function to call - other fields not used
unsigned long *globalPars[SENSOR_PORTS]; ///< parameters that are not frame-related, their changes do not initiate any actions so they can be mmaped for both
unsigned long *multiSensIndex[SENSOR_PORTS]; ///< indexes of individual sensor register shadows (first of 3)
unsigned long *multiSensRvrsIndex[SENSOR_PORTS];///< reverse index (to parent) for the multiSensIndex
/*
struct framepars_all_t *aframeparsall = NULL; // - will be mmap-ed, in 393 points to an array of structures
struct framepars_t *aframepars[SENSOR_PORTS]; ///< getting rid of static to be able to use extern
struct framepars_past_t *apastpars[SENSOR_PORTS]; ///< getting rid of static to be able to use extern
unsigned long *afuncs2call[SENSOR_PORTS]; // sFrameParsAll.func2call.pars; - each parameter has a 32-bit mask of what pgm_function to call - other fields not used
unsigned long *aglobalPars[SENSOR_PORTS]; // parameters that are not frame-related, their changes do not initiate any actions so they can be mmaped for both
unsigned long *amultiSensIndex[SENSOR_PORTS]; // index for per-sensor alternatives
unsigned long *amultiSensRvrsIndex[SENSOR_PORTS]; // reverse index (to parent) for the multiSensIndex
wait_queue_head_t aframepars_wait_queue[SENSOR_PORTS];// used to wait for the frame to be acquired
*/
/// (gamma_tables.c) access to gammas
//static struct gamma_stuct_t gammas[GAMMA_CACHE_NUMBER] __attribute__ ((aligned (PAGE_SIZE)));
// struct gamma_stuct_t * gammas_p; /// to use with mmap
int fd_gamma_cache;
struct gamma_stuct_t * gamma_cache; /// array of gamma structures
//static struct histogram_stuct_t histograms[HISTOGRAM_CACHE_NUMBER] __attribute__ ((aligned (PAGE_SIZE)));
int fd_histogram_cache;
struct histogram_stuct_t * histogram_cache; /// array of histogram
......@@ -57,11 +64,15 @@ ZEND_END_MODULE_GLOBALS(elphel)
#define ELPHEL_G(v) (elphel_globals.v)
#endif
#define PHP_ELPHEL_VERSION "1.0"
#define PHP_ELPHEL_VERSION "2.0"
#define PHP_ELPHEL_EXTNAME "elphel"
#ifdef NC353
#define ELPHEL_GLOBALPARS(x) (((unsigned long *) ELPHEL_G(globalPars))[x-FRAMEPAR_GLOBALS])
#else
#define ELPHEL_GLOBALPARS(p, x) (((unsigned long *) ELPHEL_G(globalPars[p]))[x-FRAMEPAR_GLOBALS])
#endif
PHP_FUNCTION(elphel_get_frame); /// current absolute frame number (includes those that are not compressed)
PHP_FUNCTION(elphel_get_compressed_frame);
PHP_FUNCTION(elphel_skip_frames); /// skip some frames (includes those that are not compressed) - will work even if no frames are compressed
PHP_FUNCTION(elphel_wait_frame_abs); /// wait for absolute frame number (includes those that are not compressed)
PHP_FUNCTION(elphel_framepars_get_raw);
......@@ -82,6 +93,7 @@ PHP_FUNCTION(elphel_histogram_get_raw);
PHP_FUNCTION(elphel_histogram_get);
PHP_FUNCTION(elphel_get_state); /// compatibility with old code
PHP_FUNCTION(elphel_num_sensors);
PHP_FUNCTION(elphel_compressor_reset); /// these elphel_compressor_*() functions are for compatibility. Reset will now just stop, not actually reset
PHP_FUNCTION(elphel_compressor_run);
......@@ -91,7 +103,7 @@ PHP_FUNCTION(elphel_compressor_frame);
PHP_FUNCTION(elphel_reset_sensor);
PHP_FUNCTION(elphel_set_fpga_time);
PHP_FUNCTION(elphel_get_fpga_time);
PHP_FUNCTION(elphel_wait_frame); /// wait for compressed frame in a circular frame buffer - will wait forever if comressor is off
PHP_FUNCTION(elphel_wait_frame); /// wait for compressed frame in a circular frame buffer - will wait forever if compressor is off
PHP_FUNCTION(elphel_fpga_read);
PHP_FUNCTION(elphel_fpga_write);
PHP_FUNCTION(elphel_gamma);
......@@ -113,8 +125,8 @@ PHP_MINFO_FUNCTION(elphel);
extern zend_module_entry elphel_module_entry;
#define phpext_elphel_ptr &elphel_module_entry
//static void init_sens();
int splitConstantName(char * name);
int get_histogram_index (long color,long frame, long needreverse); /// histogram is availble for previous frame, not for the current one
unsigned long get_imageParamsThat (int indx, unsigned long frame);
int splitConstantName (char * name);
int get_histogram_index (long port, long sub_chn, long color,long frame, long needreverse); /// histogram is availble for previous frame, not for the current one
unsigned long get_imageParamsThat (int port, int indx, unsigned long frame);
#endif
/*
exifa.h
*/
#ifndef _ASM_EXIF_H
#define _ASM_EXIF_H
//Major
#define X3X3_EXIF 125
//Minors
#define X3X3_EXIF_EXIF 0 // read encoded Exif data (SEEK_END,
#define X3X3_EXIF_META 1 // write metadata, concurently opened files. All writes atomic
// control/setup devices
#define X3X3_EXIF_TEMPLATE 2 // write Exif template
#define X3X3_EXIF_METADIR 3 // write metadata to Exif header translation (dir_table[MAX_EXIF_FIELDS])
// those 2 files will disable exif_enable and exif_valid, truncate file size to file pointer on release.
#define X3X3_EXIF_TIME 4 // write today/tomorrow date (YYYY:MM:DD) and number of seconds at today/tomorrow
// midnight (00:00:00) in seconds from epoch (long, startting from LSB)
// commands for the overloaded lseek:
//X3X3_EXIF_TIME
#define EXIF_LSEEK_DISABLE 1 // disable Exif (storing of frame meta, generating Exif)
#define EXIF_LSEEK_ENABLE 2 // enable Exif (build buffer if needed)
#define EXIF_LSEEK_INVALIDATE 3 // invalidate (and disable)
#define EXIF_LSEEK_REBUILD 4 // rebuild buffer
#define EXIF_LSEEK_TOMORROW_DATE 5 // file pointer to YYYY:MM:DD (tomorrow) string
#define EXIF_LSEEK_TOMORROW_SEC 6 // file pointer to unsigned long (little endian) tomorrow seconds from epoch
#define EXIF_LSEEK_TODAY_DATE 7 // file pointer to YYYY:MM:DD (today) string
#define EXIF_LSEEK_TODAY_SEC 8 // file pointer to unsigned long (little endian) today seconds from epoch
/*
Exif data in the images is combined from the "static" structure (template), calculated once at startup, and
variable data stored in the buffer for individual frames in the "Exif" form - converted to ASCII strings
or Rational or else. The generated Exif header copies that variable fileds on top of the Exif template.
The compressed data buffer is stored in "meta pages", one per frame
*/
struct exif_dir_table_t {
union {
unsigned long ltag;// tag group and tag combined
struct {
unsigned short tag_group; // tag group: 0 - IFD0, 1 - Exif, 2 - GPS
unsigned short tag; // Exif tag as defined in the standard
};
};
unsigned long len; // Number of bytes to be copied from metadata to Exif
unsigned long src; // offset in meta data page
unsigned long dst; // offset in output Exif page
};
#define MAX_EXIF_FIELDS 256 // number of Exif tags in the header
#define MAX_EXIF_SIZE 4096 // Exif data size
//#define MAX_EXIF_FRAMES 512 // number of frames in the buffer
#define MAX_EXIF_FRAMES 2048 // number of frames in the buffer
//Exif Tags - unsigned long, combining actual Exif tags with tag groups (0 - IFD0, 1 - Exif, 2 - GPS)
#define Exif_Image_ImageDescription 0x0010e
#define Exif_Image_Make 0x0010f
#define Exif_Image_Model 0x00110
#define Exif_Image_Software 0x00131
#define Exif_Image_DateTime 0x00132
#define Exif_Image_Artist 0x0013b
#define Exif_Image_HostComputer 0x0013c
#define Exif_Image_Orientation 0x00112
// hack, reusing field to keep it protected
#define Exif_Image_IPTCNAA 0x083bb
#define Exif_Image_FrameNumber 0x083bb
#define Exif_Image_ExifTag 0x08769
#define Exif_Image_GPSTag 0x08825
//Sub IFD
#define Exif_Photo_ExposureTime 0x1829a
#define Exif_Photo_DateTimeOriginal 0x19003
#define Exif_Photo_MakerNote 0x1927c
#define Exif_Photo_SubSecTime 0x19290
#define Exif_Photo_SubSecTimeOriginal 0x19291
//GPSInfo
#define Exif_GPSInfo_GPSLatitudeRef 0x20001
#define Exif_GPSInfo_GPSLatitude 0x20002
#define Exif_GPSInfo_GPSLongitudeRef 0x20003
#define Exif_GPSInfo_GPSLongitude 0x20004
#define Exif_GPSInfo_GPSAltitudeRef 0x20005
#define Exif_GPSInfo_GPSAltitude 0x20006
#define Exif_GPSInfo_GPSTimeStamp 0x20007
#define Exif_GPSInfo_GPSMeasureMode 0x2000a
#define Exif_GPSInfo_GPSDateStamp 0x2001D
/// used for compass module
#define Exif_GPSInfo_GPSImgDirectionRef 0x20010
#define Exif_GPSInfo_GPSImgDirection 0x20011
#define Exif_GPSInfo_GPSDestLatitudeRef 0x20013
#define Exif_GPSInfo_GPSDestLatitude 0x20014
#define Exif_GPSInfo_GPSDestLongitudeRef 0x20015
#define Exif_GPSInfo_GPSDestLongitude 0x20016
#define Exif_GPSInfo_CompassDirectionRef 0x20010
#define Exif_GPSInfo_CompassDirection 0x20011
#define Exif_GPSInfo_CompassPitchRef 0x20013
#define Exif_GPSInfo_CompassPitch 0x20014
#define Exif_GPSInfo_CompassRollRef 0x20015
#define Exif_GPSInfo_CompassRoll 0x20016
// array(0x9003,2,"2001:06:21 12:00:00","len"=> 20), //date/time original time created, always use 20 bytes (19 ."\0")
// array(0x9291,2,"0 ") //original time sub-second length=10 9 ."\0"
///move back to interframe_params_t?
struct frame_exif_t {
unsigned short meta_index; //! index of the linked meta page
unsigned short signffff; //! should be 0xffff - it will be a signature that JPEG data was not overwritten
unsigned long frame_length; //! frame length
};
struct meta_GPSInfo_t {
unsigned char GPSLatitudeRef; //"N"/"S"
unsigned long GPSLatitude_deg_nom;
unsigned long GPSLatitude_deg_denom;
unsigned long GPSLatitude_min_nom;
unsigned long GPSLatitude_min_denom;
unsigned char GPSLongitudeRef; //"E"/"W"
unsigned long GPSLongitude_deg_nom;
unsigned long GPSLongitude_deg_denom;
unsigned long GPSLongitude_min_nom;
unsigned long GPSLongitude_min_denom;
unsigned char GPSAltitudeRef; //byte, not ascii 0 - above sea level, 1 - below
unsigned long GPSAltitude_nom; //in meters
unsigned long GPSAltitude_denom;
unsigned long GPSTimeStamp_hrs_nom;
unsigned long GPSTimeStamp_hrs_denom;
unsigned long GPSTimeStamp_min_nom;
unsigned long GPSTimeStamp_min_denom;
unsigned long GPSTimeStamp_sec_nom;
unsigned long GPSTimeStamp_sec_denom;
unsigned char GPSDateStamp[11]; //includes '\0'
unsigned char GPSMeasureMode;
};
//hack - use
struct meta_CompassInfo_t {
// unsigned char GPSImgDirectionRef; //"M"/"T" //0x10
unsigned long CompassDirection_nom; //0x11
unsigned long CompassDirection_denom;
unsigned char CompassPitchRef; //"N"/"S"
unsigned long CompassPitch_nom;
unsigned long CompassPitch_denom;
unsigned char CompassRollRef; //"E"/"W"
unsigned long CompassRoll_nom;
unsigned long CompassRoll_denom;
};
#define EXIF_GPS_MIN_DENOM 10000
#define EXIF_GPS_METERS_DENOM 10
#define EXIF_GPS_TIMESEC_DENOM 1000
#define EXIF_GPS_COMPASS_DENOM 10
///hack!
#define EXIF_COMPASS_PITCH_ASCII "NS" // use for pitch +/-
#define EXIF_COMPASS_ROLL_ASCII "EW" // use for roll +/-
/// Exif data (variable, stored with each frame) used for KML (not only)
#define Exif_Image_ImageDescription_Index 0x00
#define Exif_Photo_DateTimeOriginal_Index 0x01
#define Exif_Photo_SubSecTimeOriginal_Index 0x02
#define Exif_Photo_ExposureTime_Index 0x03
#define Exif_GPSInfo_GPSLatitudeRef_Index 0x04
#define Exif_GPSInfo_GPSLatitude_Index 0x05
#define Exif_GPSInfo_GPSLongitudeRef_Index 0x06
#define Exif_GPSInfo_GPSLongitude_Index 0x07
#define Exif_GPSInfo_GPSAltitudeRef_Index 0x08
#define Exif_GPSInfo_GPSAltitude_Index 0x09
#define Exif_GPSInfo_GPSTimeStamp_Index 0x0a
#define Exif_GPSInfo_GPSDateStamp_Index 0x0b
#define Exif_GPSInfo_GPSMeasureMode_Index 0x0c
#define Exif_GPSInfo_CompassDirectionRef_Index 0x0d
#define Exif_GPSInfo_CompassDirection_Index 0x0e
#define Exif_GPSInfo_CompassPitchRef_Index 0x0f
#define Exif_GPSInfo_CompassPitch_Index 0x10
#define Exif_GPSInfo_CompassRollRef_Index 0x11
#define Exif_GPSInfo_CompassRoll_Index 0x12
#define Exif_Image_FrameNumber_Index 0x13
#define Exif_Image_Orientation_Index 0x14
#define Exif_Photo_MakerNote_Index 0x15
/// update ExifKmlNumber to be total number of *_Index entries
#define ExifKmlNumber Exif_Photo_MakerNote_Index+1
#define EXIF_DEV_NAME "/dev/exif_exif"
#define EXIFDIR_DEV_NAME "/dev/exif_metadir"
#define EXIFMETA_DEV_NAME "/dev/exif_meta"
#endif