Exemplo n.º 1
0
        private void Config()
        {
#if ALLOW_UNTESTED_INTERFACES
            int      hr = 0;
            IDVB_NIT nit;

            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 !!!");

            hr = parser.GetNIT(0x40, null, out nit);
            Debug.Assert(nit != null, "Can't get a NIT object");

            int recordCount = 0;
            hr = nit.GetCountOfRecords(out recordCount);

            for (int i = 0; i < recordCount; i++)
            {
                hr = nit.GetRecordDescriptorByIndex(i, 0, out descriptor);
                if (descriptor != null)
                {
                    break;
                }
            }

            Marshal.ReleaseComObject(nit);

            Debug.Assert(descriptor != null, "Can't get a GenericDescriptor object");
#endif
        }
        private void Config()
        {
#if ALLOW_UNTESTED_INTERFACES
            int                hr = 0;
            IDVB_NIT           nit;
            IGenericDescriptor descriptor = null;

            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 j = 0; j < 10; j++)
            {
                hr = parser.GetNIT(0x40, null, out nit);
                Debug.Assert(nit != null, "Can't get a NIT object");

                int recordCount = 0;
                hr = nit.GetCountOfRecords(out recordCount);

                descriptor = null;

                for (int i = 0; i < recordCount; i++)
                {
                    // see the doc for the meaning of the 0x43
                    hr = nit.GetRecordDescriptorByTag(i, 0x43, null, out descriptor);
                    if (descriptor != null)
                    {
                        break;
                    }
                }

                Marshal.ReleaseComObject(nit);

                if (descriptor != null)
                {
                    break;
                }
            }

            dsdsDescriptor = descriptor as IDvbSatelliteDeliverySystemDescriptor;
            Debug.Assert(dsdsDescriptor != null, "Can't get a IDvbSatelliteDeliverySystemDescriptor object");
#endif
        }
Exemplo n.º 3
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
        }
Exemplo n.º 4
0
        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, "Itsdtialize failed !!!");

            hr = parser.GetTSDT(out tsdt);
            Debug.Assert(tsdt != null, "Can't get a TSDT object");
        }
Exemplo n.º 5
0
        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 !!!");

            hr = parser.GetDIT(10 * 1000, out dit);
            Debug.Assert(dit != null, "Can't get a IDVB_DIT object");
        }
Exemplo n.º 6
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
        }
Exemplo n.º 7
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
        }
Exemplo n.º 8
0
        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");
        }
Exemplo n.º 9
0
        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 (short i = 0x10; i <= 0x14; i++)
            {
                hr = parser.GetST(i, 10 * 1000, out st);
                if (st != null)
                {
                    break;
                }
            }

            Debug.Assert(st != null, "Can't get a ST object");
        }
Exemplo n.º 10
0
        private void TestInitialize()
        {
            int hr = parser.Initialize(graph.bdaSecTab as IMpeg2Data);

            Debug.Assert(hr == 0, "Initialize failed !!!");
        }