Пример #1
0
        private void TestGetPAT()
        {
            int hr = 0;

            int[] pids = { 0x00 };
            IPAT  pat;

/*
 *    // Route PID 0x00 to the filter
 *    hr = pidMapper.MapPID(pids.Length, pids, MediaSampleContent.Mpeg2PSI);
 *    DsError.ThrowExceptionForHR(hr);
 */
            hr = parser.GetPAT(out pat);
            Debug.Assert((hr == 0) && (pat != null), "IDvbSiParser.GetPAT failed (" + hr + ")");

            int recordCount;

            hr = pat.GetCountOfRecords(out recordCount);

            short pmtPid;

            for (int i = 0; i < recordCount; i++)
            {
                hr = pat.GetRecordProgramMapPid(0, out pmtPid);
                Debug.WriteLine(string.Format("{0} : 0x{1:x2}", i, pmtPid));
            }
            if (pat != null)
            {
                Marshal.ReleaseComObject(pat);
            }
        }
Пример #2
0
        private void Config()
        {
#if ALLOW_UNTESTED_INTERFACES
            parser = (IDvbSiParser) new DvbSiParser();
            graph  = new BdaGraph();
            graph.InitializeGraph();
            graph.MakeTuneRequest();
            graph.RunGraph();

            int hr = parser.Initialize(graph.bdaSecTab as IMpeg2Data);
            Debug.Assert(hr == 0, "Initialize failed !!!");

            hr = parser.GetPAT(out pat);
            Debug.Assert(pat != null, "Can't get a PAT object");
#endif
        }
Пример #3
0
        private void Config()
        {
#if ALLOW_UNTESTED_INTERFACES
            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 !!!");

            IPAT pat = null;

            hr = parser.GetPAT(out pat);
            DsError.ThrowExceptionForHR(hr);

            int   recordCount;
            short progNumber = 0;
            short mapPid     = 0;

            hr = pat.GetCountOfRecords(out recordCount);
            DsError.ThrowExceptionForHR(hr);

            // Get the last value
            hr = pat.GetRecordProgramMapPid(recordCount - 1, out mapPid);
            DsError.ThrowExceptionForHR(hr);

            hr = pat.GetRecordProgramNumber(recordCount - 1, out progNumber);
            DsError.ThrowExceptionForHR(hr);

            hr = parser.GetPMT(mapPid, progNumber, out pmt);
            Debug.Assert(pmt != null, "Can't get a PMT object");
#endif
        }