Commit 3a824467 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

jp4 canvas example on the camera

parent e01b50c8
# Runs 'make', 'make install', and 'make clean' in specified subdirectories # Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src/php_top src/python_tests src/debugfs-webgui # src1 SUBDIRS := src/php_top src/python_tests src/debugfs-webgui src/jp4-canvas # src1
INSTALLDIRS = $(SUBDIRS:%=install-%) INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS = $(SUBDIRS:%=clean-%) CLEANDIRS = $(SUBDIRS:%=clean-%)
......
DOCUMENTROOT=$(DESTDIR)/www/pages
OWN = -o root -g root
INSTDOCS = 0644
INSTALL = install
DOCS= jp4-canvas.html \
jp4-canvas.js
LIBS= exif.js \
jquery-jp4.js \
jcanvas.min.js
PHP_SCRIPTS=get-image.php
all:
@echo "make all in src"
install:
@echo "make install in src"
$(INSTALL) $(OWN) -d $(DOCUMENTROOT) $(DOCUMENTROOT)/js
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(LIBS) $(DOCUMENTROOT)/js
$(INSTALL) $(OWN) -m $(INSTDOCS) $(PHP_SCRIPTS) $(DOCUMENTROOT)
clean:
@echo "make clean in src"
This diff is collapsed.
<?php
if (isset($_GET['port']))
$port = $_GET['port'];
else
die();
if (isset($_GET['rel']))
$rel = $_GET['rel'];
else
die();
header('Content-type:image/jpeg');
echo file_get_contents("http://localhost:$port/$rel");
?>
This diff is collapsed.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="author" content="?"/>
</head>
<body>
<table>
<tr>
<td><div id='test2'></div></td>
<td><div id='test4'></div></td>
</tr>
<tr>
<td><div id='test1'></div></td>
<td><div id='test3'></div></td>
</tr>
</table>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/jcanvas.min.js"></script>
<script src="js/exif.js"></script>
<script src="jp4-canvas.js"></script>
<script src="js/jquery-jp4.js"></script>
</body>
</html>
/*
FILE NAME : jp4-canvas.js
DESCRIPTION: Converts jp4/jp46 files into human perceivable format in html5 canvas.
VERSION: 1.0
AUTHOR: Oleg K Dzhimiev <oleg@elphel.com>
LICENSE: AGPL, see http://www.gnu.org/licenses/agpl.txt
Copyright (C) 2016 Elphel, Inc.
*/
$(function(){
$("#test1").jp4({port:2323,width:600});
$("#test2").jp4({port:2324,width:600});
$("#test3").jp4({port:2325,width:600});
$("#test4").jp4({port:2326,width:600});
});
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment