[fixed] Page scroll in EPG (1 Viewer)

MusicMan62

Portal Pro
November 2, 2010
53
6
Frome, UK
Home Country
United Kingdom United Kingdom
MediaPortal Version: 1.2.0.0 Beta
MediaPortal Skin: StreamedMP
Windows Version: XP MCE SP3
CPU Type: AMD Athlon 64X2 (690) 2.3GHz
HDD: WDC 500GB
Memory: 2GB
Motherboard: MSI K9AGM2-FIH
Video Card: ATI Radeon X1200
Video Card Driver:
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card: Compro Vista E700
1. TV Card Type: Dual DVB-T
1. TV Card Driver:
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec:
MPEG2 Audio Codec:
h.264 Video Codec:
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection:

There is a difference in behaviour with the page scroll in the EPG (using the channel up and down buttons). With LiveTV off it works fine and scrolls immediately up or down a page, but when LiveTV is on it seems to slowly scroll through each channel till it reaches it's destination. It didn't do this with 1.2 Alpha
 

Wbunaarf

Portal Pro
December 9, 2005
534
103
Sweden
Home Country
Sweden Sweden
There is a difference in behaviour with the page scroll in the EPG (using the channel up and down buttons). With LiveTV off it works fine and scrolls immediately up or down a page, but when LiveTV is on it seems to slowly scroll through each channel till it reaches it's destination. It didn't do this with 1.2 Alpha

I can confirm this issue running a current svn (27927, both before and after applying patch for page up/down inconsistency in epg).

The logs show that I start mp and enter epg, jump a few pages down and then back up without a problem. Then I start TV, return to epg and again jump a few pages down . As reported above, every channel seems to be scrolled through and I can see the program details changing.

//Johannes
 

