Tuning Failed and Unable to Play (1 Viewer)

Heina

MP Donator
  • Premium Supporter
  • February 4, 2008
    166
    20
    49
    Windhoek, Namibia
    Home Country
    South Africa South Africa
    'ello

    I have the latest 4TheRecord (1.6.0.1) installed with TV Server as my recorder.

    When I first enter MediaPortal (1.2.1) and try and tune a TV Channel I will sometimes get a "Tuning Failed" error message. The next time I try it will work fine and continue to work fine until I try to tune a Radio Channel. That results in a "Unable To Play" error and after that if I try to tune to a TV Channel again I'll get a "No Tuner Available" message.

    Attached are my MediaPortal logs.

    Any help is appreciated
    Hein
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi Heina

    I can see what is causing your issues - it is the UpdatePinVideo function. I have a tuner based on a chipset from the same manufacturer and it is has the same problem. I have a patch here that I use to avoid the issues but my fix is unlikely to ever get into a main release. I can provide you with a DLL for testing but I'm not wanting to have to provide updates for each new version of MP. Do you want to try the DLL?

    mm
     

    Heina

    MP Donator
  • Premium Supporter
  • February 4, 2008
    166
    20
    49
    Windhoek, Namibia
    Home Country
    South Africa South Africa
    Sure I'll give it a try, thanx. Why would this not ever get into the main release? I used to have a older card from the same manufacturer that never gave this problem.

    Anyway, I'm looking into getting into the code, so if you can tell me what it is you changed I might be able to look after myself for future releases.

    Cheerz!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi again

    Sure I'll give it a try, thanx.
    Okay, I'll post as soon as I get home from work.

    Why would this not ever get into the main release?
    It may conflict with other tuners and getting wide enough testing for the change would be difficult with analog TV being phased out in many countries. I get the impression that there must be a reason for the code - maybe to remove a blank video stream from radio content - however it was added *way* before my time. I'm not opposed to adding it; just conscious that it is a risk.

    I used to have a older card from the same manufacturer that never gave this problem.
    It is not the card manufacturer (Hauppauge) but the chipset manufacturer (NXP/Philips/Trident) that is important since NXP created the driver - all tuner "resellers" that use chips from the same "family" use similar/compatible/identical drivers. The HVR-2200 is based on the SAA7164 chip; my cards (Digitalnow Quattro and Pinnacle 7010ix) are based on the SAA7162 chip. I use the Blackgold BGT3540 driver.

    Anyway, I'm looking into getting into the code, so if you can tell me what it is you changed I might be able to look after myself for future releases.
    Sure! :)

    Code:
        public ITvSubChannel Tune(int subChannelId, IChannel channel)
        {
          Log.Log.WriteFile("analog:  Tune:{0}", channel);
          if (_graphState == GraphState.Idle)
          {
            BuildGraph();
          }
          BaseSubChannel subChannel;
          if (_mapSubChannels.ContainsKey(subChannelId))
          {
            subChannel = _mapSubChannels[subChannelId];
          }
          else
          {
            subChannelId = GetNewSubChannel(channel);
            subChannel = _mapSubChannels[subChannelId];
          }
          subChannel.CurrentChannel = channel;
          subChannel.OnBeforeTune();
          PerformTuning(channel);
          subChannel.OnAfterTune();
          try
          {
            RunGraph(subChannel.SubChannelId);
          }
          catch (Exception)
          {
            FreeSubChannel(subChannel.SubChannelId);
            throw;
          }
          [B]//_encoder.UpdatePinVideo(channel.IsTv, _graphBuilder);[/B]
          return subChannel;
        }

    Comment out the _encoder.UpdatePinVideo() line and you're good to go. This is in TvEngine3/TVLibrary/TVLibrary/Implementations/Analog/Graphs/Analog/TvCardAnalog.cs.

    mm
     

    Heina

    MP Donator
  • Premium Supporter
  • February 4, 2008
    166
    20
    49
    Windhoek, Namibia
    Home Country
    South Africa South Africa
    Awsome! Thanx for the info!

    As you say analogue is being phased out, but surely there are still lots lots people using composite or s-video connections from their settop boxes. Our satelite providers over here in southern africa are so draconian - they do not allow you to use DVB-S cards etc. They marry their cards to the decoders so there is no other way to get MP and TV to work than through their settop boxes.

    Thanx for your help though!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Hi Heina

    Big apologies for the delay - it has been a busy week and my PC is playing up. DLL attached.

    1. Stop TV Server.
    2. Take a backup of the existing TVLibrary.dll in your TV Server install folder.
    3. Download and extract the attached DLL into your TV Server install folder.
    4. Start TV Server.
    5. Test. :)

    mm
     

    Attachments

    • TVLibrary[1.2.1_saa716x_analog].zip
      158.5 KB

    Heina

    MP Donator
  • Premium Supporter
  • February 4, 2008
    166
    20
    49
    Windhoek, Namibia
    Home Country
    South Africa South Africa
    Thanx mm

    I did actually manage to get the code off Github and do the codechange myself :) Works beautifully thanx!

    Cheerz
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Great :)
    If you haven't seen -->this<-- then you might want to give that a spin too - greatly improves channel change speed for analog radio.

    Best regards,
    mm
     

    Heina

    MP Donator
  • Premium Supporter
  • February 4, 2008
    166
    20
    49
    Windhoek, Namibia
    Home Country
    South Africa South Africa
    Awsome! Thanx! That works great aswell. Any chance of that code change making it into the next MediaPortal?

    Cheerz
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,544
    8,236
    Home Country
    New Zealand New Zealand
    Glad you like it. :)
    There is a good chance of that change getting in. It will just be a question of when I hope...

    mm
     

    Users who are viewing this thread

    Top Bottom