Exemplo n.º 1
0
        private void TestGetPMT()
        {
            int hr = 0;

            int[] pids = { 0x00 };
            IPMT  pmt;

            /*
             *    // Route PID 0x00 to the filter
             *    hr = pidMapper.MapPID(pids.Length, pids, MediaSampleContent.Mpeg2PSI);
             *    DsError.ThrowExceptionForHR(hr);
             */

            hr = parser.GetPMT(0x10, null, out pmt);
            Debug.Assert((hr == 0) && (pmt != null), "IDvbSiParser.GetPMT failed (" + hr + ")");

            if (pmt != null)
            {
                Marshal.ReleaseComObject(pmt);
            }
        }
Exemplo n.º 2
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
        }