Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for ROUTE:full_repair with one packet dropped #20

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hash_refs/repair-full-one-packet-dropped-inspect.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
}h����O(�V�t�����
12 changes: 11 additions & 1 deletion make_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,21 @@ mark_test_error ()
}

test_end_ts=0

function test_force_end() {
if [ $# -gt 0 ] ; then
log $L_ERR "> in test $TEST_NAME in script $current_script line $BASH_LINENO"
log $L_ERR " @test_force_end takes no argument - wrong call"
fi
kill -9 $(jobs -p) > /dev/null 2>&1
test_end
}

#ends test - gather all logs/stats produced and generate report
test_end ()
{
#wait for all sub-tests to complete (some may use subshells)
wait
wait > /dev/null 2>&1

test_end_ts=`$GNU_DATE +%s%N`
test_runtime=$((test_end_ts-test_start_ts))
Expand Down
Binary file added media/repair/short.mp4
Binary file not shown.
15 changes: 15 additions & 0 deletions media/repair/short_dash_session/live.mpd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 2.5-DEV-rev662-g20bb340a4-master at 2024-10-03T08:34:16.859Z -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.000S" type="static" mediaPresentationDuration="PT0H0M5.000S" maxSegmentDuration="PT0H0M1.000S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="https://gpac.io">
<Title>live.mpd generated by GPAC</Title>
</ProgramInformation>

<Period duration="PT0H0M5.000S">
<AdaptationSet segmentAlignment="true" maxWidth="1920" maxHeight="1080" maxFrameRate="25" par="16:9" mimeType="video/mp4" startWithSAP="1">
<SegmentTemplate media="short_dash$Number$.m4s" initialization="short_dashinit.mp4" timescale="25000" startNumber="1" duration="25000"/>
<Representation id="1" codecs="vvc1.1.L64.CA" width="1920" height="1080" frameRate="25" sar="1:1" bandwidth="732504">
</Representation>
</AdaptationSet>
</Period>
</MPD>
Binary file added media/repair/short_dash_session/short_dash1.m4s
Binary file not shown.
Binary file added media/repair/short_dash_session/short_dash2.m4s
Binary file not shown.
Binary file added media/repair/short_dash_session/short_dash3.m4s
Binary file not shown.
Binary file added media/repair/short_dash_session/short_dash4.m4s
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added media/repair/short_route.gpc
Binary file not shown.
36 changes: 36 additions & 0 deletions scripts/repair.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash


PORT=8080
localhost=127.0.0.1
myinspect=$TEMP_DIR/inspect.txt
repair_dir="$MEDIA_DIR/repair"
HTTP_SERVER_RUNFOR=6000


function test_full_repair_one_packet_dropped()
{
test_begin "repair-full-one-packet-dropped"
if [ $test_skip = 1 ] ; then
return
fi

#start http server
do_test "$GPAC -runfor=$HTTP_SERVER_RUNFOR httpout:port=$PORT:rdirs=$repair_dir/short_dash_session:reqlog=GET" &
sleep 0.5
#start route session with full repair and one packet dropped
do_test "$GPAC -i route://234.1.1.1:1234/live.mpd:repair=full::repair_urls=http://$localhost:$PORT/ -netcap=src=$repair_dir/short_route.gpc,nrt,[s=20] inspect:dur=1:allp:deep:test=network:interleave=false:log=$myinspect"
do_hash_test $myinspect "inspect"
#kill http server, no need to wait for it to finish
test_force_end
}



do_tests()
{
test_full_repair_one_packet_dropped
}


do_tests