Skip to content

Commit

Permalink
find
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Feb 20, 2016
1 parent 73adc6f commit d5ff348
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ install_manifest.txt
debug
smartnet
recorder
*.py
*.py
config.json
11 changes: 11 additions & 0 deletions debug-encode-upload.sh.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/bash
echo "Encoding: $1"
filename="$1"
basename="${filename%.*}"
wav="$basename.wav"
eval "nice -n 19 /home/luke/p25-decode/decoder $filename $wav > /dev/null"
eval "nice -n 19 /home/luke/bin/ffmpeg -i $wav -c:a libfdk_aac -b:a 32k -cutoff 18000 $mp4encoded > /dev/null 2>&1"

echo "Upload: $encoded"
eval "scp $json $mp4encoded username@server.com:~/smartnet-upload "

5 changes: 4 additions & 1 deletion main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ void stop_inactive_recorders() {
//BOOST_LOG_TRIVIAL(info) << "\tRemoving TG: " << call->get_talkgroup() << "\tElapsed: " << call->elapsed() << std::endl;
}
if (call->get_debug_recording() == true) {
BOOST_LOG_TRIVIAL(info) << "Stopping debug - inactive call";
sprintf(shell_command,"./debug-encode-upload.sh %s > /dev/null 2>&1 &", call->get_debug_recorder()->get_filename());
call->get_debug_recorder()->deactivate();
system(shell_command);
}

//BOOST_LOG_TRIVIAL(trace) << "\tRemoving TG: " << call->get_talkgroup() << "\tElapsed: " << call->elapsed();
Expand Down Expand Up @@ -420,8 +421,10 @@ void assign_recorder(TrunkMessage message) {
}

if (call->get_debug_recording() == true) {
sprintf(shell_command,"./debug-encode-upload.sh %s > /dev/null 2>&1 &", call->get_debug_recorder()->get_filename());
BOOST_LOG_TRIVIAL(info) << "Stopping debug - diff TG, same freq";
call->get_debug_recorder()->deactivate();
system(shell_command);
}

it = calls.erase(it);
Expand Down

0 comments on commit d5ff348

Please sign in to comment.