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
            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.GetNIT(0x40, null, out nit);
            Debug.Assert(nit != null, "Can't get a NIT object");
#endif
        }
Exemplo n.º 4
0
        private void TestGetNIT()
        {
            int hr = 0;

            int[]    pids = { 0x00 };
            IDVB_NIT nit;

            /*
             *    // Route PID 0x00 to the filter
             *    hr = pidMapper.MapPID(pids.Length, pids, MediaSampleContent.Mpeg2PSI);
             *    DsError.ThrowExceptionForHR(hr);
             */
            hr = parser.GetNIT(0x40, null, out nit);
            Debug.Assert((hr == 0) && (nit != null), "IDvbSiParser.GetNIT failed (" + hr + ")");
            if (nit != null)
            {
                Marshal.ReleaseComObject(nit);
            }
        }