AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
rawfile.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef AJA_RAWFILE_H
9 #define AJA_RAWFILE_H
10 
11 const uint32_t AJAAudioHeaderTag = AJA_FOURCC('a','j','a','h');
12 const uint32_t AJAVideoHeaderTag = AJA_FOURCC('a','j','v','h');
13 const uint32_t AJAAudioDataTag = AJA_FOURCC('a','j','a','d');
14 const uint32_t AJAVideoDataTag = AJA_FOURCC('a','j','v','d');
15 
16 #pragma pack(push,1)
17 
19 {
20  uint32_t tag; // should be AJAAudioHeaderTag
21  int64_t size; // sizeof(AJARawAudioHeader)
22  int64_t scale; // video frame scale for timecode, ie. 30000
23  int64_t duration; // video frame duration for timecode, ie. 1001
24  int64_t timecode; // video frame offset of first sample
25 
26  uint32_t rate; // number of samples per second, ie. 48000
27  uint32_t channels; // number of channels, ie. 2,4,8, etc.
28  uint32_t bigEndian; // non-zero if samples are in big endian format
29  uint32_t sampleSize; // number of bytes per sample, ie. 2,3,4
30  uint32_t isFloat; // non-zero if samples are in floating point format
31 
32  // crank this out to 1024 bytes for additional future stuff
33  uint32_t reserved[(1024 - (sizeof(uint32_t) * 6) - (sizeof(int64_t) * 4)) / sizeof(uint32_t)];
34 };
35 
37 {
38  uint32_t tag; // should be AJAVideoHeaderTag
39  int64_t size; // sizeof(AJARawVideoHeader)
40  int64_t scale; // video frame scale for timecode, ie. 30000
41  int64_t duration; // video frame duration for timecode, ie. 1001
42  int64_t timecode; // video frame offset of first sample
43 
44  uint32_t fourcc; // fourcc of video frames, this format implies fixed bytes per frame
45  uint32_t xRes; // x resolution of video frames, ie. 1920
46  uint32_t yRes; // y resolution of video frames, ie. 1080
47  uint32_t bytesPerFrame; // number of bytes per frame of video, all frames are the same
48  uint32_t aspectX; // x aspect of video frames, ie. 1
49  uint32_t aspectY; // y aspect of video frames, ie. 1
50  uint32_t interlace; // interlace of frames, 0-progressive, 1-lower, 2-upper
51 
52  // crank this out to 1024 bytes for additional future stuff
53  uint32_t reserved[(1024 - (sizeof(uint32_t) * 8) - (sizeof(int64_t) * 4)) / sizeof(uint32_t)];
54 };
55 
57 {
58  uint32_t tag; // should be AJAVideoDataTag or AJAAudioDataTag
59  int64_t size; // if size is zero, go to end of file with this chunk
60 };
61 
62 #pragma pack(pop)
63 
64 #endif // AJA_RAWFILE_H
int64_t size
Definition: rawfile.h:59
const uint32_t AJAVideoDataTag
Definition: rawfile.h:14
uint32_t isFloat
Definition: rawfile.h:30
uint32_t rate
Definition: rawfile.h:26
#define AJA_FOURCC(a, b, c, d)
Definition: types.h:359
uint32_t sampleSize
Definition: rawfile.h:29
uint32_t reserved[(1024 -(sizeof(uint32_t) *8) -(sizeof(int64_t) *4))/sizeof(uint32_t)]
Definition: rawfile.h:53
uint32_t fourcc
Definition: rawfile.h:44
uint32_t yRes
Definition: rawfile.h:46
uint32_t reserved[(1024 -(sizeof(uint32_t) *6) -(sizeof(int64_t) *4))/sizeof(uint32_t)]
Definition: rawfile.h:33
uint32_t tag
Definition: rawfile.h:20
uint32_t aspectY
Definition: rawfile.h:49
const uint32_t AJAVideoHeaderTag
Definition: rawfile.h:12
uint32_t aspectX
Definition: rawfile.h:48
const uint32_t AJAAudioHeaderTag
Definition: rawfile.h:11
uint32_t xRes
Definition: rawfile.h:45
uint32_t tag
Definition: rawfile.h:38
uint32_t bytesPerFrame
Definition: rawfile.h:47
int64_t size
Definition: rawfile.h:39
uint32_t bigEndian
Definition: rawfile.h:28
const uint32_t AJAAudioDataTag
Definition: rawfile.h:13
int64_t timecode
Definition: rawfile.h:24
int64_t scale
Definition: rawfile.h:22
int64_t scale
Definition: rawfile.h:40
int64_t size
Definition: rawfile.h:21
int64_t duration
Definition: rawfile.h:41
uint32_t interlace
Definition: rawfile.h:50
uint32_t tag
Definition: rawfile.h:58
int64_t duration
Definition: rawfile.h:23
uint32_t channels
Definition: rawfile.h:27
int64_t timecode
Definition: rawfile.h:42