Posts: 5,292
Joined: Jun 2006
Reputation:
62
Jezz_X
Team-XBMC Skinner
Posts: 5,292
If this actually works well and as advertised without making it jerky movement (the original reason its frame based if I remember) I thank you lets hope one of the devs like jmarshall can check it over soon
Posts: 1,062
Joined: May 2004
Reputation:
0
malloc
Team-XBMC Developer
Posts: 1,062
Am I missing something here with respect to m_frameDiffs? It appears you wanted a vector to store the last 20 diffs so that you can take the average. Unfortunately it doens't appear to have the intended effect. The only time information ever gets added to it is in the destructor, immediately before the entire list is lost! So the list will never have size greater than one. In addition, if the C++ language somehow broke down and you did manage to get 20 elements in the list, it would never change after that point because you never take things off the list. I think you need to take a second look at this patch and resubmit. You may want to consider using an exponential weighted moving average also to avoid having to keep a list.
Also, you may need to watch out for wrapping in the time value. This will happen every ~49 days. It's possible someone may leave their media center up for that long.
Posts: 132
Joined: May 2008
Reputation:
0
offtopic:
my media center has been running for like 30 days and haven't been 'trying' to keep it online.. just as a reference...
Posts: 11
Joined: Jun 2008
Reputation:
0
I'm actually using an exponential weighted average in that code, I just do the average of the first 20 normally so it starts off with a good base- otherwise if the fps for the first few frames was odd (say, if other components were still loading in the background), it would be heavily weighed towards that average and scroll at the wrong speed. And the diff is a bit misleading there- none of that code is in the destructor, but rather in Render(), so it happens every frame.
I hadn't realized about the time wrapping, so I'll put up a newer version that compensates for that, and also incorporates a few other changes I've made (getting rid of those first 20 diffs once they're not needed, and making the feed scroll backwards if it's given a scrollspeed in the negative- to support backwards languages such as arabic).
Josh
Posts: 420
Joined: May 2004
Reputation:
0
yuvalt
Retired Team-Kodi Member
Posts: 420
I reviewed the patch for RTL RSS scroll and it's both very partial and wrong. Reversing the string is not how logical to visual conversion is done. Also the scroll was jerky. If you have a better patch, let me know. Thanks.
Posts: 5,292
Joined: Jun 2006
Reputation:
62
Jezz_X
Team-XBMC Skinner
Posts: 5,292
Ummm didn't jmarshall allready add this long time ago now
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Yes - I didn't touch the "scroll backwards" stuff though, as TBH it looked wrong.