CableCARD tuner support for MediaPortal 1 (4 Viewers)

mm1352000

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

    First, thanks ijourneaux for your log files. :)

    A progress update...

    I found some information on Friday morning that I thought would be really helpful. Spent the whole day at work "champing at the bit" just planning how I was going to implement and test what I had learned over the weekend. :)
    Finally got home, cranked up the computer and got to work; worked into the small hours.
    Saturday was a bit of a later start due to the late night, but I spent at least 10 hours over Saturday and Sunday alternating between coding, testing and researching. Mixed in with that was at least an hour of talking to the guys from Silicondust.

    The on-demand access to bc0508's PC was incredibly helpful - thank you again :)

    Unfortunately despite my best attempts, I don't feel like I actually make a lot of progress.
    Basically everything I tried was a failure. :(

    On 32 bit W7 we're able to detect and initialise the tuners.
    The problem comes when I try and do anything useful with them.
    I can't seem to tune with them, or even query them for basic information about the cable subscription.
    Maybe the Ceton tuners would be different - not sure at this point.

    The SD engineers seem to think I'm taking the wrong approach.
    They may be right, but I'm not entirely convinced.

    If any of you have used SageDCT v2.x you'll know that there are two ways to control the tuners.
    1. Native DRI interface with UPnP and RTP (default method in SageDCT).
    2. PBDA.
    (There is also a 3rd option - libhdhomerun - but I'm reserving that as a last resort because I don't think I'd be able to support Ceton tuners if we go down that route.)

    I originally chose to try the PBDA route because it is a great fit for the existing TV Server code. PBDA is based on BDA, which is TV Server's bread and butter so to speak. If this approach works, it could make it quite quick to get something working. The problem with this route is that the information from MS is really *really* patchy. To the point where it feels like trial and error. I thought the information that I found on Friday would help a lot but it didn't help as much as I expected. At this point I'm almost at the point where I need to put this approach aside and try the other option.

    The other option is much more problematic because TV Server and MP 1 don't have any concept of support for either UPnP or RTP. It would not be feasible for me to add UPnP and RTP support from scratch - could be a year or more of work. There is always the possibility of libraries though (using other peoples' code), and that is where things get interesting. From the research I did over the weekend, MP 2 has a great UPnP library that would be suitable for what we need. There is also an RTP library in the reworked DVB-IP filter that I think I would be able to use. The problem is pulling all that code together into something cohesive... for MP 1... and that I have no experience with UPnP or RTP - it is a huge learning curve.

    I did some experiments to try and gauge whether it would be even remotely possible.

    After a bit of fiddling, I was able to pull MP 2's UPnP library into MP 1's TV Server. I was also able to detect the Prime using this method. That is a huge step... I think. I definitely have some reservations - like that it took TV Server 5 minutes to detect the Prime on the network - but this may be the approach that I have to take. I would certainly get more support from Silicondust if I took this approach, and we'd be almost guaranteed to be able to support all 3 CableCARD tuners.

    So I'm at a bit of a decision point, not really sure which way to go.

    Anybody got any thoughts?

    Comments about your experiences with DRI (UPnP/RTP) vs. PBDA stability, speed, features... etc. from SageDCT would be ***really*** helpful right about now.

    mm
     

    bc0508

    MP Donator
  • Premium Supporter
  • September 16, 2011
    85
    13
    Home Country
    United States of America United States of America
    MM
    You are most welcome. Just let me know when you need that machine again and its yours. I can load you a w64 too when need. I wish I could be of more help on getting this working.

    BC
     

    mm1352000

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

    Well, it is almost the weekend again here and I had been hoping that some of the silent watchers would share their experiences so I could decide where to focus my energy.

    I can't say that I'm not disappointed in the response... but I'm not giving up.
    I might have a quick chat to our publicity department to try and attract a little more attention to this thread. ;)

    In the absence of other input, I also might contact babgvant and see if he is willing to offer any advice.

    Warm regards to y'all! :D
    mm
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    oh sorry mm, didn't thought hat you wanted an answer also from a silent watcher oO
    here is my opinion:

    I would definitely choose the PBDA option for the following reasons:
    • as you wrote above: PBDA fits perfectly in the current BDA structure
    • think about MP2
    If you choose the UDP & RTP way it is important to have something like an abstraction layer so that the TvLibrary can use the UDP class of MP2 if it runs as an plugin and use a separate lib/dll whatever when it runs as standalone app for MP1. I think you know what I mean.
    There would be a problem/not a good solution if there would be two UDP libs inside mp2 than...

    But as you mentioned above the downside of PBDA is the bad documentation... does all Cablecard tuners support PBDA?
     

    mediacowboy

    Portal Pro
    May 5, 2012
    134
    13
    35
    Texas
    Home Country
    United States of America United States of America
    MM,

    I agree with FreakyJ, but at the same time how would going the route of UDP & RTP affect the future with MP2? I mean I can see FreakyJ's point but in the end wouldn't it be easier to do that and then combined the two libs for MP2 and possible kill two birds with one stone.

    I can not test but I would like to see this happen in the future. My plan would be to do a couple of the HD homerun primes and have them connect to server, with a bunch of clients through out my house but I have only been playing with MediaPortal for 4 months so I am not ready to go that route. This would be awesome if it worked.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    MM,

    I agree with FreakyJ, but at the same time how would going the route of UDP & RTP affect the future with MP2? I mean I can see FreakyJ's point but in the end wouldn't it be easier to do that and then combined the two libs for MP2 and possible kill two birds with one stone.

    I can not test but I would like to see this happen in the future. My plan would be to do a couple of the HD homerun primes and have them connect to server, with a bunch of clients through out my house but I have only been playing with MediaPortal for 4 months so I am not ready to go that route. This would be awesome if it worked.

    it isn't that easy... mm said he used the upnp lib from mp2 (in mp2 this lib is a key component and as far as I know part of the core).
    in mp2 nearly everything is a plugin, morph found a way to integrate the tvservice as a plugin in the mp2 server => tvlib can access the upnp features of mp2
    so if you add now the upnp lib also directly to the tvservice there could be a problem (upnp lib exists two times) => not a good solution
    only mm can say that for sure, I'm not a dev, so you have to wait for his statement to get final clarification :p
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    oh sorry mm, didn't thought hat you wanted an answer also from a silent watcher oO
    I'm interested in hearing from anyone. The more people that share their thoughts, the better. That including people who can't test, don't have CableCARD tuners, and at the moment especially people that want to use MP but that are forced to use other software. :)

    I would definitely choose the PBDA option for the following reasons:
    • as you wrote above: PBDA fits perfectly in the current BDA structure
    • think about MP2
    If you choose the UDP & RTP way it is important to have something like an abstraction layer so that the TvLibrary can use the UDP class of MP2 if it runs as an plugin and use a separate lib/dll whatever when it runs as standalone app for MP1. I think you know what I mean.

    There would be a problem/not a good solution if there would be two UDP libs inside mp2 than...
    The UPnP code in MP 2 seems to be quite self contained.
    I had to pull 3 DLLs into the TVLibrary dependencies:
    1. UPnP.dll
    2. MediaPortal.Utilities.dll
    3. HttpServer.dll
    I would not include the code directly as that would just make things messy as you say.
    For RTP, I'm thinking to try and use the DVB-IP source filter as the source filter for CableCARD tuners as well. I'm not sure how feasible that would be. Maybe @georgius has some thoughts about that.

    But as you mentioned above the downside of PBDA is the bad documentation... does all Cablecard tuners support PBDA?
    Any CableCARD tuner that is supported in WMC should work... because WMC uses PBDA. PBDA has the UPnP and RTP support built in so that I wouldn't have to care about it. I could just focus on good integration into MP. As you say, the problem is the documentation and that I am a little stuck with PBDA at the moment - I don't know what to try next.

    I did speak to babgvant (author of SageDCT - basically a plugin for supporting CableCARD tuners in SageTV). He recommended to go with DRI/UPnP/RTP because:
    1. PBDA only supports W7+. It would be possible to support XP and Vista with the DRI/UPnP/RTP approach... although MP2 only supports W7+ anyway... so maybe it is a little pointless. (If you want support for XP and Vista then speak up now! ;))
    2. Apparently PBDA is a little slower than DRI/UPnP/RTP. This makes sense because the PBDA interface is another layer on top of UPnP/RTP. (This is the sort of information I am hoping to get from the community here.)
    3. He has not been able to get the HDHomeRun Prime working with PBDA... but it is a different problem to what I am seeing.
    I did also get some tips about PBDA which told me I was on the right track, and it sounds like he would be willing to answer further questions if I had any.
    This is good, but he is not able to solve the problem that I'm facing right now. Specifically:

    Every attempt to tune or retrieve information from the tuner returns HRESULT 0x80004005.

    For all that I know, this could be caused by the fact that I'm logged in using RDP or that WMC is not fully set up on the bc0508's PC...
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    yeah interesting thoughts mm...
    I don't know how hard it is to build this upnp stuff into tvservice and how messy this would be or not...

    I found two links from ms:

    I think you already found these, but maybe not and it is helpful to you ;)

    For all that I know, this could be caused by the fact that I'm logged in using RDP or that WMC is not fully set up on the bc0508's PC...
    Did you tried Teamviewer? RDP is quite different compared to Teamviewer... So you has no OS restrictions ;)

    All in all it is a really hard decision, if it is easyer to use the upnp way and there is a clean integration possible with your current plugin system, go with that way;)
    If there is no clean integration possible I would stick to the PBDA way... i know it is easy to say it than actually developing it :) So the final decision is at your side :p
     

    mediacowboy

    Portal Pro
    May 5, 2012
    134
    13
    35
    Texas
    Home Country
    United States of America United States of America
    Wouldn't there be a way to detect if mp2 is installed and if so point to those dll's and if not included them. I also wanted to say since I would like to see this happen I have purchased a hdhomerun prime and as soon as it gets here I would love to help test. I know this is all easier thought than done I so will test either way you decide.
     

    lehighbri

    Portal Member
    May 10, 2012
    15
    9
    Home Country
    United States of America United States of America
    I have a Ceton and am currently using SageTV with SageDCT and love it (but would love to switch to mediaportal given SageTV has reached EOL). I use the PBDA feature in SageDCT to record to .mpg and it works great. Very stable, and it tunes to new channels within a couple seconds. Any other feedback or detail you were looking for that'd be helpful? Would it be worth it for you to connect with the SageDCT developer directly?
     

    Users who are viewing this thread

    Top Bottom