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

            int[]    pids = { 0x00 };
            IDVB_EIT eit;

            /*
             *    // Route PID 0x00 to the filter
             *    hr = pidMapper.MapPID(pids.Length, pids, MediaSampleContent.Mpeg2PSI);
             *    DsError.ThrowExceptionForHR(hr);
             */
            hr = parser.GetEIT(0x4e, null, out eit);
            Debug.Assert((hr == 0) && (eit != null), "IDvbSiParser.GetEIT failed (" + hr + ")");
            if (eit != null)
            {
                Marshal.ReleaseComObject(eit);
            }
        }
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 !!!");

            IDVB_SDT sdt = null;
            hr = parser.GetSDT(0x42, null, out sdt);
            DsError.ThrowExceptionForHR(hr);

            int recordCount = 0;

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

            for (int i = 0; i < recordCount; i++)
            {
                short serviceId = 0;
                hr = sdt.GetRecordServiceId(i, out serviceId);
                DsError.ThrowExceptionForHR(hr);

                hr = parser.GetEIT(0x4e, serviceId, out eit);
                if (eit != null)
                {
                    break;
                }
            }

            Marshal.ReleaseComObject(sdt);

            Debug.Assert(eit != null, "Can't get a SDT object");
#endif
        }