public void OnChannelInfo(ChannelInfo channel_info) { if (String.IsNullOrEmpty(this.Description.OutputContentType)) { Sink.OnChannelInfo(channel_info); } else { var newinfo = new AtomCollection(channel_info.Extra); newinfo.SetChanInfoType(this.Description.OutputContentType); if (!String.IsNullOrEmpty(this.Description.OutputMIMEType)) { newinfo.SetChanInfoStreamType(this.Description.OutputMIMEType); } else { newinfo.RemoveByName(Atom.PCP_CHAN_INFO_STREAMTYPE); } if (!String.IsNullOrEmpty(this.Description.OutputContentExt)) { newinfo.SetChanInfoStreamExt(this.Description.OutputContentExt); } else { newinfo.RemoveByName(Atom.PCP_CHAN_INFO_STREAMEXT); } Sink.OnChannelInfo(new ChannelInfo(newinfo)); } }
private ChannelInfo UpdateChannelInfo(ChannelInfo a, ChannelInfo b) { var base_atoms = new AtomCollection(a.Extra); var new_atoms = new AtomCollection(b.Extra); if (!useContentBitrate) { new_atoms.RemoveByName(Atom.PCP_CHAN_INFO_BITRATE); } base_atoms.Update(new_atoms); return(new ChannelInfo(base_atoms)); }
private ChannelInfo UpdateChannelInfo(ChannelInfo a, ChannelInfo b) { var base_atoms = new AtomCollection(a.Extra); var new_atoms = new AtomCollection(b.Extra); if (!useContentBitrate) { new_atoms.RemoveByName(Atom.PCP_CHAN_INFO_BITRATE); } base_atoms.Update(new_atoms); return new ChannelInfo(base_atoms); }