This changes the definition (and usage) of IPlayer::GetTotalTime() from returning seconds in an int to returning milliseconds in an int64_t. Up until now there was no documentation and no rule for it and DVDPlayer returned seconds while the new PAPlayer implementation returns milliseconds (which is how I noticed it).
After a short discussion with @cptspiff I decided to adjust the definition of IPlayer::GetTotalTime() to be the same as IPlayer::GetTime() which returns milliseconds in an int64_t.
I hope I caught all the usages of the calls to GetTotalTime() of the different IPlayer implementations.
What's the point of having ms resolution for these functions? I would favor having all functions using seconds as dimension.. And now CApp GetTotalTime() uses seconds and IPlayer uses mseconds, which seems confusiong...
I simply adjusted it the way it works with GetTime(). IPlayer::GetTime() returns milliseconds and CApplication::GetTime() returns fractional seconds. As GetTime() was not broken but GetTotalTime was, that's the one I fixed. @cptspiff said on IRC that milliseconds resolution would be preferred over seconds resolution.
divide by 1000. done. other way is not doable. it does not hurt and may be useful. that is my line of thought.am I missing something?
Fully agree. Annoyed me for a long time. Alternatively they could be
I do like to recommend to properly document this in CApp.h for GetTime/GetTotalTime etc. And make clear in CApp:GetTime & GetTotalTime etc. that we have convert from ms to seconds to make it more obvious in the future..
It already is documented but only in Application.cpp and not in Application.h. It says
Returns the total time in seconds of the current media. Fractional portions of a second are possible - but not necessarily supported by the player class. This returns a double to be consistent with GetTime() and SeekTime().
I added a doxy description and a warning that these methods in CApplication and IPlayer do not return the same values to Application.h. Everyone satisfied now?
Don't forget the brand new android AMPLayer ;)
IPlayer: change GetTotalTime() to return milliseconds in an int64_t
@huceke Thanks for the reminder. Updated AMLPlayer as well.
Thanks (for the effort) :-)
[UPnPServer] xbmc -> kodi sender/CAnnouncementManager
not sure about a few xbmc -> kodi like line #107 #1261 #1263 #1265