Manolo R.G. wrote:
Dan Rossi escribió:
  
Dan Rossi wrote:
    
is anyone able to comment if the totalbytes transferred during a 
stream is accessed like this and if its available during a stream 
closed state as this is returning 0

public void streamSubscriberClose(ISubscriberStream stream) {
log.info(stream.getStreamFlow().getTotalBytesTransfered());
}
      
also this

log.info("x-duration: " + stream.getStreamFlow().getTotalStreamTime());

returns this

x-duration: 1159848289943

converted to seconds is this

1159848289.943

which is strange because i only had the stream on for a second or so 
before closing.  what is the right calculation for this time value then ?
    
Try if these lines returns the same value:

log.info("x-duration: " + stream.getStreamFlow().getTotalStreamTime());
log.info("current time: " + (new Date()).getTime());

I don't know what stream.getStreamFlow().getTotalStreamTime() should 
return but as it's returning the milliseconds since 1 january 1970 
(java.util.Date function getTime()).

If you get the time in milliseconds when the stream starts and when it 
closes, you could get the duration substracting the last value from the 
first and passing then to seconds or other time measure.


  

the method is in StreamFlow doin the microtime calculation, hopefully the startmilliseconds is the start of the stream not server start !, it does seem yes its the time from start unix timestamp, ill try some date formatters see if that works ??


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

  

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to