Skip to content

Commit 6696f08

Browse files
authored
Merge pull request #770 from amiaopensource/updates-on-handling-recorders
Updates on handling recorders
2 parents ed617c1 + b09dd62 commit 6696f08

File tree

2 files changed

+83
-108
lines changed

2 files changed

+83
-108
lines changed

Resources/vrecord_functions

+7-8
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ _update_config_file(){
7070
echo "USER_SUFFIX=\"${USER_SUFFIX}\""
7171
echo "NO_SUFFIX=\"${NO_SUFFIX}\""
7272
echo "TECHNICIAN=\"${TECHNICIAN}\""
73-
echo "AVFCTL_INPUT_CHOICE=\"${AVFCTL_INPUT_CHOICE}\""
73+
echo "DVRESCUE_INPUT_CHOICE=\"${DVRESCUE_INPUT_CHOICE}\""
7474
echo "DECKLINK_INPUT_CHOICE=\"${DECKLINK_INPUT_CHOICE}\""
7575
echo "DECKLINK_UTILITY_CHOICE=\"${DECKLINK_UTILITY_CHOICE}\""
7676
echo "WAVEFORM_SCALE_CHOICE=\"${WAVEFORM_SCALE_CHOICE}\""
@@ -179,13 +179,12 @@ _get_decklink_input_list(){
179179
"${FFMPEG_BIN}" -nostdin -v 0 -sources decklink | awk -F'[][]' '{print $2}' | grep -v "^$"
180180
}
181181

182-
_get_avfctl_input_list(){
183-
# set avfctl input options
184-
unset AVFCTL_DEVICES
182+
_get_dvrescue_input_list(){
183+
# set dvrescue input options
184+
unset DVRESCUE_DEVICES
185+
dvrescue -list_devices | grep "\[DV\]"
185186
if [ "${OS_TYPE}" = "linux" ] ; then
186-
echo "Default DV Device"
187-
else
188-
avfctl -list_devices 2>&1 | grep -A 10 "Devices:" | grep -o "\[[0-9]\].*"
187+
echo "FFmpeg iec61883 Default"
189188
fi
190189
}
191190

@@ -218,7 +217,7 @@ _get_summary(){
218217
echo "Playback: ${PLAYBACKVIEW_CHOICE} view (for recording) and ${PLAYBACKVIEW_CHOICE_PASS} view (for passthrough)"
219218
elif [ "${DEVICE_INPUT_CHOICE}" = "1" ] ; then
220219
echo "Device Input: DV"
221-
echo "Copying video from ${AVFCTL_INPUT_CHOICE}."
220+
echo "Copying video from ${DVRESCUE_INPUT_CHOICE}."
222221
echo "Inputs recorded to ${DIR}"
223222
echo "Auxiliary files created in ${LOGDIR}"
224223
elif [ "${DEVICE_INPUT_CHOICE}" = "2" ] ; then

vrecord

+76-100
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ _gtk_vbox_list() {
284284
SELECTION="$(_get_index_of_value "${!VARIABLE_NAME}" "${OPTION_LIST[@]}")"
285285
if [[ "${VARIABLE_NAME}" == "DECKLINK_INPUT_CHOICE" ]] ; then
286286
LIST="<input>_get_decklink_input_list</input>"
287-
elif [[ "${VARIABLE_NAME}" == "AVFCTL_INPUT_CHOICE" ]] ; then
288-
LIST="<input>_get_avfctl_input_list</input>"
287+
elif [[ "${VARIABLE_NAME}" == "DVRESCUE_INPUT_CHOICE" ]] ; then
288+
LIST="<input>_get_dvrescue_input_list</input>"
289289
elif [[ "${VARIABLE_NAME}" == "AUDIO_DEV_CHOICE" ]] ; then
290290
LIST="<input>_get_audio_device_list</input>"
291291
else
@@ -334,12 +334,12 @@ _gtk_vbox_list() {
334334
<action type=\"clear\">DECKLINK_INPUT_CHOICE</action>
335335
<action type=\"refresh\">DECKLINK_INPUT_CHOICE</action>
336336
</button>"
337-
elif [[ "${VARIABLE_NAME}" == "AVFCTL_INPUT_CHOICE" ]] ; then
337+
elif [[ "${VARIABLE_NAME}" == "DVRESCUE_INPUT_CHOICE" ]] ; then
338338
echo "
339339
<button>
340340
<label>Rescan</label>
341-
<action type=\"clear\">AVFCTL_INPUT_CHOICE</action>
342-
<action type=\"refresh\">AVFCTL_INPUT_CHOICE</action>
341+
<action type=\"clear\">DVRESCUE_INPUT_CHOICE</action>
342+
<action type=\"refresh\">DVRESCUE_INPUT_CHOICE</action>
343343
</button>"
344344
elif [[ "${VARIABLE_NAME}" == "AUDIO_DEV_CHOICE" ]] ; then
345345
echo "
@@ -395,16 +395,14 @@ _setup_vrecord_input(){
395395
GRAB_INPUT+=(-raw_format "${PIXEL_FORMAT}")
396396
GRAB_INPUT+=(-i "${DECKLINK_INPUT_CHOICE}")
397397
elif [[ "${DEVICE_INPUT_CHOICE}" = 1 ]] ; then
398-
if [[ "${OS_TYPE}" = "linux" ]] ; then
398+
if [[ "${DVRESCUE_INPUT_CHOICE}" = 'FFmpeg iec61883 Default' ]] ; then
399399
GRAB_INPUT+=(-f iec61883)
400400
GRAB_INPUT+=(-i auto)
401-
elif [[ "${OS_TYPE}" = "macOS" ]] ; then
402-
AVFCTL_INPUT_INDEX="$(echo "${AVFCTL_INPUT_CHOICE}" | cut -c 2)"
403-
GRAB_INPUT+=(-device "${AVFCTL_INPUT_INDEX}")
404-
GRAB_INPUT+=(-cmd capture)
405-
GRAB_INPUT+=(-)
401+
else
402+
DVRESCUE_INPUT_INDEX="$(echo "${DVRESCUE_INPUT_CHOICE}" | cut -d " " -f1 | sed 's|:$||g')"
403+
GRAB_INPUT+=("device://${DVRESCUE_INPUT_INDEX}")
404+
GRAB_INPUT+=(--capture)
406405
fi
407-
MIDDLEOPTIONS+=(-c copy -map 0)
408406
elif [[ "${DEVICE_INPUT_CHOICE}" = 2 ]] ; then
409407
_set_ffmpeg_loglevel
410408
#Mac Options
@@ -444,11 +442,7 @@ _setup_vrecord_process(){
444442
PIPE_OUTPUT+=(-)
445443
WINDOW_NAME="mode:${RUNTYPE} - video:'${VIDEO_INPUT}' audio:'${AUDIO_INPUT}' - to end recording press q, esc, or close video window"
446444
elif [[ "${DEVICE_INPUT_CHOICE}" = 1 ]] ; then
447-
PIPE_OUTPUT=(-c copy)
448-
PIPE_OUTPUT+=(-map 0)
449-
PIPE_OUTPUT+=(-f rawvideo)
450-
PIPE_OUTPUT+=(-)
451-
WINDOW_NAME="mode:${RUNTYPE} - input:'${AVFCTL_INPUT_INDEX}' - to end recording press q, esc, or close video window"
445+
WINDOW_NAME="mode:${RUNTYPE} - DV input:'${DVRESCUE_INPUT_INDEX}' - to end recording press q, esc, or close video window"
452446
elif [[ "${DEVICE_INPUT_CHOICE}" = 2 ]] ; then
453447
PIPE_OUTPUT+=(-c:a pcm_s16le -ar 48k)
454448
PIPE_OUTPUT+=(-f wav)
@@ -486,7 +480,7 @@ _setup_vrecord_process(){
486480
fi
487481
RECORD_COMMAND+=("${PIPE_OUTPUT[@]}")
488482
elif [[ "${DEVICE_INPUT_CHOICE}" = 1 ]] ; then
489-
if [[ "${OS_TYPE}" = "linux" ]] ; then
483+
if [[ "${DVRESCUE_INPUT_CHOICE}" = 'FFmpeg iec61883 Default' ]] ; then
490484
if [[ "${RUNTYPE}" = "record" ]] ; then
491485
VRECORD_STEPS="2" # Steps: record | player
492486
else
@@ -497,18 +491,20 @@ _setup_vrecord_process(){
497491
RECORD_COMMAND+=(-f "${FORMAT}" "${VRECORD_OUTPUT}")
498492
RECORD_COMMAND+=(-map 0:v -f rawvideo -c copy -)
499493
else
494+
VRECORD_STEPS="2" # Steps: record | player
495+
RECORD_COMMAND=(dvrescue)
496+
RECORD_COMMAND+=("${GRAB_INPUT[@]}")
500497
if [[ "${RUNTYPE}" = "record" ]] ; then
501-
VRECORD_STEPS="3" # Steps: record | ff_record | player
502-
else
503-
VRECORD_STEPS="2" # Steps: record | player
498+
RECORD_COMMAND+=(--merge-output-concealed)
499+
RECORD_COMMAND+=(--merge-ignore-speed)
500+
RECORD_COMMAND+=(--cc-format scc)
501+
RECORD_COMMAND+=(--cc-output "${VRECORD_OUTPUT}.dvrescue.scc")
502+
RECORD_COMMAND+=(--xml-output "${VRECORD_OUTPUT}.dvrescue.xml")
503+
RECORD_COMMAND+=(--merge "${VRECORD_OUTPUT}")
504504
fi
505-
RECORD_COMMAND=(avfctl)
506-
RECORD_COMMAND+=("${GRAB_INPUT[@]}")
507-
FF_RECORD_COMMAND=("${FFMPEG_BIN}" -nostdin -nostats "${TIME_LIMIT[@]}")
508-
FF_RECORD_COMMAND+=(-i -)
509-
FF_RECORD_COMMAND+=(-map 0:v -c copy)
510-
FF_RECORD_COMMAND+=(-f "${FORMAT}" "${VRECORD_OUTPUT}")
511-
FF_RECORD_COMMAND+=(-map 0:v -f rawvideo -c copy -)
505+
RECORD_COMMAND+=(--merge-output-concealed)
506+
RECORD_COMMAND+=(--merge-output-speed)
507+
RECORD_COMMAND+=(--merge -)
512508
fi
513509
elif [[ "${DEVICE_INPUT_CHOICE}" = 2 ]] ; then
514510
VRECORD_STEPS="2" # Steps: record | player (record is adjusted if actually recording)
@@ -583,17 +579,17 @@ _get_avfoundation_inputs(){
583579
done < <("${FFMPEG_BIN}" -nostdin -hide_banner -f avfoundation -list_devices 1 -i dummy 2>&1 | grep -A 10 "AVFoundation audio devices" | grep -o "\[[0-9]\].*" | cut -d " " -f2-)
584580
}
585581

586-
_get_avfctl_inputs(){
587-
# set avfctl input options
588-
unset AVFCTL_DEVICES
589-
while read avfctl_device ; do
590-
AVFCTL_DEVICES+=("${avfctl_device}")
591-
done < <(avfctl -list_devices 2>&1 | grep -A 10 "Devices:" | grep -o "\[[0-9]\].*")
592-
if [[ "${#AVFCTL_DEVICES[@]}" = 1 ]] ; then # default to first input if only one
593-
AVFCTL_INPUT_CHOICE="${AVFCTL_DEVICES[0]}"
582+
_get_dvrescue_inputs(){
583+
# set dvrescue input options
584+
unset DVRESCUE_DEVICES
585+
while read dvrescue_device ; do
586+
DVRESCUE_DEVICES+=("${dvrescue_device}")
587+
done < <(dvrescue -list_devices | grep "\[DV\]")
588+
if [[ "${OS_TYPE}" = 'linux' ]] ; then
589+
DVRESCUE_DEVICES+=( "FFmpeg iec61883 Default" )
594590
fi
595-
if [[ "${OS_TYPE}" = "linux" ]] ; then
596-
AVFCTL_DEVICES+=('Default DV Device')
591+
if [[ "${#DVRESCUE_DEVICES[@]}" = 1 ]] ; then # default to first input if only one
592+
DVRESCUE_INPUT_CHOICE="${DVRESCUE_DEVICES[0]}"
597593
fi
598594
}
599595

@@ -635,11 +631,11 @@ _set_up_edit_form() {
635631
FFMPEG_STATUS_TMP="$(_maketemp .ffmpeg.status.txt)"
636632
DECKCONTROL_STATUS_TMP="$(_maketemp .deckcontrol.status.txt)"
637633
DECKCONTROL_TIMECODE_TMP="$(_maketemp .deckcontrol.timecode.txt)"
638-
AVFCTL_STATUS_TMP="$(_maketemp .avfctl.status.txt)"
634+
DVRESCUE_STATUS_TMP="$(_maketemp .dvrescue.status.txt)"
639635
echo "" > "${FFMPEG_STATUS_TMP}"
640636
echo "disabled" > "$DECKCONTROL_STATUS_TMP"
641637
echo "--:--:--:--" > "$DECKCONTROL_TIMECODE_TMP"
642-
echo "disabled" > "$AVFCTL_STATUS_TMP"
638+
echo "disabled" > "$DVRESCUE_STATUS_TMP"
643639

644640
STARTUP_VIEW_TMP=$(_maketemp .startup.txt)
645641
echo "MAIN" > "${STARTUP_VIEW_TMP}"
@@ -915,19 +911,19 @@ if [[ "${OS_TYPE}" = "linux" ]] ; then
915911
STATUS_CMD='dvcont status '
916912
elif [[ "${OS_TYPE}" = "macOS" ]] ; then
917913
DV_REPACK_CMD='{ avfctl -cmd ff -foreground; avfctl -cmd rew; }'
918-
DV_RW_CMD='avfctl -cmd rew '
919-
DV_PLAY_CMD='avfctl -cmd play '
920-
DV_STOP_CMD='avfctl -cmd stop '
921-
DV_FF_CMD='avfctl -cmd ff '
922-
STATUS_CMD="avfctl -status 2>&1 | grep -o 'Device \[.*' | sed 's|Device ||g;s| status||g'"
914+
DV_RW_CMD='dvrescue "device://${DVRESCUE_INPUT_INDEX}" -cmd rew '
915+
DV_PLAY_CMD='dvrescue "device://${DVRESCUE_INPUT_INDEX}" -cmd play '
916+
DV_STOP_CMD='dvrescue "device://${DVRESCUE_INPUT_INDEX}" -cmd stop '
917+
DV_FF_CMD='dvrescue "device://${DVRESCUE_INPUT_INDEX}" -cmd ff '
918+
STATUS_CMD='dvrescue "device://${DVRESCUE_INPUT_INDEX}" -status 2>&1'
923919
fi
924920

925-
AVFCTL_INPUT_GUI=$(cat << AVFCTL_FORM
926-
<frame DVRescue avfctl input options>
921+
DVRESCUE_INPUT_GUI=$(cat << DVRESCUE_FORM
922+
<frame DVRescue input options>
927923
<vbox>
928924
<hbox>
929925
<hbox space-expand="true">
930-
$(_gtk_vbox_list "AVFCTL_INPUT_CHOICE" "-1" "Select a DV Device" "${AVFCTL_DEVICES[@]}")
926+
$(_gtk_vbox_list "DVRESCUE_INPUT_CHOICE" "400" "Select a DV Device" "${DVRESCUE_DEVICES[@]}")
931927
</hbox>
932928
<vbox>
933929
<frame dvpackager options>
@@ -984,49 +980,49 @@ AVFCTL_INPUT_GUI=$(cat << AVFCTL_FORM
984980
<label>Status</label>
985981
</text>
986982
<entry editable="false" has-frame="false">
987-
<variable export="false">avfctl_status</variable>
988-
<input file>"${AVFCTL_STATUS_TMP}"</input>
983+
<variable export="false">dvrescue_status</variable>
984+
<input file>"${DVRESCUE_STATUS_TMP}"</input>
989985
</entry>
990986
</vbox>
991987
<timer milliseconds="true" interval="300" visible="false" disabled="true">
992-
<variable export="false">avfctl_timer</variable>
988+
<variable export="false">dvrescue_timer</variable>
993989
<visible>disabled</visible>
994-
<action>${STATUS_CMD} > "${AVFCTL_STATUS_TMP}" &</action>
995-
<action>refresh:avfctl_status</action>
990+
<action>${STATUS_CMD} > "${DVRESCUE_STATUS_TMP}" &</action>
991+
<action>refresh:dvrescue_status</action>
996992
</timer>
997993
<togglebutton>
998994
<label>Deck Control</label>
999995
<default>false</default>
1000-
<variable export="false">avfctl_toggle</variable>
996+
<variable export="false">dvrescue_toggle</variable>
1001997
<input file stock="gtk-execute"></input>
1002-
<action>if true enable:avfctl_timer</action>
1003-
<action>if true enable:avfctl_status</action>
998+
<action>if true enable:dvrescue_timer</action>
999+
<action>if true enable:dvrescue_status</action>
10041000
<action>if true enable:avfctl_repack</action>
1005-
<action>if true enable:avfctl_rewind</action>
1006-
<action>if true enable:avfctl_play</action>
1007-
<action>if true enable:avfctl_stop</action>
1008-
<action>if true enable:avfctl_ff</action>
1009-
<action>if false disable:avfctl_timer</action>
1010-
<action>if false disable:avfctl_status</action>
1001+
<action>if true enable:dvrescue_rewind</action>
1002+
<action>if true enable:dvrescue_play</action>
1003+
<action>if true enable:dvrescue_stop</action>
1004+
<action>if true enable:dvrescue_ff</action>
1005+
<action>if false disable:dvrescue_timer</action>
1006+
<action>if false disable:dvrescue_status</action>
10111007
<action>if false disable:avfctl_repack</action>
1012-
<action>if false disable:avfctl_rewind</action>
1013-
<action>if false disable:avfctl_play</action>
1014-
<action>if false disable:avfctl_stop</action>
1015-
<action>if false disable:avfctl_ff</action>
1008+
<action>if false disable:dvrescue_rewind</action>
1009+
<action>if false disable:dvrescue_play</action>
1010+
<action>if false disable:dvrescue_stop</action>
1011+
<action>if false disable:dvrescue_ff</action>
10161012
</togglebutton>
10171013
</hbox>
10181014
<hbox>
1019-
$(_get_deckcontrol_button "avfctl_repack" "" "Repack" "${DV_REPACK_CMD}")
1020-
$(_get_deckcontrol_button "avfctl_rewind" "gtk-media-rewind" "Rewind" "${DV_RW_CMD}")
1021-
$(_get_deckcontrol_button "avfctl_play" "gtk-media-play" "Play" "${DV_PLAY_CMD}")
1022-
$(_get_deckcontrol_button "avfctl_stop" "gtk-media-stop" "Stop" "${DV_STOP_CMD}")
1023-
$(_get_deckcontrol_button "avfctl_ff" "gtk-media-forward" "FF" "${DV_FF_CMD}")
1015+
$(_get_deckcontrol_button "avfctl_repack" "" "Repack" "${DV_REPACK_CMD}")
1016+
$(_get_deckcontrol_button "dvrescue_rewind" "gtk-media-rewind" "Rewind" "${DV_RW_CMD}")
1017+
$(_get_deckcontrol_button "dvrescue_play" "gtk-media-play" "Play" "${DV_PLAY_CMD}")
1018+
$(_get_deckcontrol_button "dvrescue_stop" "gtk-media-stop" "Stop" "${DV_STOP_CMD}")
1019+
$(_get_deckcontrol_button "dvrescue_ff" "gtk-media-forward" "FF" "${DV_FF_CMD}")
10241020
</hbox>
10251021
</vbox>
10261022
</hbox>
10271023
</frame>
10281024
</frame>
1029-
AVFCTL_FORM
1025+
DVRESCUE_FORM
10301026
)
10311027

10321028
AUDIO_INPUT_GUI=$(cat << AUDIO_INPUT_FORM
@@ -1110,7 +1106,7 @@ export MAIN_DIALOG='
11101106
<frame Input Options>
11111107
<notebook page="'"${DEVICE_INPUT_CHOICE}"'" tab-labels="Decklink|DV|Audio|Config">
11121108
'"${DECKLINK_INPUT_GUI}"'
1113-
'"${AVFCTL_INPUT_GUI}"'
1109+
'"${DVRESCUE_INPUT_GUI}"'
11141110
'"${AUDIO_INPUT_GUI}"'
11151111
'"${OPTIONAL_TOOLS_GUI}"'
11161112
<variable>DEVICE_INPUT_CHOICE</variable>
@@ -2046,7 +2042,7 @@ _review_all_options(){
20462042
fi
20472043
_review_option "STANDARD_CHOICE" "${STANDARD_OPTIONS[@]}"
20482044
elif [[ "${DEVICE_INPUT_CHOICE}" = "1" ]] ; then
2049-
_review_option -n "AVFCTL_INPUT_CHOICE" "${AVFCTL_DEVICES[@]}"
2045+
_review_option -n "DVRESCUE_INPUT_CHOICE" "${DVRESCUE_DEVICES[@]}"
20502046
elif [[ "${DEVICE_INPUT_CHOICE}" = "2" ]] ; then
20512047
_review_option -n "AUDIO_DEV_CHOICE" "${AUDIO_DEVICES[@]}"
20522048
fi
@@ -2158,7 +2154,7 @@ fi
21582154

21592155
_get_decklink_inputs
21602156
_get_avfoundation_inputs
2161-
_get_avfctl_inputs
2157+
_get_dvrescue_inputs
21622158

21632159
if [[ "${OS_TYPE}" = "linux" ]] ; then
21642160
while read audio_device ; do
@@ -2316,7 +2312,7 @@ fi
23162312
if [[ "${DEVICE_INPUT_CHOICE}" = "0" ]] ; then
23172313
_report -d "Summary: ${VIDEOCODECNAME}/${FORMAT} ${PIXEL_FORMAT} file from ${STANDARD} ${VIDEO_INPUT} ${AUDIO_INPUT}. ${TECHNICIAN_TEXT} Frame MD5s=${FRAMEMD5_CHOICE}, QCTools XML=${QCTOOLSXML_CHOICE}. Inputs recorded to ${VRECORD_OUTPUT} and Auxiliary Files created in ${LOGDIR}. ${DURATION_TEXT}"
23182314
elif [[ "${DEVICE_INPUT_CHOICE}" = "1" ]] ; then
2319-
_report -d "Summary: Copying video from ${AVFCTL_INPUT_CHOICE}. ${TECHNICIAN_TEXT} Inputs recorded to ${VRECORD_OUTPUT} and Auxiliary Files created in ${LOGDIR}. ${DURATION_TEXT}"
2315+
_report -d "Summary: Copying video from ${DVRESCUE_INPUT_CHOICE}. ${TECHNICIAN_TEXT} Inputs recorded to ${VRECORD_OUTPUT} and Auxiliary Files created in ${LOGDIR}. ${DURATION_TEXT}"
23202316
elif [[ "${DEVICE_INPUT_CHOICE}" = "2" ]] ; then
23212317
_report -d "Summary: Recording audio from ${AUDIO_DEV_CHOICE}. ${TECHNICIAN_TEXT} Inputs recorded to ${VRECORD_OUTPUT} and Auxiliary Files created in ${LOGDIR}. ${DURATION_TEXT}"
23222318
fi
@@ -2410,55 +2406,35 @@ if [[ "${VERBOSE_GTKDIALOG}" = "Y" ]] ; then
24102406
echo "STEPS ${VRECORD_STEPS}"
24112407
echo "PLAY ${PLAYER_COMMAND[@]}"
24122408
echo "RECORD ${RECORD_COMMAND[@]}"
2413-
echo "FFRECORD ${FF_RECORD_COMMAND[@]}"
24142409
fi
24152410
if [[ "${VRECORD_STEPS}" = "2" ]] ; then
2416-
_writeingestlog "Capture-Record command" "${RECORD_COMMAND[@]}"
2411+
_writeingestlog "Record command" "${RECORD_COMMAND[@]}"
24172412
_writeingestlog "Playback command" "${PLAYER_COMMAND[@]}"
24182413
"${RECORD_COMMAND[@]}" 2> >(tee "${VRECORD_INPUT_TMP}" 1>&2) | \
24192414
if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] && [[ "${QCTOOLSXML_CHOICE}" = "Yes, concurrent with recording" ]]; then
24202415
tee >("${PLAYER_COMMAND[@]}") | "${QCLI_COMMAND_PIPE[@]}"
24212416
else
24222417
"${PLAYER_COMMAND[@]}"
24232418
fi
2424-
elif [[ "${VRECORD_STEPS}" = "3" ]] ; then
2425-
_writeingestlog "Capture command" "${RECORD_COMMAND[@]}"
2426-
_writeingestlog "Record command" "${FF_RECORD_COMMAND[@]}"
2427-
_writeingestlog "Playback command" "${PLAYER_COMMAND[@]}"
2428-
"${RECORD_COMMAND[@]}" 2> >(tee "${VRECORD_INPUT_TMP}" 1>&2) | \
2429-
"${FF_RECORD_COMMAND[@]}" 2> >(tee "${VRECORD_INPUT_TMP}" 1>&2) | \
2430-
if [[ "${DEVICE_INPUT_CHOICE}" = 0 ]] && [[ "${QCTOOLSXML_CHOICE}" = "Yes, concurrent with recording" ]]; then
2431-
tee >("${PLAYER_COMMAND[@]}") | "${QCLI_COMMAND_PIPE[@]}"
2432-
else
2433-
"${PLAYER_COMMAND[@]}"
2434-
fi
24352419
else
24362420
_report_unexpected_error VRECORD_STEPS
24372421
fi
24382422
# capture errors from components of recording pipe
24392423
RESULTING_EXIT_CODES=("${PIPESTATUS[@]}")
24402424
P1_ERR="${RESULTING_EXIT_CODES[0]}"
24412425
P2_ERR="${RESULTING_EXIT_CODES[1]}"
2442-
P3_ERR="${RESULTING_EXIT_CODES[2]}"
24432426

24442427
if [[ "${VRECORD_STEPS}" = "2" ]] ; then
2445-
_writeingestlog "Capture-Record exit code" "${P1_ERR}"
2428+
_writeingestlog "Record exit code" "${P1_ERR}"
24462429
_writeingestlog "Playback exit code" "${P2_ERR}"
2447-
elif [[ "${VRECORD_STEPS}" = "3" ]] ; then
2448-
_writeingestlog "Capture exit code" "${P1_ERR}"
2449-
_writeingestlog "Record exit code" "${P2_ERR}"
2450-
_writeingestlog "Playback exit code" "${P3_ERR}"
24512430
fi
24522431

24532432
if [[ ! -s "${VRECORD_OUTPUT}" ]] ; then
24542433
if [[ "$P1_ERR" != "0" ]] ; then
2455-
_report_unexpected_error P1_ERR "${RECORD_COMMAND[@]} // ${FF_RECORD_COMMAND[@]} // ${PLAYER_COMMAND}"
2434+
_report_unexpected_error P1_ERR "${RECORD_COMMAND[@]} // ${PLAYER_COMMAND}"
24562435
fi
24572436
if [[ "$P2_ERR" != "0" && -n "$P2_ERR" ]] ; then
2458-
_report_unexpected_error P2_ERR "${RECORD_COMMAND[@]} // ${FF_RECORD_COMMAND[@]} // ${PLAYER_COMMAND}"
2459-
fi
2460-
if [[ "$P3_ERR" != "0" && -n "$P3_ERR" ]] ; then
2461-
_report_unexpected_error P3_ERR "${RECORD_COMMAND[@]} // ${FF_RECORD_COMMAND[@]} // ${PLAYER_COMMAND}"
2437+
_report_unexpected_error P2_ERR "${RECORD_COMMAND[@]} // ${PLAYER_COMMAND}"
24622438
fi
24632439
fi
24642440

0 commit comments

Comments
 (0)