Exemplo n.º 1
0
        private Atom CreateChanPacket()
        {
            var chan = new AtomCollection();

            chan.SetChanID(Channel.ChannelID);
            chan.SetChanInfo(Channel.ChannelInfo.Extra);
            chan.SetChanTrack(Channel.ChannelTrack.Extra);
            return(new Atom(Atom.PCP_CHAN, chan));
        }
Exemplo n.º 2
0
        protected IEnumerable <Atom> CreateContentHeaderPacket(Channel channel, Content content)
        {
            var chan = new AtomCollection();

            chan.SetChanID(channel.ChannelID);
            var chan_pkt = new AtomCollection();

            chan_pkt.SetChanPktType(Atom.PCP_CHAN_PKT_HEAD);
            chan_pkt.SetChanPktPos((uint)(content.Position & 0xFFFFFFFFU));
            chan_pkt.SetChanPktData(content.Data);
            chan.SetChanPkt(chan_pkt);
            chan.SetChanInfo(channel.ChannelInfo.Extra);
            chan.SetChanTrack(channel.ChannelTrack.Extra);
            Logger.Debug("Sending Header: {0}", content.Position);
            return(Enumerable.Repeat(new Atom(Atom.PCP_CHAN, chan), 1));
        }
        private void PostChannelInfo(AtomCollection parent, Channel channel)
        {
            var atom = new AtomCollection();

            atom.SetChanID(channel.ChannelID);
            atom.SetChanBCID(PeerCast.BroadcastID);
            if (channel.ChannelInfo != null)
            {
                atom.SetChanInfo(channel.ChannelInfo.Extra);
            }
            if (channel.ChannelTrack != null)
            {
                atom.SetChanTrack(channel.ChannelTrack.Extra);
            }
            parent.SetChan(atom);
        }
Exemplo n.º 4
0
 protected IEnumerable<Atom> CreateContentHeaderPacket(Channel channel, Content content)
 {
     var chan = new AtomCollection();
       chan.SetChanID(channel.ChannelID);
       var chan_pkt = new AtomCollection();
       chan_pkt.SetChanPktType(Atom.PCP_CHAN_PKT_HEAD);
       chan_pkt.SetChanPktPos((uint)(content.Position & 0xFFFFFFFFU));
       chan_pkt.SetChanPktData(content.Data);
       chan.SetChanPkt(chan_pkt);
       chan.SetChanInfo(channel.ChannelInfo.Extra);
       chan.SetChanTrack(channel.ChannelTrack.Extra);
       Logger.Debug("Sending Header: {0}", content.Position);
       return Enumerable.Repeat(new Atom(Atom.PCP_CHAN, chan), 1);
 }
Exemplo n.º 5
0
 private Atom CreateChanPacket()
 {
     var chan = new AtomCollection();
     chan.SetChanID(Channel.ChannelID);
     chan.SetChanInfo(Channel.ChannelInfo.Extra);
     chan.SetChanTrack(Channel.ChannelTrack.Extra);
     return new Atom(Atom.PCP_CHAN, chan);
 }
Exemplo n.º 6
0
 private void PostChannelInfo(AtomCollection parent, Channel channel)
 {
     var atom = new AtomCollection();
       atom.SetChanID(channel.ChannelID);
       atom.SetChanBCID(PeerCast.BroadcastID);
       if (channel.ChannelInfo!=null)  atom.SetChanInfo(channel.ChannelInfo.Extra);
       if (channel.ChannelTrack!=null) atom.SetChanTrack(channel.ChannelTrack.Extra);
       parent.SetChan(atom);
 }