<commit_before>#test MP4Box RTP streaming and MP4 client
test_begin "mp4box-rtp" "play"
if [ $test_skip  = 1 ] ; then
return
fi

mp4file="$TEMP_DIR/test.mp4"
do_test "$MP4BOX -add $MEDIA_DIR/auxiliary_files/enst_video.h264:dur=2 -add $MEDIA_DIR/auxiliary_files/enst_audio.aac:dur=2 -new $mp4file" "build-mp4"

do_test "$MP4BOX -rtp -run-for=0 -sdp=$TEMP_DIR/session.sdp -dst=172.16.31.10 $mp4file" "streamer-init"

#we have a bug in avi dumping of RTP source, just check regular playback for now
do_test "$MP4CLIENT -run-for 5 $TEMP_DIR/session.sdp" "play" &

#run for a bit more because of buffering
do_test "$MP4BOX -rtp -run-for=10 -sdp=$TEMP_DIR/session.sdp -dst=172.16.31.10 $mp4file" "streamer-run"

test_end<commit_msg>Fixed RTP tests<commit_after>#test MP4Box RTP streaming and MP4 client

#DST="-dst=172.16.31.10"
DST=""

IFCE="127.0.0.1"

rtp_test ()
{

test_begin "mp4box-rtp-$1" "play"
if [ $test_skip  = 1 ] ; then
return
fi

do_test "$MP4BOX -rtp -run-for=0 -sdp=$TEMP_DIR/session.sdp $DST -ifce=$IFCE $2" "streamer-init"

#we have a bug in avi dumping of RTP source, just check regular playback for now
do_test "$MP4CLIENT -run-for 5 -opt Network:BufferLength=1000 -no-save -ifce $IFCE $TEMP_DIR/session.sdp" "play" &

#run for a bit more because of buffering
do_test "$MP4BOX -rtp -run-for=10 -sdp=$TEMP_DIR/session.sdp $DST -ifce=$IFCE $2" "streamer-run"

test_end
}

mp4file="$TEMP_DIR/test.mp4"

$MP4BOX -add $MEDIA_DIR/auxiliary_files/enst_video.h264:dur=2 -add $MEDIA_DIR/auxiliary_files/enst_audio.aac:dur=2 -new $mp4file 2> /dev/null
rtp_test "avc-aac" $mp4file

$MP4BOX -add $MEDIA_DIR/auxiliary_files/count_video.cmp:dur=2 -add $MEDIA_DIR/auxiliary_files/count_english.mp3:dur=2 -new $mp4file 2> /dev/null
rtp_test "mpeg4p2-mp3" $mp4file

if [ $EXTERNAL_MEDIA_AVAILABLE = 0 ] ; then
return
fi

$MP4BOX -add $EXTERNAL_MEDIA_DIR/import/bear_video.263:dur=2 -add $EXTERNAL_MEDIA_DIR/import/bear_audio.amr:dur=2 -new $mp4file 2> /dev/null
rtp_test "h263-amr" $mp4file

{'fraction_non_alphanumeric': 0.14077425842131724, 'fraction_numerical': 0.05429864253393665, 'mean_word_length': 4.870206489675517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2823467', 'n_tokens_mistral': 918, 'n_tokens_neox': 888, 'n_words': 191}