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() { parser = (IDvbSiParser) new DvbSiParser(); graph = new BdaGraph(); graph.InitializeGraph(); /* * // The second pin go to the Mpeg-2 Tables and Sections filter * IPin demuxPin = DsFindPin.ByDirection(graph.mpeg2Demux, PinDirection.Output, 1); * pidMapper = (IMPEG2PIDMap)demuxPin; */ int hr = 0; int regCookie; object mpeg2DataControl; IPin mpegPin = DsFindPin.ByDirection(graph.bdaSecTab, PinDirection.Input, 0); hr = (graph.networkProvider as IBDA_TIF_REGISTRATION).RegisterTIFEx(mpegPin, out regCookie, out mpeg2DataControl); DsError.ThrowExceptionForHR(hr); pidMapper = (IMPEG2PIDMap)mpeg2DataControl; graph.MakeTuneRequest(); graph.RunGraph(); }
private void Config() { //int hr = 0; graph = new BdaGraph(); graph.InitializeGraph(); graph.MakeTuneRequest(); //graph.RunGraph(); tunerCap = (ITunerCap)graph.networkProvider; }
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 }
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 }
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"); }
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"); }
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 }
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 }
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"); }
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"); }
private void Config() { int hr = 0; graph = new BdaGraph(); graph.InitializeGraph(); graph.MakeTuneRequest(); // graph.RunGraph(); IBDA_Topology topo = (IBDA_Topology)graph.bdaTuner; int[] nodeTypes = new int[10]; int nodeTypesCount; // Get all nodes in the BDA Tuner hr = topo.GetNodeTypes(out nodeTypesCount, nodeTypes.Length, nodeTypes); DsError.ThrowExceptionForHR(hr); // For each nodes types for (int i = 0; i < nodeTypesCount; i++) { Guid[] nodeGuid = new Guid[10]; int nodeGuidCount; // Get its exposed interfaces hr = topo.GetNodeInterfaces(nodeTypes[i], out nodeGuidCount, nodeGuid.Length, nodeGuid); DsError.ThrowExceptionForHR(hr); // For each exposed interfaces for (int j = 0; j < nodeGuidCount; j++) { Debug.WriteLine(string.Format("node {0}/{1} : {2}", i, j, nodeGuid[j])); Console.WriteLine(string.Format("node {0}/{1} : {2}", i, j, nodeGuid[j])); // Is IBDA_AutoDemodulate supported by this node ? if (nodeGuid[j] == typeof(IBDA_AutoDemodulateEx).GUID) { Console.WriteLine("nodetype : " + nodeTypes[i]); // Yes, retrieve this node object ctrlNode; hr = topo.GetControlNode(0, 1, nodeTypes[i], out ctrlNode); DsError.ThrowExceptionForHR(hr); // Do the cast (it should not fail) autoDemodulateEx = ctrlNode as IBDA_AutoDemodulateEx; // Exit the for j loop if found a SignalStatistics object if (autoDemodulateEx != null) { break; } } } // If already found a SignalStatistics object, exit the for i loop if (autoDemodulateEx != null) { break; } } Debug.Assert(autoDemodulateEx != null, "Can't find a node supporting IBDA_AutoDemodulateEx"); }