TBS: CI/CAM support and other improvements (2 Viewers)

Markus1980Wien

Portal Member
August 28, 2012
21
64
44
Vienna
Home Country
Austria Austria
TBS_CI Patch for MediaPortal 1.6 PRE RELEASE

How to install:
1. Stop TV-Service.
2. Copy the two files from the attached zip-file to "%Program Files%\Team MediaPortal\MediaPortal TV Server" directory.
3. Start TV-Service

(TvLibrary.Interfaces.dll does not have to be patched anymore)
 

Attachments

  • 1.6.zip
    367.3 KB

zoolo

Portal Member
December 3, 2013
10
8
55
Home Country
Sweden Sweden
I have recently got hold of three TBS 5880.
And from what i can see in the code it doesnt support multiple units with CI slots as the only input to On_Start_CI in the CI API is the device name. And multiple devices has the same name. (So we always get the same handle)
Does anyone know if there are any deviceindex argument that can be used or any other way to get hold of the correct handle.
 

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Does anyone know if there are any deviceindex argument that can be used or any other way to get hold of the correct handle.
    yes in the newer TBSCIabi.dll
    Here is the new version which changed the On_Start_CI interface like this:


    extern "C" HANDLE On_Start_CI( IBaseFilter *Filter, WCHAR *tuner_name, int iDeviceIndex )


    Yea,you need to change the MP's code, If all is ok, We want to release this new version ASAP,

    because a lot of users have this problem.
    It is not implemented in this patch, but I wrote a patch for TVE 3.5 and it will be available there ;)
     

    Attachments

    • TbsCIapi-V1.0.1.3.zip
      149.2 KB

    zoolo

    Portal Member
    December 3, 2013
    10
    8
    55
    Home Country
    Sweden Sweden
    Thanks FreakyJ for the info.
    I tested it now but the problem remains the same.
    Eg I get the same handle for the different cards.
    If i change the calling convention for the invoke i also get a message about wrong arguments.
    Could i get hold of your source for the patch for TVE 3.5?
    Maybe there is something i have missed.

    As soon as i have a working patch i will publish it here.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I didn't found a good way to implement it in TVE3, but I'm no dev :/
    TVE3.5 is a bit different, but here is my patch for TVE3.5. It is pretty straight forward.
    This is the file from the HardwarePlugin for TVE 3.5 without my patch. It still has to be applied to git :)
    https://github.com/MediaPortal/Medi...lugins/CustomDevices/Turbosight/Turbosight.cs

    If you have more questions please ask and I will try my best to answer those ;)
     

    Attachments

    • turbosight_patch_v2.patch
      1.8 KB

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Some more information from my internal post, maybe it will help you ;)

    as you all know mm and I are in very close contact with TBS. They will release a TBSCIapi.dll in the next days which fixes the following problems:
    - MP (MP1 and MP2) crashes if you change any card settings
    - you can't use multiple tuners with a ci interface

    for the last fix they changed the interface:
    On_Start_CI( IBaseFilter *Filter, WCHAR *tuner_name, int iDeviceIndex )
    To make things clearer to the rest of the team here some quotes from the conversation:
    I meant to ask you...
    Is the device index related to the hardware?


    For example:
    User has 2 x TBS 5980 CI.
    Device path #1 = ven_1234&dev_5678&subsys_01234567
    Device path #2 = ven_1234&dev_5678&subsys_01234568


    Do we need to use the TBS SDK interface to get the correct device index for each tuner, or do we just choose unique values for each tuner?
    answer:
    Maybe you misunderstand the tuner index value ,it is not about the hardware.Just the soft
    index value.


    >do we just choose unique values for each tuner?
    yea, that is what we want ,: )
    So we use the tuner order index value as parameter.
     

    zoolo

    Portal Member
    December 3, 2013
    10
    8
    55
    Home Country
    Sweden Sweden
    I am quite close to get it working. Some glitches left. But the key point here was after my discussion with the guys at TBS.
    Ever tuner needs to have its own instance of the dll. So you cannot just use the same physical dll for all tuners.
    You need to have one api dll for every tuner.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Yes I know :)
    That is how it is working in TVE 3.5.
    Sorry didn't looked in the source and missed it to tell you that oO
     

    zoolo

    Portal Member
    December 3, 2013
    10
    8
    55
    Home Country
    Sweden Sweden
    Here is TVLibrary.dll that you can test for multiple TBS tuners with CI/CAM support.
    You need as many TBSCiApi.dlls that you have tuners.
    They should be named TBSCiApi1.dll, TBSCiApi2.dll etc

    Put the files in "%Program Files%\Team MediaPortal\MediaPortal TV Server"
     

    Attachments

    • TBS.1.6.Pre.zip
      366.3 KB
    • TBS.1.5.zip
      365.9 KB

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @zoolo
    would be so kind and upload the src please? At best the modified files so I will create a local repo for providing patches for future versions until TVE 3.5 is out.
    Because this feature is already in TVE 3.5 :)

    But I really appreciate your work ;)
    I will give it a test later, but sadly I have only one TBS tuner with CI.
     

    Users who are viewing this thread

    Top Bottom