AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
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
AJARawVideoHeader::yRes
uint32_t yRes
Definition: rawfile.h:46
AJARawVideoHeader::tag
uint32_t tag
Definition: rawfile.h:38
AJARawVideoHeader::duration
int64_t duration
Definition: rawfile.h:41
AJARawAudioHeader::reserved
uint32_t reserved[(1024 -(sizeof(uint32_t) *6) -(sizeof(int64_t) *4))/sizeof(uint32_t)]
Definition: rawfile.h:33
AJARawAudioHeader::isFloat
uint32_t isFloat
Definition: rawfile.h:30
AJARawAudioHeader
Definition: rawfile.h:18
AJARawVideoHeader::fourcc
uint32_t fourcc
Definition: rawfile.h:44
AJARawAudioHeader::timecode
int64_t timecode
Definition: rawfile.h:24
AJARawAudioHeader::size
int64_t size
Definition: rawfile.h:21
AJARawVideoHeader::interlace
uint32_t interlace
Definition: rawfile.h:50
AJARawVideoHeader::scale
int64_t scale
Definition: rawfile.h:40
AJARawVideoHeader::size
int64_t size
Definition: rawfile.h:39
AJAVideoHeaderTag
const uint32_t AJAVideoHeaderTag
Definition: rawfile.h:12
AJARawAudioHeader::duration
int64_t duration
Definition: rawfile.h:23
AJA_FOURCC
#define AJA_FOURCC(a, b, c, d)
Definition: types.h:344
AJARawVideoHeader::reserved
uint32_t reserved[(1024 -(sizeof(uint32_t) *8) -(sizeof(int64_t) *4))/sizeof(uint32_t)]
Definition: rawfile.h:53
AJARawVideoHeader::timecode
int64_t timecode
Definition: rawfile.h:42
AJARawVideoHeader::aspectY
uint32_t aspectY
Definition: rawfile.h:49
AJARawVideoHeader::aspectX
uint32_t aspectX
Definition: rawfile.h:48
AJARawAudioHeader::scale
int64_t scale
Definition: rawfile.h:22
AJARawVideoHeader
Definition: rawfile.h:36
AJARawVideoHeader::xRes
uint32_t xRes
Definition: rawfile.h:45
AJARawAudioHeader::tag
uint32_t tag
Definition: rawfile.h:20
AJARawAudioHeader::rate
uint32_t rate
Definition: rawfile.h:26
AJARawAudioHeader::sampleSize
uint32_t sampleSize
Definition: rawfile.h:29
AJARawDataHeader::tag
uint32_t tag
Definition: rawfile.h:58
AJARawVideoHeader::bytesPerFrame
uint32_t bytesPerFrame
Definition: rawfile.h:47
AJAVideoDataTag
const uint32_t AJAVideoDataTag
Definition: rawfile.h:14
AJARawAudioHeader::bigEndian
uint32_t bigEndian
Definition: rawfile.h:28
AJARawDataHeader::size
int64_t size
Definition: rawfile.h:59
AJAAudioDataTag
const uint32_t AJAAudioDataTag
Definition: rawfile.h:13
AJARawDataHeader
Definition: rawfile.h:56
AJAAudioHeaderTag
const uint32_t AJAAudioHeaderTag
Definition: rawfile.h:11
AJARawAudioHeader::channels
uint32_t channels
Definition: rawfile.h:27