/// <summary> /// 从配置文件中读取频道信息 /// </summary> /// <returns></returns> private static AMSChannelCollection GetChannelsFromConfig() { MediaServiceAccountSettings accountSettings = MediaServiceAccountSettings.GetConfig(); AMSChannelCollection channels = new AMSChannelCollection(); foreach (LiveChannelConfigurationElement channelElem in LiveChannelSettings.GetConfig().Channels) { if (accountSettings.Accounts.ContainsKey(channelElem.AccountName)) { AMSChannel channel = new AMSChannel(); channel.ID = UuidHelper.NewUuidString(); channel.Name = channelElem.ChannelName; channel.Description = channelElem.Description; channel.AMSAccountName = channelElem.AccountName; channels.Add(channel); } } return(channels); }
public void ListConfigedChannels() { LiveChannelSettings settings = LiveChannelSettings.GetConfig(); OutputChannelSettings(settings); }