MPEG Program Stream Glosary: - AU : Access Unit - TS : Transport Stream - PS : Program Stream - PSI: Program Specific Information - PAT: Program Association Table - PMT: Program Map Tables - PES: Packetized Elementary Stream - GOP: Group Of Pictures - PTS: Presentation TimeStamp - DTS: Decode TimeStamp - PID: Packet IDentifier - PCR: Program Clock Reference
Inheritance: IDemuxer
Ejemplo n.º 1
0
		public void Create()
		{
			FrameIndex = 0;

			MpegStream = new ProduceConsumerBufferStream();
			AudioStream = new ProduceConsumerBufferStream();
			VideoStream = new ProduceConsumerBufferStream();
			MpegPsDemuxer = new MpegPsDemuxer(MpegStream);
			H264FrameDecoder = new H264FrameDecoder(VideoStream);

			//PspDisplay.CurrentInfo.PlayingVideo = true;
		}
Ejemplo n.º 2
0
 public void GetNextPacketAndSyncTest()
 {
     var MpegPsDemuxer = new MpegPsDemuxer(File.OpenRead("../../../TestInput/test.pmf").SliceWithLength(0x800));
     Assert.AreEqual(MpegPsDemuxer.ChunkType.Start, MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x1BB, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x1BF, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x1E0, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x109, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x127, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x128, (uint)MpegPsDemuxer.GetNextPacketAndSync());
     Assert.AreEqual((uint)0x106, (uint)MpegPsDemuxer.GetNextPacketAndSync());
 }
Ejemplo n.º 3
0
 public void ReadPacketizedElementaryStreamHeaderTest()
 {
     MpegPsDemuxer.Packet Packet;
     var MpegPsDemuxer = new MpegPsDemuxer(File.OpenRead("../../../TestInput/test.pmf").SliceWithLength(0x800));
     for (int n = 0; n < 32; n++)
     {
         Packet = MpegPsDemuxer.ReadPacketizedElementaryStreamHeader();
         //if ((Packet.Type & 0xFF0) == 0x1E0)
         //if (Packet.Type == 0x1E0)
         {
             Console.WriteLine("0x{0:X}", Packet.Type);
             MpegPsDemuxer.ParsePacketizedStream(Packet.Stream);
         }
     }
 }
Ejemplo n.º 4
0
		private void UpdateAuFromPacketInfo(MpegAu MpegAu, MpegPsDemuxer.PacketizedStream Info)
		{
			MpegAu.SceMpegAu.DecodeTimestamp = Info.dts.Value;
			MpegAu.SceMpegAu.PresentationTimestamp = Info.pts.Value;
			//MpegAu.SceMpegAu.DecodeTimestampHigh = (uint)Info.dts.Value;
			//MpegAu.SceMpegAu.DecodeTimestampLow = MpegPsDemuxer.MpegTimestampPerSecond;
			//MpegAu.SceMpegAu.PresentationTimestampHigh = (uint)Info.pts.Value;
			//MpegAu.SceMpegAu.PresentationTimestampLow = MpegPsDemuxer.MpegTimestampPerSecond;
			MpegAu.SceMpegAu.AuSize = (int)Info.Stream.Length;
		}