You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 regels
718 B

  1. using JT1078.Hls.Formatters;
  2. using JT1078.Hls.MessagePack;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace JT1078.Hls
  7. {
  8. public class ES_Package: ITSMessagePackFormatter
  9. {
  10. public static byte[] NALU0X09 = new byte[] { 0x00, 0x00, 0x00, 0x01, 0x09, 0xFF };
  11. public byte[] NALU0x09 { get; set; } = NALU0X09;
  12. public List<byte[]> NALUs { get; set; }
  13. public void ToBuffer(ref TSMessagePackWriter writer)
  14. {
  15. writer.WriteArray(NALU0x09);
  16. if(NALUs!=null)
  17. {
  18. foreach(var nalu in NALUs)
  19. {
  20. writer.WriteArray(nalu);
  21. }
  22. }
  23. }
  24. }
  25. }