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

+debug

parent 0a31e92d
......@@ -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'])){
$contents = Array();
......@@ -107,7 +80,9 @@
foreach($available_ports as $port){
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);
// '1' in the end - parse response with headers
$results = curl_multi_finish($cdata,false,0,false,1);
$filenames = $results['names'];
......@@ -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();
......@@ -143,6 +118,16 @@
$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();
header('Content-type: application/zip');
......@@ -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){
// get ze blob
var http = new XMLHttpRequest();
http.open("GET", "?zip", true);
http.open("GET", "?zip"+(dl_exif_histories?"&exifs":""), true);
http.responseType = "blob";
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