-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdebug.php
55 lines (48 loc) · 1.21 KB
/
debug.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
require_once "global_config.inc";
require_once "modules/remote_ffmpeg_hls/lib_capture.php";
require_once "lib_model.php";
require_once "logger_sync_daemon.php";
require_once "lib_ffmpeg.php";
Logger::$print_logs = true;
$debug_mode = true;
if($argc == 1)
{
echo "No test ID provided" . PHP_EOL;
return false;
}
$testID = $argv[1];
switch($testID)
{
case "slide_info_get":
$asset = $argv[2];
$post_array = capture_remoteffmpeg_info_get('download', $asset);
echo "RESULT: " . PHP_EOL;
print_r($post_array);
break;
case "slide_status_get":
$res = capture_remoteffmpeg_status_get();
echo "Result: $res" . PHP_EOL;
break;
case "stop_current_record":
stop_current_record(false);
break;
case "slide_post_process":
$asset = $argv[2];
$fct = 'capture_' . $slide_module . '_process';
$slide_pid = "";
$success = $fct($asset, $slide_pid);
break;
case "log_sync":
$daemon = new LoggerSyncDaemon();
$res = $daemon->run();
break;
case "movie_join_parts":
$movies_path = $argv[2];
$output = $argv[3];
movie_join_parts($movies_path, "ffmpegmovie", $output);
break;
default:
echo "Invalid test" .PHP_EOL;
break;
}