import "41.neocities.org/sofia"
const PiffExtendedType = "a2394f525a9b4f14a2446c427c648df4"
ISO/IEC 14496-12
aligned(8) class Box(
unsigned int(32) boxtype,
optional unsigned int(8)[16] extended_type
) {
BoxHeader(boxtype, extended_type);
// the remaining bytes are the BoxPayload
}
ISO/IEC 14496-12
aligned(8) class BoxHeader(
unsigned int(32) boxtype,
optional unsigned int(8)[16] extended_type
) {
unsigned int(32) size;
unsigned int(32) type = boxtype;
if (size==1) {
unsigned int(64) largesize;
} else if (size==0) {
// box extends to end of file
}
if (boxtype=='uuid') {
unsigned int(8)[16] usertype = extended_type;
}
}
ISO/IEC 14496-12
aligned(8) class FullBoxHeader(unsigned int(8) v, bit(24) f) {
unsigned int(8) version = v;
bit(24) flags = f;
}
func (f *FullBoxHeader) GetFlags() uint32
type SampleEntry struct {
BoxHeader BoxHeader
DataReferenceIndex uint16
// contains filtered or unexported fields
}
ISO/IEC 14496-12
aligned(8) abstract class SampleEntry(
unsigned int(32) format
) extends Box(format) {
const unsigned int(8)[6] reserved = 0;
unsigned int(16) data_reference_index;
}
func (s *SampleEntry) Append(data []byte) ([]byte, error)
func (s *SampleEntry) Decode(data []byte) (int, error)
| Path | Synopsis |
|---|---|
| enca | |
| encv | |
| file | |
| frma | |
| internal/2024/os-test | |
| internal/2024/write-at | |
| mdat | |
| mdhd | |
| mdia | |
| minf | |
| moof | |
| moov | |
| pssh | |
| schi | |
| senc | |
| sidx | |
| sinf | |
| stbl | |
| stsd | |
| tenc | |
| tfhd | |
| traf | |
| trak | |
| trun |
git clone
https://github.com/3052/sofia.git git@github.com:3052/sofia.git