[WiP] TV Server hardware-specific code refactoring (2 Viewers)

mm1352000

Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    • Thread starter
    • Moderator
    • #41
    Okay, understood. Why not resend the DiSEqC command after waiting 1-2 seconds for lock?

    The new algorithm could be:

    1. Try send DiSEqC command normally (before graph is running).
    2. Run graph.
    3. Before checking for lock, resend the DiSEqC command if the first command failed.
    4. If lock is not aquired after x seconds in LockedInOnSignal() then resend the DiSEqC command again.

    Thoughts?

    [Edit: By the way, the reason I asked about the motor is because of this issue...]
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Denmark Denmark
    Country flag
    hi!

    1,2, and 3 seems ok.
    but waiting too long in i step 4 (LockedInOnSignal) and it could cause an unnecessary delay - so resending the command ASAP would be good.

    I guess this can all defined in the diseqc provider class or similar that u have for each card ?

    I have no motor setup. not sure anyone in the team has btw.

    /gibman
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    • Thread starter
    • Moderator
    • #43
    hi!
    ...but waiting too long in i step 4 (LockedInOnSignal) and it could cause an unnecessary delay - so resending the command ASAP would be good...
    I fully agree. The problem is how to detect as early as possible that the DiSEqC command needs to be resent. In your specific case (Hauppauge), at each step in the proposed algorithm:

    1. Send DiSEqC command: the provider returns success.
    2. Run graph: still okay.
    3. Resend: assumed not required because the provider returned success.

    It is impossible to detect that the command failed to be sent or the switch didn't change until you find that you can't lock. Perhaps we need to be more proactive? A better algorithm (???):

    1. Try send DiSEqC command normally (before graph is running).
    2. Run graph.
    3. Before checking for lock, resend the DiSEqC command if the provider (for example, Hauppauge) often fails to send the command properly. This can be customised to each provider.
    4. Resend the DiSEqC command every 2 seconds during LockedInOnSignal().

    The only concern I would have about this 2nd algorithm is that some hardware/drivers might not handle this. I don't know of any cards like that but there are bound to be some out there.

    Also, resending a DiSEqC command can take quite a lot of time. According to the standard you have to wait 100ms after sending each command. That is on top of the time it takes for the driver to send the command. It adds up pretty quickly. Also, what happens when someone (probably me ;) ) comes along and extends DiSEqC support to cascaded switches/motors?

    I guess this can all defined in the diseqc provider class or similar that u have for each card ?
    The providers each have an OnRunGraph() callback so it is easy to resend the DiSEqC command after the graph has started. Anything that needs to be done while checking for lock (LockedInOnSignal()) would have to be done for all providers in TvCardDvbBase/TvCardDVBS.

    It should definitely be possible to add an optional interface to hardware providers that allows them to specify their lock detection behaviour (perhaps as an extension to the custom tuning interface?). For example, for some cards, signal quality > 0 might indicate that the card is locked. If you add such an interface then it would be possible to define custom DiSEqC behaviour for the LockedInOnSignal() function. I'd much rather leave that until after the main refactoring is complete and confirmed as stable. There is already quite a high risk involved in this patch...

    I have no motor setup. not sure anyone in the team has btw.
    Okay - thanks for mentioning that.
     

    MaxT

    MP Donator
  • Premium Supporter
  • December 9, 2009
    112
    13
    Russian Federation Russian Federation
    Country flag
    Hi mm1352000!

    I reply here to your post in MP1 https://forum.team-mediaportal.com/television-mytv-frontend-tv-server-90/there-option-retune-tuned-channel-errors-76465/index6.html#post684710. I tried the patch with my MP 1.2a setup, but unfortunately it pops an error for TV Library and TV Library Interfaces :( (for sure before trying it, I restored from backup files overwritten by your V6 from that thread). I tried TvLibrary[v5][SVN_HEAD_26867].zip

    Are there any chanced to have MP 1.2a version of this patch? or should I better try with older MP version?

    Regards,

    MaxT
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    • Thread starter
    • Moderator
    • #45
    Are there any chanced to have MP 1.2a version of this patch? or should I better try with older MP version?
    Absolutely - you can have a version for 1.2.0a :)
    You can find the DLLs and patch in the first post as usual.
     

    MaxT

    MP Donator
  • Premium Supporter
  • December 9, 2009
    112
    13
    Russian Federation Russian Federation
    Country flag
    Hi mm1352000!

    In fact, if you have some time it would be really awesome if you could test the patch too... just to check that the Twinhan support still works.
    Tested on MP 1.2a and Twinhan support does work! However, as expected can't tune to another sat from a first tune attempt.

    Please let me know if you need more testing from my side.

    BR

    MaxT
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    • Thread starter
    • Moderator
    • #47
    Great, and thank you so much for testing! :)
    Only one other thing - do you mind posting your tv.log so I can double check that everything looks correct.

    Thank you *very* much once again for your time :D
     

    MaxT

    MP Donator
  • Premium Supporter
  • December 9, 2009
    112
    13
    Russian Federation Russian Federation
    Country flag
    Hi again mm1352000!

    Here are the logs. FTAs works fine, but not scrambled ones while using MD*** :( Then I just restored from the backup and MD*** is working. May be there are some settings there which I do not know and could try out?

    Regards,

    MaxT
     

    ColinT

    Portal Pro
    January 21, 2007
    72
    1
    United Kingdom United Kingdom
    As 1.1.2 is now out, is the 1.1.2a patch usable on this latest release? If not can you do a new one.
    I am working well on 1.1.0 with the patch (no more card problems, but some of the 1.1.2 fixes are worth having

    BTW I see the thread is WIP now. Do you think you can get it absorbed as full WP? I would think it would be useful for many, but I was worried the the extent of the change were such that they wouldnt risk it.

    Keep up the good work and :D for this lifesave forme.

    ColinT
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    • Thread starter
    • Moderator
    • #50
    Hi ColinT

    No, definitely *don't* use the 1.2.0a patch with 1.1.2. It won't work. I can do a patch for 1.1.2 - will post it tonight after I get home from work (in 8 hours or so). It will of course include all the new refactoring I have done as well as the BGT3595 DiSEqC support. It would be difficult to separate that out now. Please report any errors you encounter...

    In response to your other comments: what does "WP" stand for? I can tell you that this patch won't be in 1.2.0. It just isn't ready. 1.3.0 is an outside chance (??? - not sure about the general feeling of the rest of the team), but I think the changes are so radical that they may realistically only be accepted for MP 2. Don't worry too much about that. I'll be providing support for you whether this patch makes it into SVN in a few months or a few years (let's hope it doesn't take that long!!!). Remember that my cards require this patch to work too :D.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 2)

    OP Similar threads Forum Replies Date
    MrGrymReaper Hardware Accelerated Encoding of TV Server Watch / Listen Media 5
    J Clock speed vs multi-core CPU's Can MediaPortal benefit from multi core cpu's? General 0
    E [solved] TV-Server Configuration Missing TV-Server 9
    F MediaPortal 1.16 server crashing due to user error? General Support 5
    E TV-SERVER control TV-Server 3
    CanadianEh MP TV server rebuild with Colossus 2 - Kodi clients receive PMT error when playing videos recoreded by Colossus 2 TV-Server 1
    M 1.25.0 Tv Server Configuration Italian Dvb-t2 test channel preview error Television (MyTV frontend and TV-Server) 7
    M TV Server Preview Window is blank, sounds works Television (MyTV frontend and TV-Server) 3
    catalpa ...immer mal wird der Server abgekoppelt :( Allgemeines Support- und Diskussionsforum 0
    A Keine Verbindung mit Kodi auf Server Allgemeines Support- und Diskussionsforum 11
    CyberSimian Unhandled exception in TV Server TV-Server 0
    Grisu002 Failed to startup - TV Server funktioniert nicht Allgemeines Support- und Diskussionsforum 0
    ajs [WiP] 5030: Add UHD Thumb size to TV Server MediaPortal 1 0
    toricred [solved] Configuring TV Server to use NAS General 5
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    T Server / client channel logo location Installation, configuration support 6
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    S TV-Server MP1 - Automatic search doesn't work Installation, configuration support 2
    M TV Server can't tune to some DVB-S multiplexes while other software can General 0
    J TV Server setup question Newcomers Forum 0
    D [solved] Changed username in Win10, now TV Server config crashes on fresh install Installation, configuration support 1
    I [solved] Connection to TV Server MySQL General Support 8
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    F After resume, TV Server connection screen is shown General Support 4
    R TV server crash with WintTV quadHD General 0
    Similar threads

























    Top Bottom