Beispiel #1
0
        public int GetSlowestRate(MFRateDirection eDirection, bool fThin, out float pflRate)
        {
            // Make sure we *never* leave this entry point with an exception
            try
            {
                lock (this)
                {
                    CheckShutdown();

                    // There is no minimum playback rate, so the minimum is zero.
                    pflRate = 0;
                }

                return S_Ok;
            }
            catch (Exception e)
            {
                pflRate = 0;
                return Marshal.GetHRForException(e);
            }
        }
Beispiel #2
0
        public int GetFastestRate(MFRateDirection eDirection, bool fThin, out float pflRate)
        {
            // Make sure we *never* leave this entry point with an exception
            try
            {
                lock (this)
                {
                    float fMaxRate = 0.0f;

                    CheckShutdown();

                    // Get the maximum *forward* rate.
                    fMaxRate = GetMaxRate(fThin);

                    // For reverse playback, it's the negative of fMaxRate.
                    if (eDirection == MFRateDirection.Reverse)
                    {
                        fMaxRate = -fMaxRate;
                    }

                    pflRate = fMaxRate;
                }

                return S_Ok;
            }
            catch (Exception e)
            {
                pflRate = 0;
                return Marshal.GetHRForException(e);
            }
        }