private void TestMode() { int hr; hr = m_ISBE2Crossbar.EnableDefaultMode(CrossbarDefaultFlags.None); DsError.ThrowExceptionForHR(hr); }
private void Config() { int hr; ISBE2Crossbar ISBE2Crossbar; IFilterGraph2 fg; fg = new FilterGraph() as IFilterGraph2; IBaseFilter streamBuffer = (IBaseFilter) new StreamBufferSource(); hr = fg.AddFilter(streamBuffer, "SBS"); IFileSourceFilter fs = streamBuffer as IFileSourceFilter; hr = fs.Load(@"C:\Users\Public\Recorded TV\Sample Media\win7_scenic-demoshort_raw.wtv", null); ISBE2Crossbar = streamBuffer as ISBE2Crossbar; hr = ISBE2Crossbar.EnableDefaultMode(CrossbarDefaultFlags.None); DsError.ThrowExceptionForHR(hr); hr = ISBE2Crossbar.GetInitialProfile(out m_pProfile); DsError.ThrowExceptionForHR(hr); }
private void TestEnum() { int hr; ISBE2EnumStream ps; SBE2_StreamDesc[] sb = new SBE2_StreamDesc[1]; hr = m_cb.EnableDefaultMode(CrossbarDefaultFlags.None); DsError.ThrowExceptionForHR(hr); IPin ppin = DsFindPin.ByDirection(m_cb as IBaseFilter, PinDirection.Output, 0); m_sm = ppin as ISBE2StreamMap; hr = m_sm.EnumMappedStreams(out ps); DsError.ThrowExceptionForHR(hr); hr = ps.Next(1, sb, IntPtr.Zero); hr = m_sm.UnmapStream(sb[0].StreamId); DsError.ThrowExceptionForHR(hr); hr = m_sm.MapStream(sb[0].StreamId); DsError.ThrowExceptionForHR(hr); }