Ejemplo n.º 1
0
        /// <summary>
        /// Open the communication channels with the FireDTV's.
        /// </summary>
        /// <returns>true if success</returns>
        public bool OpenDrivers()
        {
            if (!LibrayInitialized)
            {
                return(false);
            }

            int BDADriverCount = getBDACount();
            int WDMDriverCount = getWDMCount();

            Log.Info("FireDTV: BDA {0}, WMA {1}", BDADriverCount, WDMDriverCount);


            for (int BDACount = 0; BDACount < BDADriverCount; BDACount++)
            {
                FireDTVSourceFilterInfo bdaSourceFilter = new FireDTVSourceFilterInfo(OpenBDADevice(BDACount), _windowHandle);
                if (bdaSourceFilter != null)
                {
                    Log.Info("FireDTV: add BDA Source {0}", bdaSourceFilter.ToString());
                }

                _sourceFilterCollection.Add(bdaSourceFilter);
            }

            for (int WDMCount = 0; WDMCount < WDMDriverCount; WDMCount++)
            {
                FireDTVSourceFilterInfo wdmSourceFilter = new FireDTVSourceFilterInfo(OpenWDMDevice(WDMCount), _windowHandle);
                if (wdmSourceFilter != null)
                {
                    Log.Info("FireDTV: add WDM Source");
                }
                _sourceFilterCollection.Add(wdmSourceFilter);
            }
            return(true);
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Open the communication channels with the FireDTV's.
    /// </summary>
    /// <returns>true if success</returns>
    public bool OpenDrivers()
    {
      if (!LibrayInitialized)
      {
        return false;
      }

      int BDADriverCount = getBDACount();
      int WDMDriverCount = getWDMCount();

      Log.Info("FireDTV: BDA {0}, WMA {1}", BDADriverCount, WDMDriverCount);


      for (int BDACount = 0; BDACount < BDADriverCount; BDACount++)
      {
        FireDTVSourceFilterInfo bdaSourceFilter = new FireDTVSourceFilterInfo(OpenBDADevice(BDACount), _windowHandle);
        if (bdaSourceFilter != null)
        {
          Log.Info("FireDTV: add BDA Source {0}", bdaSourceFilter.ToString());
        }

        _sourceFilterCollection.Add(bdaSourceFilter);
      }

      for (int WDMCount = 0; WDMCount < WDMDriverCount; WDMCount++)
      {
        FireDTVSourceFilterInfo wdmSourceFilter = new FireDTVSourceFilterInfo(OpenWDMDevice(WDMCount), _windowHandle);
        if (wdmSourceFilter != null)
        {
          Log.Info("FireDTV: add WDM Source");
        }
        _sourceFilterCollection.Add(wdmSourceFilter);
      }
      return true;
    }