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.

70 line
2.4 KiB

  1. using JT1078.FMp4.Interfaces;
  2. using JT1078.FMp4.MessagePack;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace JT1078.FMp4
  7. {
  8. /// <summary>
  9. /// stbl
  10. /// </summary>
  11. public class SampleTableBox : Mp4Box, IFMp4MessagePackFormatter
  12. {
  13. /// <summary>
  14. /// stbl
  15. /// </summary>
  16. public SampleTableBox() : base("stbl")
  17. {
  18. }
  19. /// <summary>
  20. /// stsd
  21. /// </summary>
  22. public SampleDescriptionBox SampleDescriptionBox { get; set; }
  23. /// <summary>
  24. /// stts
  25. /// </summary>
  26. public TimeToSampleBox TimeToSampleBox { get; set; }
  27. /// <summary>
  28. /// ctts
  29. /// </summary>
  30. public CompositionOffsetBox CompositionOffsetBox { get; set; }
  31. /// <summary>
  32. /// stsc
  33. /// </summary>
  34. public SampleToChunkBox SampleToChunkBox { get; set; }
  35. /// <summary>
  36. /// stsz
  37. /// </summary>
  38. public SampleSizeBox SampleSizeBox { get; set; }
  39. //public CompactSampleSizeBox CompactSampleSizeBox { get; set; }
  40. /// <summary>
  41. /// stco
  42. /// </summary>
  43. public ChunkOffsetBox ChunkOffsetBox { get; set; }
  44. //public ChunkLargeOffsetBox ChunkLargeOffsetBox { get; set; }
  45. //public SyncSampleBox SyncSampleBox { get; set; }
  46. //public ShadowSyncSampleBox ShadowSyncSampleBox { get; set; }
  47. //public PaddingBitsBox PaddingBitsBox { get; set; }
  48. //public DegradationPriorityBox DegradationPriorityBox { get; set; }
  49. //public SampleDependencyTypeBox SampleDependencyTypeBox { get; set; }
  50. //public SampleToGroupBox SampleToGroupBox { get; set; }
  51. //public SampleGroupDescriptionBox SampleGroupDescriptionBox { get; set; }
  52. //public SubSampleInformationBox SubSampleInformationBox { get; set; }
  53. public void ToBuffer(ref FMp4MessagePackWriter writer)
  54. {
  55. Start(ref writer);
  56. SampleDescriptionBox.ToBuffer(ref writer);
  57. TimeToSampleBox.ToBuffer(ref writer);
  58. if(CompositionOffsetBox!=null)
  59. CompositionOffsetBox.ToBuffer(ref writer);
  60. SampleToChunkBox.ToBuffer(ref writer);
  61. if (SampleSizeBox != null)
  62. SampleSizeBox.ToBuffer(ref writer);
  63. ChunkOffsetBox.ToBuffer(ref writer);
  64. End(ref writer);
  65. }
  66. }
  67. }