[Live-devel] Current playing file stats

Ross Finlayson finlayson at live555.com
Mon Nov 27 17:43:01 PST 2017


> I am currently developing a GUI application that uses live555 for RTP streaming. The integration works perfectly so far and I am able to play media files correctly, however, I have a particular question about the current file being played status/statistics.
> 
> In the front-end of the application, I display the currently playing file name & info in a widget with a progress bar, I want to reflect the current play status on that progress bar. So for example if I could get/retrieve the last read byte index, or the elapsed  time relative to the currently playing file, or anything else that helps in the said regard, then I could use this information to update the GUI accordingly.
> 
> Any help to achieve the above would be much appreciated.

Yes, we have a function
	MediaSubsession::getNormalPlayTime()
that returns the ‘current playing time’ for the stream.  (It should work even if you seek within the stream, and/or use fast-forward/reverse-play.)

For an example, note the code at line 514 of “testProgs/testRTSPClient.cpp” (enabled if “DEBUG_PRINT_NPT” is defined).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list