I need to collect statistics of usage and total bytes send and received by server. I suppose, in MediaEventListener.onStop() should be some way, to get total bytes transferred by stream.
You can use IOPerformanceCounter in the IMediaStreamActionNotify.onStop() handler:
public void onStop(IMediaStream stream)
{
IOPerformanceCounter perf = stream.getMediaIOPerformance();
getLogger().info("Total OutBytes: " + perf.getMessagesOutBytes());
}
But the best way is look at log files. Look at the sc-bytes (server to client bytes) in rows with x-event “destroy”
Richard
thanks. It was helpful.
You can use IOPerformanceCounter in the IMediaStreamActionNotify.onStop() handler:
public void onStop(IMediaStream stream) { IOPerformanceCounter perf = stream.getMediaIOPerformance(); getLogger().info("Total OutBytes: " + perf.getMessagesOutBytes()); }
But the best way is look at log files. Look at the sc-bytes (server to client bytes) in rows with x-event “destroy”
Richard
Hi Richard,
Does this method work also for HTTP-based stream protocols? I’m having trouble calculating the amount of bytes sent to a single user through a DASH-MPEG stream.