Esempio n. 1
0
        private void TestRange()
        {
            m_read.Close();
            DoIndex(IndexerType.TimeCode);
            m_read.Open(sFileName);

            TimeCodeExtensionData st, e;

            st            = new TimeCodeExtensionData();
            e             = new TimeCodeExtensionData();
            st.dwTimecode = 0x300;
            e.dwTimecode  = 0x900;

            try
            {
                m_read.SetRangeByTimecode(2, st, e);
            }
            catch (COMException ce)
            {
                // The concensus is that SetRangeByTimecode() doesn't work, even in c++
                if (Marshal.GetHRForException(ce) != NSResults.E_INVALID_REQUEST)
                {
                    throw;
                }
            }
        }
        private void TestStart()
        {
            IWMReader read = m_read as IWMReader;

            read.Pause();

            TimeCodeExtensionData tce1 = new TimeCodeExtensionData();
            TimeCodeExtensionData tce2 = new TimeCodeExtensionData();

            RA3Union l1 = new RA3Union(0L);
            RA3Union l2 = new RA3Union(123456789L);

            RA3Union l3 = new RA3Union(0);
            RA3Union l4 = new RA3Union(1234567);

            RA3Union l5 = new RA3Union(tce1);
            RA3Union l6 = new RA3Union(tce2);

            m_read.StartAtPosition(1, l1, l2, OffsetFormat.HundredNS, 1.0f, IntPtr.Zero);
            m_read.StartAtPosition(1, l3, l4, OffsetFormat.PlaylistOffset, 1.0f, IntPtr.Zero);

            // apparently SMPTE functionality is broken in WMF.  Apparently the indices aren't
            // created correctly.
            // m_read.StartAtPosition(1, l5, l6, OffsetFormat.Timecode, 1.0f, IntPtr.Zero);
        }