private void OnChannelTrackChanged(ChannelTrack channel_track) { DispatchMonitorEvent(mon => mon.OnContentChanged(ChannelContentType.ChannelTrack)); DispatchSinkEvent(sink => { sink.OnChannelTrack(channel_track); }); }
private ChannelTrack MergeChannelTrack(ChannelTrack a, ChannelTrack b) { var base_atoms = new AtomCollection(a.Extra); base_atoms.Update(b.Extra); return(new ChannelTrack(base_atoms)); }
private void BroadcastStart_Click(object sender, EventArgs args) { Uri source; if (Uri.TryCreate(bcStreamUrl.Text, UriKind.Absolute, out source)) { StreamSource = source; } else { StreamSource = null; } var reader = bcContentType.SelectedItem as ContentReaderItem; if (reader!=null) ContentReaderFactory = reader.ContentReaderFactory; var yp = bcYP.SelectedItem as YellowPageItem; if (yp!=null) YellowPage = yp.YellowPage; var info = new AtomCollection(); int bitrate; if (Int32.TryParse(bcBitrate.Text, out bitrate)) { info.SetChanInfoBitrate(bitrate); } info.SetChanInfoName(bcChannelName.Text); info.SetChanInfoGenre(bcGenre.Text); info.SetChanInfoDesc(bcDescription.Text); info.SetChanInfoComment(bcComment.Text); info.SetChanInfoURL(bcContactUrl.Text); ChannelInfo = new ChannelInfo(info); var track = new AtomCollection(); track.SetChanTrackTitle(bcTrackTitle.Text); track.SetChanTrackGenre(bcTrackGenre.Text); track.SetChanTrackAlbum(bcAlbum.Text); track.SetChanTrackCreator(bcCreator.Text); track.SetChanTrackURL(bcTrackURL.Text); ChannelTrack = new ChannelTrack(track); if (StreamSource!=null && ContentReaderFactory!=null && !String.IsNullOrEmpty(ChannelInfo.Name)) { DialogResult = DialogResult.OK; } }
private ChannelTrack UpdateChannelTrack(ChannelTrack a, ChannelTrack b) { var base_atoms = new AtomCollection(a.Extra); base_atoms.Update(b.Extra); return new ChannelTrack(base_atoms); }
public void OnChannelTrack(ChannelTrack channel_track) { this.BaseSink.OnChannelTrack(channel_track); }
public void OnChannelTrack(ChannelTrack channel_track) { this.Channel.ChannelTrack = MergeChannelTrack(Channel.ChannelTrack, channel_track); }
public void OnChannelTrack(ChannelTrack channel_track) { channelContentSink.OnChannelTrack(channel_track); }
public void OnChannelTrack(ChannelTrack channel_track) { owner.ChannelTrackChanged?.Invoke(owner, new ChannelTrackEventArgs(channel_track)); }
private void OnChannelTrackChanged(ChannelTrack channel_track) { DispatchSinkEvent(sink => { sink.OnChannelTrack(channel_track); }); }
public ChannelTrackEventArgs(ChannelTrack channel_track) { this.ChannelTrack = channel_track; }
public void OnChannelTrack(ChannelTrack channel_track) { targetSink.OnChannelTrack(channel_track); }
public ChannelInfoContainer(ChannelInfo info, ChannelTrack track) { if (info!=null) { InfoChannelName = info.Name; InfoGenre = info.Genre; InfoDesc = info.Desc; InfoContactURL = info.URL; InfoComment = info.Comment; InfoContentType = info.ContentType; InfoBitrate = String.Format("{0} kbps", info.Bitrate); } else { InfoChannelName = ""; InfoGenre = ""; InfoDesc = ""; InfoContactURL = ""; InfoComment = ""; InfoContentType = ""; InfoBitrate = ""; } if (track!=null) { TrackAlbum = track.Album; TrackArtist = track.Creator; TrackTitle = track.Name; TrackGenre = track.Genre; TrackContactURL = track.URL; } else { TrackAlbum = ""; TrackArtist = ""; TrackTitle = ""; TrackGenre = ""; TrackContactURL = ""; } }
public void OnChannelTrack(ChannelTrack channel_track) { DispatchSinkEvent(() => this.TargetSink.OnChannelTrack(channel_track)); }