/* {"description" : "Header information from a video file." } */
data VideoHeader {
int width
int height
int frames
char fourcc[4]
int numerator
int denominator
int headerLength
}
/* {"description" : "A frame of encoded video." } */
data VideoFrame {
byte content[]
int headerLength
int timestamp
}
/* {"description" : "API to read a video file." } */
interface VideoFile {
/* {"@description" : "Checks if a video file has a valid header, for a given semantic variant of this API." } */
bool validHeader(byte content[])
/* {"@description" : "Reads the video header." } */
VideoHeader readHeader(byte content[])
/* {"@description" : "Reads a frame of (usually encoded) video, from the given offset of a byte array." } */
VideoFrame readFrame(byte content[], int offset)
/* {"@description" : "Writes the video header to a byte array." } */
byte[] writeHeader(VideoHeader hdr)
/* {"@description" : "Writes a frame of (usually encoded) video to a byte array." } */
byte[] writeFrame(VideoFrame f)
}To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n media.video.VideoFile -m "reason for update" -u yourUsername
Version 2 (this version) by barry
Notes for this version: Adds file writing functions