當前位置: 首頁>>代碼示例>>C#>>正文


C# TvBusinessLayer.AddWebStreamTuningDetails方法代碼示例

本文整理匯總了C#中TvDatabase.TvBusinessLayer.AddWebStreamTuningDetails方法的典型用法代碼示例。如果您正苦於以下問題:C# TvBusinessLayer.AddWebStreamTuningDetails方法的具體用法?C# TvBusinessLayer.AddWebStreamTuningDetails怎麽用?C# TvBusinessLayer.AddWebStreamTuningDetails使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TvDatabase.TvBusinessLayer的用法示例。


在下文中一共展示了TvBusinessLayer.AddWebStreamTuningDetails方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: importButton_Click


//.........這裏部分代碼省略.........
                    dvbsChannel.PmtPid = pmtPid;
                    dvbsChannel.Provider = provider;
                    dvbsChannel.ServiceId = serviceId;
                    dvbsChannel.SymbolRate = symbolrate;
                    dvbsChannel.TransportId = transportId;
                    dvbsChannel.SatelliteIndex = SatIndex;
                    dvbsChannel.ModulationType = (ModulationType)modulation;
                    dvbsChannel.InnerFecRate = (BinaryConvolutionCodeRate)InnerFecRate;
                    dvbsChannel.BandType = (BandType)band;
                    dvbsChannel.Pilot = (Pilot)pilot;
                    dvbsChannel.Rolloff = (RollOff)rollOff;
                    dvbsChannel.LogicalChannelNumber = channelNumber;
                    layer.AddTuningDetails(dbChannel, dvbsChannel);
                    Log.Info("TvChannels: Added tuning details for DVB-S channel: {0} provider: {1}", name, provider);
                    break;
                  case 4: //DVBTChannel
                    DVBTChannel dvbtChannel = new DVBTChannel();
                    dvbtChannel.BandWidth = bandwidth;
                    dvbtChannel.FreeToAir = fta;
                    dvbtChannel.Frequency = frequency;
                    dvbtChannel.IsRadio = isRadio;
                    dvbtChannel.IsTv = isTv;
                    dvbtChannel.Name = name;
                    dvbtChannel.NetworkId = networkId;
                    dvbtChannel.PmtPid = pmtPid;
                    dvbtChannel.Provider = provider;
                    dvbtChannel.ServiceId = serviceId;
                    dvbtChannel.TransportId = transportId;
                    dvbtChannel.LogicalChannelNumber = channelNumber;
                    layer.AddTuningDetails(dbChannel, dvbtChannel);
                    Log.Info("TvChannels: Added tuning details for DVB-T channel: {0} provider: {1}", name, provider);
                    break;
                  case 5: //Webstream
                    layer.AddWebStreamTuningDetails(dbChannel, url, bitrate);
                    break;
                  case 7: //DVBIPChannel
                    DVBIPChannel dvbipChannel = new DVBIPChannel();
                    dvbipChannel.FreeToAir = fta;
                    dvbipChannel.Frequency = frequency;
                    dvbipChannel.IsRadio = isRadio;
                    dvbipChannel.IsTv = isTv;
                    dvbipChannel.LogicalChannelNumber = channelNumber;
                    dvbipChannel.Name = name;
                    dvbipChannel.NetworkId = networkId;
                    dvbipChannel.PmtPid = pmtPid;
                    dvbipChannel.Provider = provider;
                    dvbipChannel.ServiceId = serviceId;
                    dvbipChannel.TransportId = transportId;
                    dvbipChannel.Url = url;
                    layer.AddTuningDetails(dbChannel, dvbipChannel);
                    Log.Info("TvChannels: Added tuning details for DVB-IP channel: {0} provider: {1}", name, provider);
                    break;
                }
              }
            }
            catch (Exception exc)
            {
              Log.Error("TvChannels: Failed to add channel - {0}", exc.Message);
            }
          }
        }

        if (tvChannelGroupList != null && importtvgroups)
        {
          // Import tv channel groups
          foreach (XmlNode nodeChannelGroup in tvChannelGroupList)
開發者ID:nio22,項目名稱:MediaPortal-1,代碼行數:67,代碼來源:ImportExport.cs

示例2: Importxmlfile


//.........這裏部分代碼省略.........
                                            return false;
                                        }
                                        dvbtChannel.BandWidth = bandwidth;
                                        dvbtChannel.FreeToAir = fta;
                                        dvbtChannel.Frequency = frequency;
                                        dvbtChannel.IsRadio = isRadio;
                                        dvbtChannel.IsTv = isTv;
                                        dvbtChannel.Name = name;
                                        dvbtChannel.NetworkId = networkId;
            #if (MP12)
            #else
                                        if (pcrPid > -1)
                                            dvbtChannel.PcrPid = pcrPid;

                                        if (audioPid > -1)
                                            dvbtChannel.AudioPid = audioPid;

                                        if (videoPid > -1)
                                            dvbtChannel.VideoPid = videoPid;

            #endif
                                        dvbtChannel.PmtPid = pmtPid;
                                        dvbtChannel.Provider = provider;
                                        dvbtChannel.ServiceId = serviceId;
                                        dvbtChannel.TransportId = transportId;
                                        dvbtChannel.LogicalChannelNumber = channelNumber;

                                        layer.AddTuningDetails(dbChannel, dvbtChannel);
                                        if (DEBUG)
                                            Log.Info("TvChannels: Added tuning details for DVB-T channel: {0} provider: {1}", name, provider);

                                        break;
                                    case 5: //Webstream
                                        layer.AddWebStreamTuningDetails(dbChannel, url, bitrate);
                                        if (DEBUG)
                                            Log.Info("TvChannels: Added wWeb stream: {0} ", url);

                                        break;
                                    //used IP channel from mvedrina patch only for MP1.1 and SVN
            #if(MP100)
                                        //do nothing
            #elif(MP101)
                                        //do nothing
            #else //MP11BETA or SVN

                                    case 7: //DVBIPChannel
                                        DVBIPChannel dvbipChannel = new DVBIPChannel();
            #if (MP12)
            #else
                                        if (pcrPid > -1)
                                            dvbipChannel.PcrPid = pcrPid;

                                        if (audioPid > -1)
                                            dvbipChannel.AudioPid = audioPid;

                                        if (videoPid > -1)
                                            dvbipChannel.VideoPid = videoPid;
            #endif
                                        dvbipChannel.FreeToAir = fta;
                                        dvbipChannel.Frequency = frequency;
                                        dvbipChannel.IsRadio = isRadio;
                                        dvbipChannel.IsTv = isTv;
                                        dvbipChannel.LogicalChannelNumber = channelNumber;
                                        dvbipChannel.Name = name;
                                        dvbipChannel.NetworkId = networkId;
                                        dvbipChannel.PmtPid = pmtPid;
