コード例 #1
0
        private void GetAll()
        {
            int hr;

            int afr, aso, dso, fd, pdr, jit;

            hr = m_iqp.get_AvgFrameRate(out afr);
            DsError.ThrowExceptionForHR(hr);

            hr = m_iqp.get_AvgSyncOffset(out aso);
            DsError.ThrowExceptionForHR(hr);

            hr = m_iqp.get_DevSyncOffset(out dso);
            DsError.ThrowExceptionForHR(hr);

            hr = m_iqp.get_FramesDrawn(out fd);
            DsError.ThrowExceptionForHR(hr);

            hr = m_iqp.get_FramesDroppedInRenderer(out pdr);
            DsError.ThrowExceptionForHR(hr);

            hr = m_iqp.get_Jitter(out jit);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(afr != 0, "afr");
            Debug.Assert(aso != 0, "aso");
            Debug.Assert(dso != 0, "dso");
            Debug.Assert(fd != 0, "fd");
            //Debug.Assert(pdr != 0, "pdr");
            Debug.Assert(jit != 0, "jit");
        }
コード例 #2
0
 public static void Update(IQualProp quality)
 {
     try
     {
         if (quality != null)
         {
             int framesDrawn = 0, avgFrameRate = 0, avgSyncOffset = 0, avgDevSyncOffset = 0, framesDropped = 0, jitter = 0;
             quality.get_AvgFrameRate(out avgFrameRate);
             quality.get_AvgSyncOffset(out avgSyncOffset);
             quality.get_DevSyncOffset(out avgDevSyncOffset);
             quality.get_FramesDrawn(out framesDrawn);
             quality.get_FramesDroppedInRenderer(out framesDropped);
             quality.get_Jitter(out jitter);
             AverageFrameRate           = ((float)avgFrameRate) / 100.0f;
             AverageSyncOffset          = avgSyncOffset;
             AverageDeviationSyncOffset = avgDevSyncOffset;
             FramesDrawn   = framesDrawn;
             FramesDropped = framesDropped;
             Jitter        = jitter;
         }
     }
     catch {}
 }
コード例 #3
0
 public static void Update(IQualProp quality)
 {
   try
   {
     if (quality != null)
     {
       int framesDrawn = 0, avgFrameRate = 0, avgSyncOffset = 0, avgDevSyncOffset = 0, framesDropped = 0, jitter = 0;
       quality.get_AvgFrameRate(out avgFrameRate);
       quality.get_AvgSyncOffset(out avgSyncOffset);
       quality.get_DevSyncOffset(out avgDevSyncOffset);
       quality.get_FramesDrawn(out framesDrawn);
       quality.get_FramesDroppedInRenderer(out framesDropped);
       quality.get_Jitter(out jitter);
       AverageFrameRate = ((float)avgFrameRate) / 100.0f;
       AverageSyncOffset = avgSyncOffset;
       AverageDeviationSyncOffset = avgDevSyncOffset;
       FramesDrawn = framesDrawn;
       FramesDropped = framesDropped;
       Jitter = jitter;
     }
   }
   catch {}
 }