チャンネルのトラック情報を保持するクラスです
コード例 #1
0
 private void OnChannelTrackChanged(ChannelTrack channel_track)
 {
     DispatchMonitorEvent(mon => mon.OnContentChanged(ChannelContentType.ChannelTrack));
     DispatchSinkEvent(sink => {
         sink.OnChannelTrack(channel_track);
     });
 }
コード例 #2
0
        private ChannelTrack MergeChannelTrack(ChannelTrack a, ChannelTrack b)
        {
            var base_atoms = new AtomCollection(a.Extra);

            base_atoms.Update(b.Extra);
            return(new ChannelTrack(base_atoms));
        }
コード例 #3
0
 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;
   }
 }
コード例 #4
0
 private ChannelTrack UpdateChannelTrack(ChannelTrack a, ChannelTrack b)
 {
     var base_atoms = new AtomCollection(a.Extra);
       base_atoms.Update(b.Extra);
       return new ChannelTrack(base_atoms);
 }
コード例 #5
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     this.BaseSink.OnChannelTrack(channel_track);
 }
コード例 #6
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     this.Channel.ChannelTrack = MergeChannelTrack(Channel.ChannelTrack, channel_track);
 }
コード例 #7
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     channelContentSink.OnChannelTrack(channel_track);
 }
コード例 #8
0
ファイル: Channel.cs プロジェクト: iyuuya/peercaststation
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     owner.ChannelTrackChanged?.Invoke(owner, new ChannelTrackEventArgs(channel_track));
 }
コード例 #9
0
ファイル: Channel.cs プロジェクト: iyuuya/peercaststation
 private void OnChannelTrackChanged(ChannelTrack channel_track)
 {
     DispatchSinkEvent(sink => {
         sink.OnChannelTrack(channel_track);
     });
 }
コード例 #10
0
ファイル: Channel.cs プロジェクト: iyuuya/peercaststation
 public ChannelTrackEventArgs(ChannelTrack channel_track)
 {
     this.ChannelTrack = channel_track;
 }
コード例 #11
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     targetSink.OnChannelTrack(channel_track);
 }
コード例 #12
0
ファイル: MainForm.cs プロジェクト: kumaryu/peercaststation
 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 = "";
   }
 }
コード例 #13
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
     DispatchSinkEvent(() => this.TargetSink.OnChannelTrack(channel_track));
 }
コード例 #14
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
   this.BaseSink.OnChannelTrack(channel_track);
 }
コード例 #15
0
 public void OnChannelTrack(ChannelTrack channel_track)
 {
   this.Channel.ChannelTrack = MergeChannelTrack(Channel.ChannelTrack, channel_track);
 }