elliottmc

Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Hi,

    I can confirm this behaviour.

    There is nothing in the PageUp/PageDown code which differs when the TV is actually playing, as far as I can tell.

    Could you clarify (I don't have time to check this evening)? Are the logs different depending on whether TV is playing or not?

    My gut feeling is that this is something that happens the same every time, but when there is no video playback, it is so fast that you don't see it. Only when the computer is 'busy' do you actually see the problem.

    Of course if the logging disagrees with this, then it should be looked at.

    Mark
     

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    Hi,

    Could you clarify (I don't have time to check this evening)? Are the logs different depending on whether TV is playing or not?

    I've had a look, and I couldn't see anything obvious. Then again, I don't know what exactly to look for... ;)

    This would probably be EPG with TV off

    Code:
    2011-05-22 22:51:14.142422 [Debug][MPMain(1)]: Window: WindowPlugins.home.GUIBasicHome deinit
    2011-05-22 22:51:14.144422 [Debug][MPMain(1)]: TextureManager: CleanupThumbs()
    2011-05-22 22:51:14.161423 [Debug][MPMain(1)]: Window: TvPlugin.TVHome init
    2011-05-22 22:51:14.181424 [Info.][MPMain(1)]: ChannelNavigator::Reload()
    2011-05-22 22:51:14.181424 [Info.][MPMain(1)]: get channels from database
    2011-05-22 22:51:15.427496 [Info.][MPMain(1)]: found:653 tv channels
    2011-05-22 22:51:15.428496 [Info.][MPMain(1)]: TvNotify:OnNotifiesChanged
    2011-05-22 22:51:15.643508 [Info.][MPMain(1)]: Done.
    2011-05-22 22:51:15.643508 [Info.][MPMain(1)]: get all groups from database
    2011-05-22 22:51:15.888522 [Info.][MPMain(1)]: loaded 15 tv groups
    2011-05-22 22:51:15.888522 [Info.][MPMain(1)]: tv home init:TV3 (S)
    2011-05-22 22:51:15.888522 [Info.][MPMain(1)]: tv home init:TV3 (S) done
    2011-05-22 22:51:17.971641 [Debug][MPMain(1)]: Window: TvPlugin.TVHome deinit
    2011-05-22 22:51:17.973641 [Debug][MPMain(1)]: TextureManager: CleanupThumbs()
    2011-05-22 22:51:18.213655 [Debug][MPMain(1)]: DialogWindow: TvPlugin.TVGuide init
    2011-05-22 22:51:21.519844 [Info.][MPMain(1)]: TvNotify:LoadNotifies
    2011-05-22 22:51:21.703855 [Info.][MPMain(1)]: TvNotify: 0 notifies

    And this with TV on

    Code:
    2011-05-22 22:51:56.426841 [Debug][MPMain(1)]: fullscreentv:show gui
    2011-05-22 22:51:56.427841 [Debug][MPMain(1)]: Windowmanager: Goto previous window
    2011-05-22 22:51:56.428841 [Debug][MPMain(1)]: TvFullScreen:deinit->OSD:Off
    2011-05-22 22:51:56.428841 [Debug][MPMain(1)]: Window: TvPlugin.TvFullScreen deinit
    2011-05-22 22:51:56.429841 [Debug][MPMain(1)]: TextureManager: CleanupThumbs()
    2011-05-22 22:51:56.447842 [Debug][MPMain(1)]: DialogWindow: TvPlugin.TVGuide init
    2011-05-22 22:51:56.582850 [Debug][(20)]: PlaneScene: crop T, B  : 0, 0
    2011-05-22 22:51:56.583850 [Debug][(20)]: PlaneScene: crop L, R  : 0, 0
    2011-05-22 22:51:56.583850 [Info.][(20)]: PlaneScene: video WxH  : 720x576
    2011-05-22 22:51:56.583850 [Debug][(20)]: PlaneScene: video AR   : 16:9
    2011-05-22 22:51:56.583850 [Info.][(20)]: PlaneScene: screen WxH : 203x115
    2011-05-22 22:51:56.583850 [Debug][(20)]: PlaneScene: AR type    : NonLinearStretch
    2011-05-22 22:51:56.583850 [Debug][(20)]: PlaneScene: PixelRatio : 1
    2011-05-22 22:51:56.584850 [Debug][(20)]: PlaneScene: src        : (0,23)-(720,551)
    2011-05-22 22:51:56.584850 [Debug][(20)]: PlaneScene: dst        : (86,558)-(289,673)
    2011-05-22 22:52:06.367409 [Debug][MPMain(1)]: g_Player.doStop() keepTimeShifting = False keepExclusiveModeOn = False

    My gut feeling is that this is something that happens the same every time, but when there is no video playback, it is so fast that you don't see it. Only when the computer is 'busy' do you actually see the problem.

    Of course if the logging disagrees with this, then it should be looked at.

    While I think your feeling sounds very plausible, I believe it would be nice to have a look at it anyway.

    //Johannes
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    While I think your feeling sounds very plausible, I believe it would be nice to have a look at it anyway.

    //Johannes

    There doesn't seem to be much in your logs showing 'PageUp' or 'PageDown'. I could add some logging to this section in order to confirm that the same code is being used.

    Perhaps it refreshes at intervals before the full scroll (if that makes sense).

    Try comparing the behaviour of PageUp and PageDown. At the moment, PageUp is buggy, and doesn't have quite as much code in it.

    If PageUp is fine and PageDown is not, this might be useful to know.

    Mark
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I am 90% sure this is down to the speed of your system. The PageUp and PageDown code simply calls OnUp/OnDown the required number of times. If TV is playing my guess is that skin rendering is given less resources to ensure video plays correctly.

    that said, in OnPageDown could someone try changing
    Code:
            OnDown(true);
    to
    Code:
            OnDown(false);
    (line 3889)

    and see if that makes any difference
     

    Wbunaarf

    Portal Pro
    December 9, 2005
    534
    103
    Sweden
    Home Country
    Sweden Sweden
    Hi,

    I am 90% sure this is down to the speed of your system.

    Well, that's of course always a possibility.

    that said, in OnPageDown could someone try changing
    Code:
            OnDown(true);
    to
    Code:
            OnDown(false);
    (line 3889)

    and see if that makes any difference

    I changed that line (or rather 3914 in my patched 27927 as well as in 27931) in TvGuideBase.cs, and... Yeah baby! :) Pressing page up still goes through every line, as expected, while page down instantaneously jumps 'a page' down. As a side note, now that I've got the speed back jumping down I notice that there's a delay when jumping up even when TV is off. I actually noticed this before as well, but since it was slow both ways then I just put it down to a slow wlan or whatever.

    Edit: Looking in the code, I see that OnUp takes two arguments rather than the one of OnDown.

    Code:
    private void OnDown(bool updateScreen)
    [...]
    private void OnUp(bool updateScreen, bool isPaging)

    I don't know what the second parameter is for, so to test I'll set it to (false,true) rather than (true,true).

    Edit 2: I'm now on 27931 with both OnUp and OnDown changed, and initial testing indicates that it works both fast and fine.

    //Johannes
     

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Home Country
    Belgium Belgium
    Looking in the code, I see that OnUp takes two arguments rather than the one of OnDown.

    Code:
    private void OnDown(bool updateScreen)
    [...]
    private void OnUp(bool updateScreen, bool isPaging)

    I don't know what the second parameter is for, so to test I'll set it to (false,true) rather than (true,true).

    //Johannes

    The controls for day spin and time block aren't reachable when ispaging = true,
    this should only be true when using page up (You don't wanna jump into the controls when using page up).
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Hi,

    So it seems as though OnPageUp() should call OnUp(false, true) and OnPageDown() should call OnDown(false) to eliminate this effect.

    Perhaps one of the development team should confirm that this is the case, and I will mantis it.

    In the meantime, I will make this change locally and test.

    Edit: having looked at the code, in OnUp() we have

    Code:
          if (updateScreen)
          {
            UnFocus();
          }

    and then

    Code:
            if (updateScreen)
            {
              Update(false);
              SetFocus();
              SetProperties();
            }

    with a slight variation for single channel view.

    In OnPageDown() for the actual scrolling, we have

    Code:
          UnFocus();
          for (int i = 0; i < Steps; ++i)
          {
            OnDown(false);
          }
          Correct();
          Update(false);
          SetFocus();

    so all we are missing at the end is SetProperties(); and for single channel view we would be missing UpdateCurrentProgram();

    so do we simply need to add these to the end after the loop to make this safer?

    Mark
     

    Users who are viewing this thread

    Top Bottom