#globals
#set yrange [0:]
set format y "%2.0f"
set key bottom left
#set terminal postscript eps color solid
set terminal postscript color solid
set xlabel "Playout seconds"
set ylabel "Bandwidth [kbps]"

set xrange [0:480]
#set title "network bandwidth difference of both streams"
plot 'rtp_stat-streamout-server-both' using 1:($2 - $15) title "srv_net_diff" with steps, \
     0 title "equal line" with steps, \
     AVGREALBWDIFF title "avg realBW diff: AVGREALBWDIFF Kbps" with steps
#pause -1 "please hit return"

#set title "frame rate difference of both streams"
set yrange [-25:1]
set ylabel "number of displayed frames"
plot 'rtp_stat-playout-client-both' using 1:($3 - $14) title "fps diff" with steps 3, \
     0 title "equal line" with steps, \
     'rtp_stat-playout-server-0' using 1:($12 * -25) title "switch point" with impulses 9, \
     AVGFPSDIFF title "avg fps diff: AVGFPSDIFF Kbps" with steps
#pause -1 "please hit return"

set yrange [-18:1]
set ylabel "PSNR [dB]"
#set title "PSNR difference of both streams"
plot 'rtp_stat-playout-client-both' using 1:($8 - $19) title "PSNR loss by adaptation" \
with boxes 3, \
     'rtp_stat-playout-server-0' using 1:($12 * -18) title "switch point" with impulses 9, \
     AVGPSNRDIFF title "avg PSNR loss: AVGPSNRDIFF dB" with steps 1
#pause -1 "please hit return"

