@@ -1,12 +1,32 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class FragmentBox | |||||
public class FragmentBox:IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// moof | |||||
/// </summary> | |||||
public MovieFragmentBox MovieFragmentBox { get; set; } | public MovieFragmentBox MovieFragmentBox { get; set; } | ||||
/// <summary> | |||||
/// mdat | |||||
/// </summary> | |||||
public MediaDataBox MediaDataBox { get; set; } | public MediaDataBox MediaDataBox { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
if (MovieFragmentBox != null) | |||||
{ | |||||
MovieFragmentBox.ToBuffer(ref writer); | |||||
} | |||||
if (MediaDataBox != null) | |||||
{ | |||||
MediaDataBox.ToBuffer(ref writer); | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,15 +1,33 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class MediaDataBox : Mp4Box | |||||
/// <summary> | |||||
/// mdat | |||||
/// </summary> | |||||
public class MediaDataBox : Mp4Box, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// mdat | |||||
/// </summary> | |||||
public MediaDataBox() : base("mdat") | public MediaDataBox() : base("mdat") | ||||
{ | { | ||||
} | } | ||||
public byte[] Data { get; set; } | public byte[] Data { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
if (Data != null && Data.Length > 0) | |||||
{ | |||||
writer.WriteArray(Data); | |||||
} | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,16 +1,43 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class MovieFragmentBox : Mp4Box | |||||
/// <summary> | |||||
/// moof | |||||
/// </summary> | |||||
public class MovieFragmentBox : Mp4Box, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// moof | |||||
/// </summary> | |||||
public MovieFragmentBox() : base("moof") | public MovieFragmentBox() : base("moof") | ||||
{ | { | ||||
} | } | ||||
/// <summary> | |||||
/// mfhd | |||||
/// </summary> | |||||
public MovieFragmentHeaderBox MovieFragmentHeaderBox { get; set; } | public MovieFragmentHeaderBox MovieFragmentHeaderBox { get; set; } | ||||
/// <summary> | |||||
/// traf | |||||
/// </summary> | |||||
public TrackFragmentBox TrackFragmentBox { get; set; } | public TrackFragmentBox TrackFragmentBox { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
if (MovieFragmentHeaderBox != null) | |||||
{ | |||||
MovieFragmentHeaderBox.ToBuffer(ref writer); | |||||
} | |||||
if (TrackFragmentBox != null) | |||||
{ | |||||
TrackFragmentBox.ToBuffer(ref writer); | |||||
} | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,15 +1,33 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class MovieFragmentHeaderBox : FullBox | |||||
/// <summary> | |||||
/// mfhd | |||||
/// </summary> | |||||
public class MovieFragmentHeaderBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// mfhd | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public MovieFragmentHeaderBox(byte version=0, uint flags=0) : base("mfhd", version, flags) | public MovieFragmentHeaderBox(byte version=0, uint flags=0) : base("mfhd", version, flags) | ||||
{ | { | ||||
} | } | ||||
public uint SequenceNumber { get; set; } | public uint SequenceNumber { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
writer.WriteUInt32(SequenceNumber); | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,17 +1,43 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class MovieFragmentRandomAccessBox : Mp4Box | |||||
/// <summary> | |||||
/// mfra | |||||
/// </summary> | |||||
public class MovieFragmentRandomAccessBox : Mp4Box, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// mfra | |||||
/// </summary> | |||||
public MovieFragmentRandomAccessBox() : base("mfra") | public MovieFragmentRandomAccessBox() : base("mfra") | ||||
{ | { | ||||
} | } | ||||
/// <summary> | |||||
/// tfra | |||||
/// </summary> | |||||
public TrackFragmentRandomAccessBox TrackFragmentRandomAccessBox { get; set; } | public TrackFragmentRandomAccessBox TrackFragmentRandomAccessBox { get; set; } | ||||
/// <summary> | |||||
/// mfro | |||||
/// </summary> | |||||
public MovieFragmentRandomAccessOffsetBox MovieFragmentRandomAccessOffsetBox { get; set; } | public MovieFragmentRandomAccessOffsetBox MovieFragmentRandomAccessOffsetBox { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
if (TrackFragmentRandomAccessBox != null) | |||||
{ | |||||
TrackFragmentRandomAccessBox.ToBuffer(ref writer); | |||||
} | |||||
if (MovieFragmentRandomAccessOffsetBox != null) | |||||
{ | |||||
MovieFragmentRandomAccessOffsetBox.ToBuffer(ref writer); | |||||
} | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,15 +1,33 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class MovieFragmentRandomAccessOffsetBox : FullBox | |||||
/// <summary> | |||||
/// mfro | |||||
/// </summary> | |||||
public class MovieFragmentRandomAccessOffsetBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// mfro | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public MovieFragmentRandomAccessOffsetBox(byte version, uint flags=0) : base("mfro", version, flags) | public MovieFragmentRandomAccessOffsetBox(byte version, uint flags=0) : base("mfro", version, flags) | ||||
{ | { | ||||
} | } | ||||
public uint MfraSize { get; set; } | public uint MfraSize { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
writer.WriteUInt32(MfraSize); | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,11 +1,21 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class SampleDependencyTypeBox : FullBox | |||||
/// <summary> | |||||
/// sdtp | |||||
/// </summary> | |||||
public class SampleDependencyTypeBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// sdtp | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public SampleDependencyTypeBox(byte version=0, uint flags=0) : base("sdtp", version, flags) | public SampleDependencyTypeBox(byte version=0, uint flags=0) : base("sdtp", version, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -14,6 +24,27 @@ namespace JT1078.FMp4 | |||||
/// </summary> | /// </summary> | ||||
public List<SampleDependencyType> SampleDependencyTypes { get; set; } | public List<SampleDependencyType> SampleDependencyTypes { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
if(SampleDependencyTypes!=null && SampleDependencyTypes.Count > 0) | |||||
{ | |||||
//todo: wait ref doc | |||||
foreach(var item in SampleDependencyTypes) | |||||
{ | |||||
writer.WriteByte(item.IsLeading); | |||||
writer.WriteByte(item.SampleDependsOn); | |||||
writer.WriteByte(item.SampleIsDependedOn); | |||||
writer.WriteByte(item.SampleHasRedundancy); | |||||
writer.WriteByte(item.DegradPrio); | |||||
writer.WriteByte(item.IsNonSync); | |||||
writer.WriteByte(item.PaddingValue); | |||||
} | |||||
} | |||||
End(ref writer); | |||||
} | |||||
public class SampleDependencyType | public class SampleDependencyType | ||||
{ | { | ||||
public byte IsLeading { get; set; } | public byte IsLeading { get; set; } | ||||
@@ -1,11 +1,21 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class SampleToGroupBox : FullBox | |||||
/// <summary> | |||||
/// sbgp | |||||
/// </summary> | |||||
public class SampleToGroupBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// sbgp | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public SampleToGroupBox(byte version, uint flags) : base("sbgp", version, flags) | public SampleToGroupBox(byte version, uint flags) : base("sbgp", version, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -20,6 +30,11 @@ namespace JT1078.FMp4 | |||||
public List<SampleToGroupInfo> SampleToGroupInfos { get; set; } | public List<SampleToGroupInfo> SampleToGroupInfos { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
//todo:sbgp | |||||
} | |||||
public class SampleToGroupInfo | public class SampleToGroupInfo | ||||
{ | { | ||||
public uint SampleCount { get; set; } | public uint SampleCount { get; set; } | ||||
@@ -1,11 +1,21 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class SubSampleInformationBox : FullBox | |||||
/// <summary> | |||||
/// subs | |||||
/// </summary> | |||||
public class SubSampleInformationBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// subs | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public SubSampleInformationBox(byte version, uint flags=0) : base("subs", version, flags) | public SubSampleInformationBox(byte version, uint flags=0) : base("subs", version, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -14,6 +24,11 @@ namespace JT1078.FMp4 | |||||
public List<SubSampleInformation> SubSampleInformations { get; set; } | public List<SubSampleInformation> SubSampleInformations { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
//todo:subs | |||||
} | |||||
public class SubSampleInformation | public class SubSampleInformation | ||||
{ | { | ||||
public uint SampleDelta { get; set; } | public uint SampleDelta { get; set; } | ||||
@@ -1,14 +1,32 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class TrackFragmentBaseMediaDecodeTimeBox : FullBox | |||||
/// <summary> | |||||
/// tfdt | |||||
/// </summary> | |||||
public class TrackFragmentBaseMediaDecodeTimeBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// tfdt | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public TrackFragmentBaseMediaDecodeTimeBox(byte version, uint flags=0) : base("tfdt", version, flags) | public TrackFragmentBaseMediaDecodeTimeBox(byte version, uint flags=0) : base("tfdt", version, flags) | ||||
{ | { | ||||
} | } | ||||
public uint BaseMediaDecodeTime { get; set; } | public uint BaseMediaDecodeTime { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
writer.WriteUInt32(BaseMediaDecodeTime); | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,19 +1,75 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class TrackFragmentBox : Mp4Box | |||||
/// <summary> | |||||
/// traf | |||||
/// </summary> | |||||
public class TrackFragmentBox : Mp4Box, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// traf | |||||
/// </summary> | |||||
public TrackFragmentBox() : base("traf") | public TrackFragmentBox() : base("traf") | ||||
{ | { | ||||
} | } | ||||
/// <summary> | |||||
/// tfhd | |||||
/// </summary> | |||||
public TrackFragmentHeaderBox TrackFragmentHeaderBox { get; set; } | public TrackFragmentHeaderBox TrackFragmentHeaderBox { get; set; } | ||||
/// <summary> | |||||
/// sdtp | |||||
/// </summary> | |||||
public SampleDependencyTypeBox SampleDependencyTypeBox { get; set; } | public SampleDependencyTypeBox SampleDependencyTypeBox { get; set; } | ||||
/// <summary> | |||||
/// trun | |||||
/// </summary> | |||||
public TrackRunBox TrackRunBox { get; set; } | public TrackRunBox TrackRunBox { get; set; } | ||||
/// <summary> | |||||
/// tfdt | |||||
/// </summary> | |||||
public TrackFragmentBaseMediaDecodeTimeBox TrackFragmentBaseMediaDecodeTimeBox { get; set; } | public TrackFragmentBaseMediaDecodeTimeBox TrackFragmentBaseMediaDecodeTimeBox { get; set; } | ||||
/// <summary> | |||||
/// sbgp | |||||
/// </summary> | |||||
public SampleToGroupBox SampleToGroupBox { get; set; } | public SampleToGroupBox SampleToGroupBox { get; set; } | ||||
/// <summary> | |||||
/// subs | |||||
/// </summary> | |||||
public SubSampleInformationBox SubSampleInformationBox { get; set; } | public SubSampleInformationBox SubSampleInformationBox { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
if (TrackFragmentHeaderBox != null) | |||||
{ | |||||
TrackFragmentHeaderBox.ToBuffer(ref writer); | |||||
} | |||||
if (SampleDependencyTypeBox != null) | |||||
{ | |||||
SampleDependencyTypeBox.ToBuffer(ref writer); | |||||
} | |||||
if (TrackRunBox != null) | |||||
{ | |||||
TrackRunBox.ToBuffer(ref writer); | |||||
} | |||||
if (TrackFragmentBaseMediaDecodeTimeBox != null) | |||||
{ | |||||
TrackFragmentBaseMediaDecodeTimeBox.ToBuffer(ref writer); | |||||
} | |||||
if (SampleToGroupBox != null) | |||||
{ | |||||
SampleToGroupBox.ToBuffer(ref writer); | |||||
} | |||||
if (SubSampleInformationBox != null) | |||||
{ | |||||
SubSampleInformationBox.ToBuffer(ref writer); | |||||
} | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,14 +1,28 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class TrackFragmentHeaderBox : FullBox | |||||
/// <summary> | |||||
/// tfhd | |||||
/// </summary> | |||||
public class TrackFragmentHeaderBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// tfhd | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public TrackFragmentHeaderBox(byte version, uint flags) : base("tfhd", version, flags) | public TrackFragmentHeaderBox(byte version, uint flags) : base("tfhd", version, flags) | ||||
{ | { | ||||
} | } | ||||
/// <summary> | |||||
/// tfhd | |||||
/// </summary> | |||||
/// <param name="flags"></param> | |||||
public TrackFragmentHeaderBox(uint flags) : this(0, flags) | public TrackFragmentHeaderBox(uint flags) : this(0, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -20,7 +34,15 @@ namespace JT1078.FMp4 | |||||
public uint SampleDescriptionIndex { get; set; } | public uint SampleDescriptionIndex { get; set; } | ||||
public uint DefaultSampleDuration { get; set; } | public uint DefaultSampleDuration { get; set; } | ||||
public uint DefaultSampleSize { get; set; } | public uint DefaultSampleSize { get; set; } | ||||
public uint DefaultSampleFlags { get; set; } | |||||
public uint DefaultSampleFlags { get; set; } | |||||
#endregion | #endregion | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
writer.WriteUInt32(TrackID); | |||||
//todo:all the following are optional fields | |||||
End(ref writer); | |||||
} | |||||
} | } | ||||
} | } |
@@ -1,11 +1,21 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class TrackFragmentRandomAccessBox : FullBox | |||||
/// <summary> | |||||
/// tfra | |||||
/// </summary> | |||||
public class TrackFragmentRandomAccessBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// tfra | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public TrackFragmentRandomAccessBox(byte version, uint flags=0) : base("tfra", version, flags) | public TrackFragmentRandomAccessBox(byte version, uint flags=0) : base("tfra", version, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -28,6 +38,16 @@ namespace JT1078.FMp4 | |||||
public uint LengthSizeOfSampleNum { get; set; } | public uint LengthSizeOfSampleNum { get; set; } | ||||
public uint NumberOfEntry { get; set; } | public uint NumberOfEntry { get; set; } | ||||
public List<TrackFragmentRandomAccessInfo> TrackFragmentRandomAccessInfos { get; set; } | public List<TrackFragmentRandomAccessInfo> TrackFragmentRandomAccessInfos { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
//todo:tfra | |||||
End(ref writer); | |||||
} | |||||
public class TrackFragmentRandomAccessInfo | public class TrackFragmentRandomAccessInfo | ||||
{ | { | ||||
public ulong Time { get; set; } | public ulong Time { get; set; } | ||||
@@ -1,11 +1,21 @@ | |||||
using System; | |||||
using JT1078.FMp4.Interfaces; | |||||
using JT1078.FMp4.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT1078.FMp4 | namespace JT1078.FMp4 | ||||
{ | { | ||||
public class TrackRunBox : FullBox | |||||
/// <summary> | |||||
/// trun | |||||
/// </summary> | |||||
public class TrackRunBox : FullBox, IFMp4MessagePackFormatter | |||||
{ | { | ||||
/// <summary> | |||||
/// trun | |||||
/// </summary> | |||||
/// <param name="version"></param> | |||||
/// <param name="flags"></param> | |||||
public TrackRunBox(byte version, uint flags) : base("trun", version, flags) | public TrackRunBox(byte version, uint flags) : base("trun", version, flags) | ||||
{ | { | ||||
} | } | ||||
@@ -20,6 +30,15 @@ namespace JT1078.FMp4 | |||||
/// length:SampleCount | /// length:SampleCount | ||||
/// </summary> | /// </summary> | ||||
public List<TrackRunInfo> TrackRunInfos { get; set; } | public List<TrackRunInfo> TrackRunInfos { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | |||||
{ | |||||
Start(ref writer); | |||||
WriterFullBoxToBuffer(ref writer); | |||||
//todo: TrackRunBox | |||||
End(ref writer); | |||||
} | |||||
public class TrackRunInfo | public class TrackRunInfo | ||||
{ | { | ||||
public uint SampleDuration { get; set; } | public uint SampleDuration { get; set; } | ||||
@@ -20,17 +20,27 @@ namespace JT1078.FMp4 | |||||
/// </summary> | /// </summary> | ||||
public MovieBox MovieBox { get; set; } | public MovieBox MovieBox { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// | |||||
/// fboxs | |||||
/// </summary> | /// </summary> | ||||
public List<FragmentBox> FragmentBoxs { get; set; } | public List<FragmentBox> FragmentBoxs { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// | |||||
/// mfra | |||||
/// </summary> | /// </summary> | ||||
public MovieFragmentRandomAccessBox MovieFragmentRandomAccessBox { get; set; } | public MovieFragmentRandomAccessBox MovieFragmentRandomAccessBox { get; set; } | ||||
public void ToBuffer(ref FMp4MessagePackWriter writer) | public void ToBuffer(ref FMp4MessagePackWriter writer) | ||||
{ | { | ||||
FileTypeBox.ToBuffer(ref writer); | FileTypeBox.ToBuffer(ref writer); | ||||
MovieBox.ToBuffer(ref writer); | |||||
if(FragmentBoxs!=null && FragmentBoxs.Count > 0) | |||||
{ | |||||
foreach(var item in FragmentBoxs) | |||||
{ | |||||
item.MovieFragmentBox.ToBuffer(ref writer); | |||||
item.MediaDataBox.ToBuffer(ref writer); | |||||
} | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -24,6 +24,18 @@ | |||||
length:EntryCount | length:EntryCount | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.ChunkOffsetBox"> | |||||
<summary> | |||||
stco | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.ChunkOffsetBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
stco | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.ChunkOffsetBox.ChunkOffset"> | <member name="P:JT1078.FMp4.ChunkOffsetBox.ChunkOffset"> | ||||
<summary> | <summary> | ||||
length:EntryCount | length:EntryCount | ||||
@@ -50,6 +62,18 @@ | |||||
DepOn:field_size=>DataType | DepOn:field_size=>DataType | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.CompositionOffsetBox"> | |||||
<summary> | |||||
ctts | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.CompositionOffsetBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
ctts | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.CompositionOffsetBox.CompositionOffsetInfo.SignedSampleOffset"> | <member name="P:JT1078.FMp4.CompositionOffsetBox.CompositionOffsetInfo.SignedSampleOffset"> | ||||
<summary> | <summary> | ||||
version == 1 | version == 1 | ||||
@@ -151,6 +175,16 @@ | |||||
4位*n | 4位*n | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:JT1078.FMp4.FragmentBox.MovieFragmentBox"> | |||||
<summary> | |||||
moof | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.FragmentBox.MediaDataBox"> | |||||
<summary> | |||||
mdat | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.FreeSpaceBox.FillValue"> | <member name="P:JT1078.FMp4.FreeSpaceBox.FillValue"> | ||||
<summary> | <summary> | ||||
填充值 | 填充值 | ||||
@@ -254,6 +288,16 @@ | |||||
minf | minf | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.MediaDataBox"> | |||||
<summary> | |||||
mdat | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MediaDataBox.#ctor"> | |||||
<summary> | |||||
mdat | |||||
</summary> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MediaHeaderBox"> | <member name="T:JT1078.FMp4.MediaHeaderBox"> | ||||
<summary> | <summary> | ||||
mdhd | mdhd | ||||
@@ -315,7 +359,7 @@ | |||||
</member> | </member> | ||||
<member name="P:JT1078.FMp4.MovieBox.MovieExtendsBox"> | <member name="P:JT1078.FMp4.MovieBox.MovieExtendsBox"> | ||||
<summary> | <summary> | ||||
trak | |||||
mvex | |||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.MovieExtendsBox"> | <member name="T:JT1078.FMp4.MovieExtendsBox"> | ||||
@@ -328,6 +372,82 @@ | |||||
mvex | mvex | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.MovieExtendsHeaderBox"> | |||||
<summary> | |||||
mehd | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MovieExtendsHeaderBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
mehd | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MovieFragmentBox"> | |||||
<summary> | |||||
moof | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MovieFragmentBox.#ctor"> | |||||
<summary> | |||||
moof | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.MovieFragmentBox.MovieFragmentHeaderBox"> | |||||
<summary> | |||||
mfhd | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.MovieFragmentBox.TrackFragmentBox"> | |||||
<summary> | |||||
traf | |||||
</summary> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MovieFragmentHeaderBox"> | |||||
<summary> | |||||
mfhd | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MovieFragmentHeaderBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
mfhd | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MovieFragmentRandomAccessBox"> | |||||
<summary> | |||||
mfra | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MovieFragmentRandomAccessBox.#ctor"> | |||||
<summary> | |||||
mfra | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.MovieFragmentRandomAccessBox.TrackFragmentRandomAccessBox"> | |||||
<summary> | |||||
tfra | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.MovieFragmentRandomAccessBox.MovieFragmentRandomAccessOffsetBox"> | |||||
<summary> | |||||
mfro | |||||
</summary> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MovieFragmentRandomAccessOffsetBox"> | |||||
<summary> | |||||
mfro | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.MovieFragmentRandomAccessOffsetBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
mfro | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.MovieHeaderBox"> | <member name="T:JT1078.FMp4.MovieHeaderBox"> | ||||
<summary> | <summary> | ||||
mvhd | mvhd | ||||
@@ -385,6 +505,18 @@ | |||||
length:sample_count | length:sample_count | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.SampleDependencyTypeBox"> | |||||
<summary> | |||||
sdtp | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.SampleDependencyTypeBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
sdtp | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.SampleDependencyTypeBox.SampleDependencyTypes"> | <member name="P:JT1078.FMp4.SampleDependencyTypeBox.SampleDependencyTypes"> | ||||
<summary> | <summary> | ||||
is taken from the sample_count in the Sample Size Box ('stsz') or Compact Sample Size Box(‘stz2’). | is taken from the sample_count in the Sample Size Box ('stsz') or Compact Sample Size Box(‘stz2’). | ||||
@@ -449,6 +581,30 @@ | |||||
stco | stco | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.SampleToChunkBox"> | |||||
<summary> | |||||
stsc | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.SampleToChunkBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
stsc | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.SampleToGroupBox"> | |||||
<summary> | |||||
sbgp | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.SampleToGroupBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
sbgp | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.SampleToGroupBox.GroupingTypeParameter"> | <member name="P:JT1078.FMp4.SampleToGroupBox.GroupingTypeParameter"> | ||||
<summary> | <summary> | ||||
version == 1 | version == 1 | ||||
@@ -510,6 +666,18 @@ | |||||
length:Length | length:Length | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.SubSampleInformationBox"> | |||||
<summary> | |||||
subs | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.SubSampleInformationBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
subs | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.SubSampleInformationBox.SubSampleInformation.InnerSubSampleInformation.SubsampleSizeLarge"> | <member name="P:JT1078.FMp4.SubSampleInformationBox.SubSampleInformation.InnerSubSampleInformation.SubsampleSizeLarge"> | ||||
<summary> | <summary> | ||||
version == 1 | version == 1 | ||||
@@ -540,6 +708,18 @@ | |||||
length:ItemCount | length:ItemCount | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.TimeToSampleBox"> | |||||
<summary> | |||||
stts | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TimeToSampleBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
stts | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.TrackBox"> | <member name="T:JT1078.FMp4.TrackBox"> | ||||
<summary> | <summary> | ||||
trak | trak | ||||
@@ -560,6 +740,88 @@ | |||||
mdia | mdia | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.TrackFragmentBaseMediaDecodeTimeBox"> | |||||
<summary> | |||||
tfdt | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackFragmentBaseMediaDecodeTimeBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
tfdt | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.TrackFragmentBox"> | |||||
<summary> | |||||
traf | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackFragmentBox.#ctor"> | |||||
<summary> | |||||
traf | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.TrackFragmentHeaderBox"> | |||||
<summary> | |||||
tfhd | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.SampleDependencyTypeBox"> | |||||
<summary> | |||||
sdtp | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.TrackRunBox"> | |||||
<summary> | |||||
trun | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.TrackFragmentBaseMediaDecodeTimeBox"> | |||||
<summary> | |||||
tfdt | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.SampleToGroupBox"> | |||||
<summary> | |||||
sbgp | |||||
</summary> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentBox.SubSampleInformationBox"> | |||||
<summary> | |||||
subs | |||||
</summary> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.TrackFragmentHeaderBox"> | |||||
<summary> | |||||
tfhd | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackFragmentHeaderBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
tfhd | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackFragmentHeaderBox.#ctor(System.UInt32)"> | |||||
<summary> | |||||
tfhd | |||||
</summary> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="T:JT1078.FMp4.TrackFragmentRandomAccessBox"> | |||||
<summary> | |||||
tfra | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackFragmentRandomAccessBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
tfra | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackFragmentRandomAccessBox.Reserved"> | <member name="P:JT1078.FMp4.TrackFragmentRandomAccessBox.Reserved"> | ||||
<summary> | <summary> | ||||
4byte 32-26 | 4byte 32-26 | ||||
@@ -592,6 +854,18 @@ | |||||
<param name="version"></param> | <param name="version"></param> | ||||
<param name="flags"></param> | <param name="flags"></param> | ||||
</member> | </member> | ||||
<member name="T:JT1078.FMp4.TrackRunBox"> | |||||
<summary> | |||||
trun | |||||
</summary> | |||||
</member> | |||||
<member name="M:JT1078.FMp4.TrackRunBox.#ctor(System.Byte,System.UInt32)"> | |||||
<summary> | |||||
trun | |||||
</summary> | |||||
<param name="version"></param> | |||||
<param name="flags"></param> | |||||
</member> | |||||
<member name="P:JT1078.FMp4.TrackRunBox.DataOffset"> | <member name="P:JT1078.FMp4.TrackRunBox.DataOffset"> | ||||
<summary> | <summary> | ||||
可选的 | 可选的 | ||||
@@ -683,12 +957,12 @@ | |||||
</member> | </member> | ||||
<member name="P:JT1078.FMp4.FMp4Box.FragmentBoxs"> | <member name="P:JT1078.FMp4.FMp4Box.FragmentBoxs"> | ||||
<summary> | <summary> | ||||
fboxs | |||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:JT1078.FMp4.FMp4Box.MovieFragmentRandomAccessBox"> | <member name="P:JT1078.FMp4.FMp4Box.MovieFragmentRandomAccessBox"> | ||||
<summary> | <summary> | ||||
mfra | |||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="F:JT1078.FMp4.FMp4Constants.DateLimitYear"> | <member name="F:JT1078.FMp4.FMp4Constants.DateLimitYear"> | ||||