Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Created November 14, 2013 15:17
Show Gist options
  • Save martinbonnin/7468578 to your computer and use it in GitHub Desktop.
Save martinbonnin/7468578 to your computer and use it in GitHub Desktop.
class Box(boxtype, extended_type)
{
uint(32) size;
string(4) type;
@args.boxtype = type;
if(size == 1)
{
uint(64) largesize;
@size = 8*largesize;
}
else
{
@size = 8*size;
}
if(type == "uuid")
{
uuid usertype;
@args.extended_type = usertype;
}
}
class NextFragPtsBox as Box("uuid", "D4807EFF2-CA39-4695-8E5426CB9E46A79F")
{
uint(8) data[5];
int(64) next_frag_pts;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment