Exemplo n.º 1
0
        /// <summary>
        /// Retrieves lists of video sources form DUT
        /// </summary>
        /// <returns>Array of video sources</returns>
        protected VideoSource[] GetVideoSources()
        {
            VideoSource[] sources = null;
            MediaClient   client  = MediaClient;

            if (client != null)
            {
                RunStep(() => { sources = client.GetVideoSources(); }, "Get video sources");
            }
            else
            {
                DeviceIOPortClient deviceIOPortClient = DeviceIoClient;
                if (deviceIOPortClient != null)
                {
                    RunStep(() => { sources = deviceIOPortClient.GetVideoSources(); }, "Get video sources");
                    DoRequestDelay();
                }
                else
                {
                    Assert(false,
                           "Neither media, nor I/O supported.",
                           "Check if media or I/O supported");
                }
            }

            return(sources);
        }
Exemplo n.º 2
0
 protected VideoSource[] GetVideoSourcesFromMediaOrIO()
 {
     VideoSource[] sources = null;
     if (MediaClient != null)
     {
         MediaClient client = MediaClient;
         RunStep(() => { sources = client.GetVideoSources(); }, "Get Video Sources");
         DoRequestDelay();
         if (sources != null)
         {
             LogStepEvent(string.Format("{0} sources found", sources.Length) + Environment.NewLine);
         }
         return(sources);
     }
     if (IoClient != null)
     {
         DeviceIOPortClient client = IoClient;
         RunStep(() => { sources = client.GetVideoSources(); }, "Get Video Sources");
         DoRequestDelay();
         if (sources != null)
         {
             LogStepEvent(string.Format("{0} sources found", sources.Length) + Environment.NewLine);
         }
         return(sources);
     }
     return(sources);
 }