private void TestGetTDT() { int hr = 0; int[] pids = { 0x14 }; IDVB_TDT tdt; // Route PID 0x14 to the filter hr = pidMapper.MapPID(pids.Length, pids, MediaSampleContent.Mpeg2PSI); DsError.ThrowExceptionForHR(hr); hr = parser.GetTDT(out tdt); Debug.Assert((hr == 0) && (tdt != null), "IDvbSiParser.GetTDT failed (" + hr + ")"); if (tdt != null) { Marshal.ReleaseComObject(tdt); } }
private void Config() { int hr = 0; parser = (IDvbSiParser) new DvbSiParser(); graph = new BdaGraph(); graph.InitializeGraph(); graph.MakeTuneRequest(); graph.RunGraph(); hr = parser.Initialize(graph.bdaSecTab as IMpeg2Data); Debug.Assert(hr == 0, "Initialize failed !!!"); for (int i = 0; i < 10; i++) { hr = parser.GetTDT(out tdt); if (tdt != null) { break; } } Debug.Assert(tdt != null, "Can't get a TDT object"); }