public Common.SegmentStream GetSample(Container.Track track, out TimeSpan duration) { Rtp.RtpFrame result = new Rtp.RtpFrame(0); while (HasNext) { Rtp.RtpPacket next = new Rtp.RtpPacket(ReadNext().Data.ToArray(), 0); if (result.Count > 0 && next.Timestamp != result.Timestamp) { break; } result.Add(next); if (next.Marker) { break; } } duration = TimeSpan.FromMilliseconds(90 * result.Count); //return result.Assemble().ToArray(); result.Depacketize(); return(result.Buffer); }
public override byte[] GetSample(Container.Track track, out TimeSpan duration) { throw new NotImplementedException(); }
public override Common.SegmentStream GetSample(Container.Track track, out TimeSpan duration) { throw new NotImplementedException(); }