[WiP] TV Server hardware-specific code refactoring (1 Viewer)

ColinT

Portal Pro
January 21, 2007
72
1
Home Country
United Kingdom United Kingdom
I apologise.
I used the TVLibrary MP 1.1 patch, as MP1.1.1 screwed up my set up so I I have reverted to MP1.1

Tuner 6 is connected (with no Diseqc) directly to LNB which pints to Astra2 (28)
Tuner 7 is connected via Diseqc to Hotbird (13) Astra 1 (19) and Astra 2 (28) I am never certain of the switch positions (MP forgets them)
My Hauppage card (I think) is on Tuner 9

The DVBT tuning attempts are for EPG downloads. I had not reconfigured these cards for the test.

For the test I disabled tuners 6 and 9 and then tried to select pre-allocated channels using tuner7 on different satellites (BBC HD, TV5MONDE FBS, Harmonic Canal 24 Horas. As this was unsuccessful, I re-enabled tuner 6 (which has a higher priority than port 7) to check it was still working.

On MP as far as I know it is difficult to have cards with different Diseqc setups, my tuner 6 uses the same settings as tuner 7, but I have only mapped the channels fro ASTRA2 that I use for it. Whilst the diseqc commands are sent, they are irrelevent, as there is no switch.

SO.... it is only card 7 channel changes attempts which were the valid test tunes. I also tried to tune scan tuner 7 to each of the satelites, but got no signals.


I didnt have a whole lot of time for the test.
After the test, I re-plugged up my Hauppauge tuner, and everything is still working.

On all the tuning attempts I am getting "No signal" rather than the "Unknown Error" that I was getting after I blew my card.

Hope this helps

Colin T :confused:
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Ah, okay that all makes sense now! :D

    Alright, here is the debug build that I promised. You may actually find that this build will work for you (I noticed that I left an underscore out of the BGT3595 HWID :oops::sorry:). I've still added the extra debug just in case something else is not correct as well...
     

    Attachments

    • TVLibrary[1.1.0_Debug].zip
      181.6 KB

    NTAuthority

    Portal Member
    June 7, 2008
    2
    0
    Heh, it seems the most recent package for the 1.1.1 tag build actually contains the exact same files as the build for the SVN trunk... might be some people will get confused by it. :)

    EDIT: also, is the 'patch' for the Pinnacle cards no longer included in here, am I just misconfiguring my DiSEqC settings or is the '710iX' not detected (and I'll have to compile my own anyway :( )? It is the same card as the 7010 apparently, but only with single tuners and a SAA7160 frontend. Device ID is PCI\VEN_1131&DEV_7160&SUBSYS_010411BD, I'll test if it's actually equal tomorrow.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Yes, the code patch for SVN HEAD and 1.1.1 are the same. The pre-compiled DLLs in the TVLibrary zip files are different though because SVN HEAD has other changes. I thought it was clearer to have one code patch and one DLL zip for each version. Sorry for the confusion! :sorry:

    Pinnacle cards are *definitely* supported! I myself am using 2 7010ix cards. The reason for the "Blackgold" references is that I'm using Blackgold drivers, and I know that the patch also applies to the Blackgold BGT3540 and BGT3595. Up until now I was not sure if any other Pinnacle cards were affected. Unfortunately if the patch is going to support your card then I have to manually add your HWID (thank you for providing this :D) and recompile the DLLs - there is no other easy way. I can do this for you but I would prefer to wait for ColinT to finish his testing before I create a new version because it takes me about half an hour. If you're in a rush then you're welcome to compile DLLs for yourself...

    Thank you for your interest! :)
     

    NTAuthority

    Portal Member
    June 7, 2008
    2
    0
    Yes, the code patch for SVN HEAD and 1.1.1 are the same. The pre-compiled DLLs in the TVLibrary zip files are different though because SVN HEAD has other changes. I thought it was clearer to have one code patch and one DLL zip for each version. Sorry for the confusion! :sorry:

    Well, that's actually where you messed up... the 1.1.1 binaries package contained the same DLLs as the one for the SVN, and as such errored out with a MissingMethodException for TvDatabase. :p

    Also, it seems the patch does not apply properly to 1.1.1 even, getting a lot of 'hunk failed' messages.

    EDIT: okay, at least I can confirm the Blackgold modification works for me -- I finally get different data from the second satellite I got configured, which means the switching succeeded.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I'm glad to hear that the patch works for you... well at least sort of :confused::oops:

    Are you able to help me figure out what is wrong with the 1.1.1 patch and binaries? Perhaps I reverted to the wrong revision for my 1.1.1 patch? I am running SVN head here and it is quite time consuming and a little difficult to test 3 versions. I still have the DLL zips that I originally uploaded on my desktop and they are *definitely not the same*. Confirmed by hash...

    [Edit: have re-downloaded from the first post. The files are not the same. This means either I have got the wrong tag checked out or the files you downloaded got mixed up somehow... :confused:]
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    AW: TV Server hardware-specific code refactoring

    Hi all,

    nice to see this development here, based on the interface IHardwareProvider.

    probably you don't know that this interface was only one single part of a major rework I did in my old branch: https://sources.team-mediaportal.com/svn/public/branches/morpheus_xx/TvEngine3/TVLibrary

    the features there moved TV hardware specific code into plugins, modified the whole CI / Diseqc handling to use the interfaces and a lot more.

    this stuff never got into the trunk, when I developed it 1 year ago we had feature freeze, now I won't port the changes, because I think it's too "late" for such quite big rework.

    But maybe you can get more ideas how to restructure the tv handling, please check the branch I mentioned above!

    Morpheus_xx

    Edit: some more information, because there were only a developer-internal thread about this topic:

    ---------------- quoting ----------------
    I made big progress in reworking the hardware support.

    After implementing needed interfaces I laid out all hw-specific code to separate .dlls, put them all under tvserver\hardwareplugins. also I've added some priorities to ensure proper detection order:

    Code:
    exactly hardware --> generic hardware --> additonal devices
    i.e.
    Technotrend        --> GenericBDAS       --> Hauppauge WinTvCI USB
    where Hauppauge WinTvCI is marked as "multiple device", so it will detect even another specific provider was found (i.e.Hauppauge diseqc provider)

    now they get loaded and their features / capabilities are shown in log:

    Code:
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.ConexantBDA.dll loaded True supported Interfaces:IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.DigitalEverywhere.dll loaded True supported Interfaces:IDiSEqCController,IConditionalAccessProvider
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.GenericATSC.dll loaded True supported Interfaces:IAtscQamProvider
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.GenericBDAS.dll loaded True supported Interfaces:IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.GenPixBDA.dll loaded True supported Interfaces:IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.Hauppauge.dll loaded True supported Interfaces:IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.Hauppauge_WinTvCI.dll loaded True supported Interfaces:IConditionalAccessProvider
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.KNC.dll loaded True supported Interfaces:IConditionalAccessProvider,IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.ProfRed.dll loaded True supported Interfaces:IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.TechnoTrend.dll loaded True supported Interfaces:IConditionalAccessProvider,IDiSEqCController
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.TwinHan.dll loaded True supported Interfaces:IDiSEqCController,IConditionalAccessProvider
    2009-11-09 16:14:13.474054 [TVService]: HardwarePlugin: TvLibrary.HardwarePlugin.ViXSATSC.dll loaded True supported Interfaces:IAtscQamProvider
    ....

    then begins the hardware detection:
    Code:
    2009-11-09 16:14:13.474054 [TVService]: Check for Conexant
    2009-11-09 16:14:13.474054 [TVService]: Check for FireDTV
    2009-11-09 16:14:13.474054 [TVService]: Check for GenPix
    2009-11-09 16:14:13.474054 [TVService]: GenPix tuner filter name: TechnoTrend BDA/DVB-C Tuner
    2009-11-09 16:14:13.474054 [TVService]: GenPix tuner filter pin name: MPEG2 Transport
    2009-11-09 16:14:13.474054 [TVService]: Check for Hauppauge
    2009-11-09 16:14:13.474054 [TVService]: Check for KNC
    2009-11-09 16:14:13.474054 [TVService]: KNC: Disable CI
    2009-11-09 16:14:13.474054 [TVService]: KNC: Disposing CI handler
    2009-11-09 16:14:13.474054 [TVService]: Check for ProfRed
    2009-11-09 16:14:13.474054 [TVService]: Check for TechnoTrend
    2009-11-09 16:14:13.489654 [TVService]: TechnoTrend: unable to open the device
    [B]2009-11-09 16:14:13.489654 [TVService]: Successful detected TechnoTrend card
    2009-11-09 16:14:13.489654 [TVService]: Registering TechnoTrend card ConditionalAccess feature
    2009-11-09 16:14:13.489654 [TVService]: Registering TechnoTrend card CI menu feature
    2009-11-09 16:14:13.489654 [TVService]: Registering TechnoTrend card DiSEqC feature
    [/B]2009-11-09 16:14:13.489654 [TVService]: Check for WinTvCI USB

    works very well :D
    ---------------- quoting ----------------

    ---------------- quoting ----------------
    Testresults (Nov. 2009):
    Code:
    TvLibrary.HardwarePlugin.ConexantBDA.dll        --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.DigitalEverywhere.dll  --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B],IConditionalAccessProvider [COLOR="DarkGreen"][B][working!][/B][/COLOR]
    TvLibrary.HardwarePlugin.GenericBDAS.dll        --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.GenPixBDA.dll          --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.Hauppauge.dll          --> DiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.Hauppauge_WinTvCI.dll  --> IConditionalAccessProvider [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.KNC.dll                --> IConditionalAccessProvider  [COLOR="DarkGreen"][B][working!][/B][/COLOR],IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.ProfRed.dll            --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.TechnoTrend.dll        --> IConditionalAccessProvider [COLOR="DarkGreen"][B][working!][/B][/COLOR],IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.TwinHan.dll            --> IDiSEqCController [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B],IConditionalAccessProvider [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.GenericATSC.dll        --> IAtscQamProvider [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    TvLibrary.HardwarePlugin.ViXSATSC.dll           --> IAtscQamProvider [B][COLOR="DeepSkyBlue"][please test!][/COLOR][/B]
    ...
    All vendor related function got moved to their own .dll, the ConditionalAccess class now only calls interfaces (after interpreting the capabilities)
    ---------------- quoting ----------------
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thank you for visiting Morpheus_xx :)

    I will definitely take a look at your branch. I thought about refactoring the CAM/CI code as well (it really needs it!) but I imagine it is quite "fragile" and I don't have hardware to test with.

    Do you think this patch (in its current form) is likely to be rejected because of the number of changes? When you say "too late", do you mean for 1.x, or 1.2.x? I am interested to know whether the TV Server is being re-written from the ground up for MediaPortal 2.0. I'd like to help if possible...
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    AW: TV Server hardware-specific code refactoring

    The "patch" was too late and rejected in 1.1 because of feature freeze.

    For 1.2 it would be possible, but I decided not to put more developments effort into this topic. I also know some parts which would need to be touched as well, i.e. the graph building with additional CI filters (WinTV CI, Digital Devices). But as all my changes are available to the public, everyone can bring the code up-to-date and provide new patches. I know that the team surely would be happy to see this.

    I currently only work on MP2, and main parts of TvLibrary will be rewritten and restructured. There is already some work in progress. And I don't want to do such major changes twice...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hi everyone

    Updated patches and binaries are now available from the first post. Not too many changes, however I thought it was important to find out and fix whatever was wrong the 1.1.1 patch/binary (thanks NTAuthority)...

    Enjoy
     

    Users who are viewing this thread

    Top Bottom