[Approved] TV Server: analog crossbar bug fix (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Hi team

    I've been helping some Blackgold BGT3595 owners get the analog tuner on their cards working (see here). The only real problem we've encountered so far has been a minor bug in the TV Server analog graph building process.

    The issue is in the TVLibrary.Implementations.Analog.Components.Crossbar class. When attempting to build a graph, the TV Server checks each Crossbar available in the system to see if it is compatible with the tuner filter. The code assumes that *all* crossbars have tuner input pins. I'm sure this assumption is invalid - certainly one of the two BGT3595 crossbars does not have these pins. When the assumption fails, an exception is thrown and the graph building process is immediately aborted. The exception stack trace is:

    Exception :confused:ystem.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    at System.ThrowHelper.ThrowKeyNotFoundException()
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at TvLibrary.Implementations.Analog.Components.Crossbar.CreateAutomaticFilterInstance(Graph graph, IFilterGraph2 graphBuilder, Tuner tuner)
    at TvLibrary.Implementations.Analog.Components.Crossbar.CreateFilterInstance(Graph graph, IFilterGraph2 graphBuilder, Tuner tuner)
    at TvLibrary.Implementations.Analog.TvCardAnalog.BuildGraph()

    I have made two changes to the code - one to handle cases when the graph is being assembled from a stored graph, and one to handle cases when the graph is being assembled automatically. At the appropriate time I check that the crossbar has the required tuner inputs. If it does then the graph building process can continue as usual. If it doesn't then the code now gracefully moves on to try the next crossbar. Simple :)

    The code patch for the latest SVN version is attached :D

    ----------------------------------------------------------------------------------
    Update 2010-11-07
    Fix a mistake in the patch. :oops::sorry:
     

    Attachments

    • CrossbarBug[SVN_HEAD_26689].zip
      637 bytes

    Users who are viewing this thread

    Top Bottom