[Resolved] Scanning during Live TV (1 Viewer)

PureLoneWolf

Portal Pro
September 16, 2006
61
3
Home Country
Germany Germany
Re: Scanning during Live TV

Thanks :)

I will give this a try ASAP...should I make sure that I update to the latest version of MP-TVSeries before I try this DLL though?

Thanks
 

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Re: Scanning during Live TV

    Sorry there is no other way built into the plugin except for detecting fullscreen video. I guess it fails for you, maybe everyone for LiveTV. Its possible LiveTV does not use g_Player which is used to check fullscreen state (can anyone confirm?).

    For now I would change the schedule to every 60mins so its less of an impact or buy a better system ;)

    Which method or variable do you check ?

    Tony
    Interesting, I had a look at code and could of sworn I was using some member variable from g_Player. Apparently Not! Im using:

    Code:
    bool isFullscreen = false;
    if (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO)
      isFullscreen = true;
    return isFullscreen;
    I had a look through the window enum and there is a WINDOW_TVFULLSCREEN entry as well so will add that.

    Here is a test dll.

    Having a deeper look at the code, GUIGraphicsContext.IsFullScreenVideo might be the better property to use. Any MediaPortal developers care to comment on the best method?
     

    mastyman

    MP Donator
  • Premium Supporter
  • June 1, 2010
    364
    68
    Auckland
    Home Country
    New Zealand New Zealand
    Re: Scanning during Live TV

    Here is a test dll.

    this test dll is no longer scanning during LiveTV and Recordings when "Scan Remote Shares while Fullscreen video is active" is unticked :)

    Code:
    00000006 - 21/01/2012 4:51:18 p.m. - File Watcher: Performing File Scan on Import Paths for changes
    00000006 - 21/01/2012 4:51:18 p.m. - File Watcher: Fullscreen Video has been detected, aborting file scan
     

    PureLoneWolf

    Portal Pro
    September 16, 2006
    61
    3
    Home Country
    Germany Germany
    Re: Scanning during Live TV

    I can confirm that my stuttering issues are a thing of the past :)

    Absolutely superb, thank you very much :)

    Will this DLL be included in future updates? Or should I keep hold of it?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Just a quick question. Will the background scan get paused / interrupted if TV or video playback is started during the scan that is in progress? As the scan could last for many minutes (?) in large collections so it could still cause occassional stuttering if it wont get paused / cancelled.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Once its started it continues until finished. Perhaps in future release could pause it.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Re: Scanning during Live TV

    Having a deeper look at the code, GUIGraphicsContext.IsFullScreenVideo might be the better property to use. Any MediaPortal developers care to comment on the best method?

    It might be safer to use as I think it would be wise to disallow the scan to be done even when the video / tv is playing in a small overlay (stuttering would be visible there and then it wouldn't cause toggling between scan / not scan when user might be in EPG etc.)

    Code:
        /// <summary>
        /// Get/Set whether a a movie (or livetv) is currently playing
        /// </summary>
        public static bool IsPlayingVideo

    It gets set on every Process() pass with:

    Code:
    GUIGraphicsContext.IsPlayingVideo = (g_Player.IsVideo || g_Player.IsTV);
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Once its started it continues until finished. Perhaps in future release could pause it.

    Yep, it would be good to pause it as following common use cases could still have stuttering on some systems:

    #1 start MP or resume HTPC
    #2 do something (listen to music for example)
    #3 scan starts
    #4 user starts BD / video / tv

    or

    #1 start tv
    #2 go to EPG
    #3 scan starts
    #4 go back to full screen tv

    Later one could be fixed by using the IsPlayingVideo().
     

    Users who are viewing this thread

    Top Bottom