webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Functions | Variables
plot_neteq_delay.m File Reference

Functions

delayfile parse_delay_file ()
 
catch error (lasterr)
 
otherwise warning ('Unknown switch % s\n', varargin{arg_ptr})
 
isnan(s.arrival find ()
 
s sn (one_desc_ix(k))
 
s pt (one_desc_ix(k))
 
s arrival (one_desc_ix(k))
 
end % remove duplicate received frames that were never decoded (RED codec) if length(unique(s.ts(isfinite(s.ts))))< length(s.ts(isfinite(s.ts))) ix
 
s.sn unique ()
 
if ~isempty (nonun_ix) warning('RTP sequence numbers are in error')
 
if length (s.fs)< 1 warning('No info about sample rate found in file. Using default 8000.')
 
s fs (1)
 
s fschange_ts (1) =min(s.ts)
 
 send_t (start_ix:end_ix)
 
s playout_delay (start_ix:end_ix)
 
s optbuf (start_ix:end_ix)
 
 plot_send_t (seq_ix)
 
 plot_nw_delay (seq_ix)
 
 set (h, 'color', 0.75 *[1 1 1])
 
hold on if any (s.optbuf~=0) peak_ix
 
setdiff (1:length(cng_ix), peak_ix)
 
 set ([h1, h2], 'markersize', 1) end % h
 
 set (h, 'linew', 1.5)
 
 axis ([ax2(1:3) ax1(4)]) end % calculate delays and other parameters delayskip_ix
 
if not (isempty(delaypoints)) delayvalues
 
while ~isempty (jumps) n
 
if x(n+1) -x(n)< 0 % negative jump x(n+1 else % positive jump x (n+1:end)
 

Variables

 function [delay_struct, delayvalues]
 
end delayskip =0
 
 noplot =0
 
 arg_ptr =1
 
 delaypoints =[]
 
s sn =unwrap_seqno(s.sn)
 
 case
 
for k
 
s ts =s.ts(ix)
 
s arrival =s.arrival(ix)
 
s playout_delay =s.playout_delay(ix)
 
s pt =s.pt(ix)
 
s optbuf =s.optbuf(ix)
 
 plen =plen(ix)
 
s decode =s.decode(ix)
 
 nonun_ix =setdiff(1:length(s.sn),un_ix)
 
end % sort vectors [s.sn, sort_ix] =sort(s.sn)
 
 send_t =s.ts-s.ts(1)
 
end end_ix =length(send_t)
 
end tot_time =max(send_t)-min(send_t)
 
 seq_ix =s.sn-min(s.sn)+1
 
 plot_send_t =nan*ones(max(seq_ix),1)
 
 plot_nw_delay =nan*ones(max(seq_ix),1)
 
 cng_ix =find(s.pt~=13)
 
% peak mode is labeled with negative values no_peak_ix =find(s.optbuf(cng_ix)>0)
 
 h1
 
 h2
 
 h =plot(send_t(cng_ix)/1000,s.decode(cng_ix)+s.playout_delay(cng_ix)-send_t(cng_ix))
 
hold off ax1 =axis
 
axis tight ax2 =axis
 
 use_ix
 
% and are sent after delayskip seconds mean_delay = mean(s.decode(use_ix)+s.playout_delay(use_ix)-send_t(use_ix))
 
 neteq_delay = mean(s.decode(use_ix)+s.playout_delay(use_ix)-s.arrival(use_ix))
 
 Npack =max(s.sn(delayskip_ix:end))-min(s.sn(delayskip_ix:end))+1
 
 nw_lossrate =(Npack-length(s.sn(delayskip_ix:end)))/Npack
 
 neteq_lossrate =(length(s.sn(delayskip_ix:end))-length(use_ix))/Npack
 
 delay_struct
 
else delayvalues =[]
 
end % SUBFUNCTIONS % function y
 
end jumps =find(abs((diff(x(n+1:end))-1))>65000)
 
 return
 

Function Documentation

◆ any()

hold on if any ( s.optbuf~  = 0)

◆ arrival()

s arrival ( one_desc_ix(k )

◆ axis()

axis ( )

◆ decoded()

end % remove duplicate received frames that were never decoded ( RED  codec)

◆ error()

catch error ( lasterr  )

◆ find()

isnan(s.arrival find ( )
virtual

◆ fs()

s fs ( )

◆ fschange_ts()

elseif s fschange_ts ( ) =min(s.ts)

◆ length()

if length ( s.  fs)

◆ not()

if not ( isempty(delaypoints )

◆ optbuf()

s optbuf ( start_ix:end_ix  )

◆ parse_delay_file()

delayfile parse_delay_file ( )
virtual

◆ playout_delay()

s playout_delay ( start_ix:end_ix  )

◆ plot_nw_delay()

plot_nw_delay ( seq_ix  )

◆ plot_send_t()

plot_send_t ( seq_ix  )

◆ pt()

s pt ( one_desc_ix(k )

◆ send_t()

send_t ( start_ix:end_ix  )

◆ set() [1/3]

set ( h  ,
'color ,
0.75 *  [1 1 1] 
)

◆ set() [2/3]

set ( 'markersize'  ,
 
)

◆ set() [3/3]

set ( h  ,
'linew'  ,
1.  5 
)

◆ setdiff()

% setdiff ( 1:length(cng_ix ,
peak_ix   
)

◆ sn()

s sn ( one_desc_ix(k )

◆ unique()

s.sn unique ( )
virtual

◆ warning()

otherwise warning ( 'Unknown switch % s\n ,
varargin{arg_ptr  
)

◆ x()

if x (n+1)-x(n) < 0 % negative jump x(n+1 else % positive jump x ( n+1:end  )

◆ ~isempty() [1/2]

if ~isempty ( nonun_ix  )

◆ ~isempty() [2/2]

while ~isempty ( jumps  )

Variable Documentation

◆ arg_ptr

arg_ptr =1

◆ arrival

s arrival =s.arrival(ix)

◆ ax1

hold off ax1 =axis

◆ ax2

axis tight ax2 =axis

◆ case

case
Initial value:
{'get_delay', 'getdelay'}
% return a vector of delay values for the points in the given vector
delaypoints = varargin{arg_ptr+1}
GLenum GLsizei GLsizei GLint * values
Definition: gl2ext.h:1222
delaypoints
Definition: plot_neteq_delay.m:19
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
Definition: delay.py:1
arg_ptr
Definition: plot_neteq_delay.m:18

◆ cng_ix

cng_ix =find(s.pt~=13)

◆ decode

s decode =s.decode(ix)

◆ delay_struct

delay_struct
Initial value:
=struct('mean_delay',mean_delay,'neteq_delay',neteq_delay,...
'nw_lossrate',nw_lossrate,'neteq_lossrate',neteq_lossrate,...
'tot_expand',round(s.tot_expand),'tot_accelerate',round(s.tot_accelerate),...
'tot_preemptive',round(s.tot_preemptive),'tot_time',tot_time,...
'filename',delayfile,'units','ms','fs',unique(s.fs))
end tot_time
Definition: plot_neteq_delay.m:97
s.sn unique()
neteq_delay
Definition: plot_neteq_delay.m:144
neteq_lossrate
Definition: plot_neteq_delay.m:148
nw_lossrate
Definition: plot_neteq_delay.m:147
struct A s
% and are sent after delayskip seconds mean_delay
Definition: plot_neteq_delay.m:143

◆ delaypoints

delaypoints =[]

◆ delayskip

skip a number of seconds in the beginning when calculating delays delayskip =0

◆ delayvalues

else delayvalues =[]

◆ end_ix

end_ix =length(send_t)

◆ function

Initial value:
= plot_neteq_delay(delayfile, varargin)
% InfoStruct = plot_neteq_delay(delayfile)
% InfoStruct = plot_neteq_delay(delayfile, 'skipdelay', skip_seconds)
%
% Henrik Lundin

◆ h

◆ h1

h1
Initial value:
=plot(send_t(cng_ix(peak_ix))/1000,...
s.arrival(cng_ix(peak_ix))+abs(s.optbuf(cng_ix(peak_ix)))-send_t(cng_ix(peak_ix)),...
'r.')
cng_ix
Definition: plot_neteq_delay.m:107
send_t
Definition: plot_neteq_delay.m:79
s optbuf
Definition: plot_neteq_delay.m:59
plot(tx, x, td, d)
struct A s
#define abs(a)
Definition: device_info_impl.cc:19
GLboolean r
Definition: gl2ext.h:306

◆ h2

h2
Initial value:
'g.')
GLboolean GLboolean g
Definition: gl2ext.h:306
% peak mode is labeled with negative values no_peak_ix
Definition: plot_neteq_delay.m:115
cng_ix
Definition: plot_neteq_delay.m:107
send_t
Definition: plot_neteq_delay.m:79
s optbuf
Definition: plot_neteq_delay.m:59
plot(tx, x, td, d)
struct A s
#define abs(a)
Definition: device_info_impl.cc:19

◆ jumps

end jumps =find(abs((diff(x(n+1:end))-1))>65000)

◆ k

for k
Initial value:
=1:length(one_desc_ix)
ix=find(s.ts==max(s.ts(s.ts(one_desc_ix(k))>s.ts)))
if length(s.fs)< 1 warning('No info about sample rate found in file. Using default 8000.')
isnan(s.arrival find()
for k
Definition: plot_neteq_delay.m:44
double max
Definition: DeviceProximityEvent.idl:32
struct A s

◆ mean_delay

% and are sent after delayskip seconds mean_delay = mean(s.decode(use_ix)+s.playout_delay(use_ix)-send_t(use_ix))

◆ neteq_delay

◆ neteq_lossrate

neteq_lossrate =(length(s.sn(delayskip_ix:end))-length(use_ix))/Npack

◆ no_peak_ix

% peak mode is labeled with negative values no_peak_ix =find(s.optbuf(cng_ix)>0)

◆ nonun_ix

nonun_ix =setdiff(1:length(s.sn),un_ix)

◆ noplot

find those packets that are not CNG SID if noplot =0

◆ Npack

Npack =max(s.sn(delayskip_ix:end))-min(s.sn(delayskip_ix:end))+1

◆ nw_lossrate

nw_lossrate =(Npack-length(s.sn(delayskip_ix:end)))/Npack

◆ optbuf

s optbuf =s.optbuf(ix)

◆ playout_delay

s playout_delay =s.playout_delay(ix)

◆ plen

plen =plen(ix)

◆ plot_nw_delay

plot_nw_delay =nan*ones(max(seq_ix),1)

◆ plot_send_t

plot_send_t =nan*ones(max(seq_ix),1)

◆ pt

s pt =s.pt(ix)

◆ return

return

◆ send_t

send_t =s.ts-s.ts(1)

◆ seq_ix

seq_ix =s.sn-min(s.sn)+1

◆ sn

s sn =unwrap_seqno(s.sn)

◆ tot_time

end tot_time =max(send_t)-min(send_t)

◆ ts

s ts =s.ts(ix)

◆ use_ix

use_ix
Initial value:
= intersect(cng_ix,... % use those that are not CNG/SID frames...
intersect(find(isfinite(s.decode)),... % ... that did arrive ...
(delayskip_ix:length(s.decode))'))
isnan(s.arrival find()
cng_ix
Definition: plot_neteq_delay.m:107
frames
Definition: complexityMeasures.m:19
#define isfinite
Definition: jsoncpp.cpp:4014
if not(isempty(delaypoints)) delayvalues
struct A s
DOMString use
Definition: WebCryptoAPI.idl:102
GLuint GLsizei GLsizei * length
Definition: gl2.h:435

◆ vectors

end % sort vectors[s.sn, sort_ix] =sort(s.sn)

◆ y

end y
Initial value:
=unwrap_seqno(x)
jumps=find(abs((diff(x)-1))>65000)
isnan(s.arrival find()
EGLSurface EGLint x
Definition: eglext.h:950
end jumps
Definition: plot_neteq_delay.m:182
#define abs(a)
Definition: device_info_impl.cc:19