Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public override byte[] GetSample(Container.Track track, out TimeSpan duration)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 public override Common.SegmentStream GetSample(Container.Track track, out TimeSpan duration)
 {
     throw new NotImplementedException();
 }