開發者ID:huha001,項目名稱:BackupSettings,代碼行數:67,代碼來源:BackupSettingsExportImport.cs

示例3: btnPlaylist_Click

 private void btnPlaylist_Click(object sender, EventArgs e)
 {
   OpenFileDialog dlg = new OpenFileDialog();
   dlg.AddExtension = false;
   dlg.CheckFileExists = true;
   dlg.CheckPathExists = true;
   dlg.Filter = "playlists (*.m3u;*.pls;*.b4s;*.wpl)|*.m3u;*.pls;*.b4s;*.wpl";
   dlg.Multiselect = false;
   dlg.Title = "Select the playlist file to import";
   if (dlg.ShowDialog(this) != DialogResult.OK)
     return;
   IPlayListIO listIO = PlayListFactory.CreateIO(dlg.FileName);
   PlayList playlist = new PlayList();
   if (!listIO.Load(playlist, dlg.FileName))
   {
     MessageBox.Show("There was an error parsing the playlist file", "Error", MessageBoxButtons.OK,
                     MessageBoxIcon.Error);
     return;
   }
   TvBusinessLayer layer = new TvBusinessLayer();
   int iInserted = 0;
   foreach (PlayListItem item in playlist)
   {
     if (string.IsNullOrEmpty(item.FileName))
       continue;
     if (string.IsNullOrEmpty(item.Description))
       item.Description = item.FileName;
     Channel channel = new Channel(true, false, 0, Schedule.MinSchedule, false,
                                   Schedule.MinSchedule, 10000, true, "", item.Description);
     channel.Persist();
     layer.AddWebStreamTuningDetails(channel, item.FileName, 0);
     layer.AddChannelToRadioGroup(channel, TvConstants.RadioGroupNames.AllChannels);
     iInserted++;
   }
   MessageBox.Show("Imported " + iInserted + " new channels from playlist");
   OnSectionActivated();
 }
開發者ID:npcomplete111,項目名稱:MediaPortal-1,代碼行數:37,代碼來源:RadioChannels.cs


注:本文中的TvDatabase.TvBusinessLayer.AddWebStreamTuningDetails方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。