summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/vlc_stream_rtp
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/vlc_stream_rtp')
-rw-r--r--kpov_judge/tasks/vlc_stream_rtp/task.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py
index 4ae435d..ea9b905 100644
--- a/kpov_judge/tasks/vlc_stream_rtp/task.py
+++ b/kpov_judge/tasks/vlc_stream_rtp/task.py
@@ -9,12 +9,11 @@ instructions = {
'si':u"""
Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter
ter StudentVLC z diska student-VLC. Poskrbi, da bosta na istem omrežju, od
-koder bosta imela dostop tudi do Interneta
-Na StudentVLC posodobi datoteko /etc/apt/sources.list, preveri posodobitve in
-naloži VLC.
+koder bosta imela dostop tudi do Interneta Na StudentVLC posodobi datoteko
+/etc/apt/sources.list, preveri posodobitve in naloži VLC.
Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na
-lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}.
+lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}, vrata {PORT}.
Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic
je pri reševanju te naloge strogo prepovedano.
""",
@@ -27,7 +26,7 @@ VLC.
Record or otherwise create a movie and make sure the movie is avaliable
on your local network via RTP with the name of the stream {TOK} at the address
-{NASLOV}.
+{NASLOV} on port {PORT}.
Take into account that the movie may be seen by your classmates.
Copyright infrigement while solving this task is strictly prohibited.
@@ -102,15 +101,19 @@ def task_check(results, params):
p1_d = p1_l[1:-1]
p1_s = ""
for i in p1_d:
- p1_s += "".join([j for j in i.split(' ')[1:]])
- sname = "".join([ hex(ord(i))[2:] for i in params['TOK']])
+ p1_s = p1_s + "".join([j.strip() for j in i.split(' ')[1:]])
+ sname = "".join([hex(ord(i))[2:] for i in params['TOK']])
if p1_s.find(sname) > 2:
score += 5
- s = "IP [^ ]* > {}.{}: UDP, length [0-9]+\n\r".format(
+ else:
+ hints.append("stream name not found in stream announcement")
+ s = "IP [^ ]* > {}.{}: UDP, length [0-9]+".format(
re.escape(params['NASLOV']),
params['PORT'])
if re.search(s, results['tcpdump']):
score += 5
+ else:
+ hints.append("RTP stream not detected in " + results['tcpdump'])
return score, hints
def prepare_disks(templates, task_params, global_params):