/// <summary> /// to push new raw data from any source, pass the data in here /// </summary> /// <param name="data"></param> public bool AddRaw(byte[] data) { //assume it's Mpeg TS for now... var ts = new TsPacket(data); if (!ts.IsValid) { //int i = 0; return(false);//not valid TS packet! } if (data.Length > TsPacket.PacketLength) { var chunk = new TsChunk(data); var packs = chunk.GetTsPackets(); foreach (var p in packs) { if (p.IsValid) { AddTsPacket(p); } } } else { return(AddTsPacket(ts)); } return(true); }
/// <summary> /// allows re-use of this object w/o call to new. /// </summary> /// <param name="rawData"></param> public void Reinit(byte[] rawData) { data = new TsChunk(rawData); }
public TsPacket(byte[] rawData) { data = new TsChunk( rawData); }
internal TsPacket(TsChunk segment) { data = segment; }
private TsChunk data;//from parent TsPacket internal AdaptationField(TsPacket parent) { data = parent.data; }
/// <summary> /// to push new raw data from any source, pass the data in here /// </summary> /// <param name="data"></param> public bool AddRaw(byte[] data) { //assume it's Mpeg TS for now... var ts = new TsPacket(data); if (!ts.IsValid) { //int i = 0; return false;//not valid TS packet! } if (data.Length > TsPacket.PacketLength) { var chunk = new TsChunk(data); var packs = chunk.GetTsPackets(); foreach (var p in packs) if(p.IsValid) AddTsPacket(p); } else return AddTsPacket(ts); return true; }
public TsPacket(byte[] rawData) { data = new TsChunk(rawData); }