Commit 2e327aa7 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

+debug

parent 0a31e92d
...@@ -72,33 +72,6 @@ ...@@ -72,33 +72,6 @@
} }
// get exif data from all buffers in a single text file
if (isset($_GET['exifs'])){
if (isset($_GET['sensor_port'])){
$port = $_GET['sensor_port'];
}else{
$port = $lowest_port;
}
$circbuf_pointers = elphel_get_circbuf_pointers($port,1);
// get metas
$meta = array();
foreach($circbuf_pointers as $k=>$v){
$meta[$k] = array (
'circbuf_pointer' => $v['circbuf_pointer'],
'meta' => elphel_get_interframe_meta($port,$v['circbuf_pointer']),
'Exif' => elphel_get_exif_elphel($port, $v['exif_pointer'])
);
}
print_r($meta);
die();
}
if (isset($_GET['zip'])){ if (isset($_GET['zip'])){
$contents = Array(); $contents = Array();
...@@ -107,7 +80,9 @@ ...@@ -107,7 +80,9 @@
foreach($available_ports as $port){ foreach($available_ports as $port){
array_push($rqs,"http://{$_SERVER['SERVER_ADDR']}:$port/timestamp_name/bimg"); array_push($rqs,"http://{$_SERVER['SERVER_ADDR']}:$port/timestamp_name/bimg");
} }
// '1' in the end - get response with headers
$cdata = curl_multi_start($rqs,1); $cdata = curl_multi_start($rqs,1);
// '1' in the end - parse response with headers
$results = curl_multi_finish($cdata,false,0,false,1); $results = curl_multi_finish($cdata,false,0,false,1);
$filenames = $results['names']; $filenames = $results['names'];
...@@ -127,7 +102,7 @@ ...@@ -127,7 +102,7 @@
} }
*/ */
$zipfilename = preg_replace("/_\d+\.jp4$/",".zip",$filenames[0]); $zipfilename = preg_replace("/_\d+\.jp(4|.*g)$/",".zip",$filenames[0]);
//tmpfile //tmpfile
$tmpfile = tmpfile(); $tmpfile = tmpfile();
...@@ -143,6 +118,16 @@ ...@@ -143,6 +118,16 @@
$zip->addFromString($v,$contents[$k]); $zip->addFromString($v,$contents[$k]);
} }
if (isset($_GET['exifs'])){
foreach($available_ports as $k=>$v){
$i = $v-$port0;
$fname = $filenames[$k];
$v_new = preg_replace("/\.jp(4|.*g)$/","_exifs.txt",$fname);
$exifs = get_all_exifs($i);
$zip->addFromString($v_new,var_export($exifs,true));
}
}
$zip->close(); $zip->close();
header('Content-type: application/zip'); header('Content-type: application/zip');
...@@ -153,6 +138,41 @@ ...@@ -153,6 +138,41 @@
} }
// get exif data from all buffers in a single text file
if (isset($_GET['exifs'])){
if (isset($_GET['sensor_port'])){
$port = $_GET['sensor_port'];
}else{
$port = $lowest_port;
}
$meta = get_all_exifs(intval($port));
print_r($meta);
die();
}
}
function get_all_exifs($port){
$circbuf_pointers = elphel_get_circbuf_pointers($port,1);
// get metas
$meta = array();
foreach($circbuf_pointers as $k=>$v){
$meta[$k] = array (
'circbuf_pointer' => $v['circbuf_pointer'],
'meta' => elphel_get_interframe_meta($port,$v['circbuf_pointer']),
'Exif' => elphel_get_exif_elphel($port, $v['exif_pointer'])
);
}
return $meta;
} }
?> ?>
......
...@@ -50,7 +50,7 @@ function download_all(rtp){ ...@@ -50,7 +50,7 @@ function download_all(rtp){
// get ze blob // get ze blob
var http = new XMLHttpRequest(); var http = new XMLHttpRequest();
http.open("GET", "?zip", true); http.open("GET", "?zip"+(dl_exif_histories?"&exifs":""), true);
http.responseType = "blob"; http.responseType = "blob";
http.onload = function(e){ http.onload = function(e){
......
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