]> git.sesse.net Git - casparcg/blob - BluefishSDK_V5_10_0_42/Inc/BlueVelvet_c.h
ntsc-audio-exp: Better synchronization of audio-cadence.
[casparcg] / BluefishSDK_V5_10_0_42 / Inc / BlueVelvet_c.h
1 /*\r
2 // ==========================================================================\r
3 //      Bluefish444 BlueVelvet SDK library\r
4 //\r
5 //  BlueSD_c.h\r
6 //  Constants header\r
7 //      LARGELY superseded by dynamic calculations\r
8 \r
9 \r
10   $Id: BlueVelvet_c.h,v 1.4 2002/10/02 00:29:53 cameron Exp $\r
11 //\r
12 //  developed by  : Cameron Duffy   (C) 2002 Bluefish444 P/L\r
13 // ==========================================================================\r
14 //\r
15 */\r
16 \r
17 //----------------------------------------------------------------------------\r
18 #ifndef _BLUEVELVET_C_H\r
19 #define _BLUEVELVET_C_H\r
20 \r
21 //----------------------------------------------------------------------------------------------------------------------\r
22 // File SUB-types supported\r
23 //\r
24 typedef enum\r
25 {\r
26         EBlue_10BIT_NTSC=0,             // 10 BIT NTSC\r
27         EBlue_10BIT_PAL,                // 10 BIT PAL\r
28         EBlue_08BIT_NTSC,               //  8 BIT NTSC\r
29         EBlue_08BIT_PAL,                //  8 BIT PAL\r
30         EBlue_32BIT_NTSC,               // 32 BIT NTSC (ARGB - uncompressed)\r
31         EBlue_32BIT_PAL         // 32 BIT PAL  (ARGB - uncompressed)\r
32 } EBlueFileId;\r
33 \r
34 // File subtype ID;s\r
35 #define BLUE_FILE_10BIT_NTSC    0       // 10 BIT NTSC\r
36 #define BLUE_FILE_10BIT_PAL             1       // 10 BIT PAL\r
37 #define BLUE_FILE_08BIT_NTSC    2       //  8 BIT NTSC\r
38 #define BLUE_FILE_08BIT_PAL             3       //  8 BIT PAL\r
39 #define BLUE_FILE_32BIT_NTSC    4       // 32 BIT NTSC (ARGB - uncompressed)\r
40 #define BLUE_FILE_32BIT_PAL             5       // 32 BIT PAL  (ARGB - uncompressed)\r
41 \r
42 // File subtype FOURCC\r
43 #define BLUE_SUBTYPE_10BIT_NTSC 0x52594e5f      //'RYN_'        // 10 BIT NTSC\r
44 #define BLUE_SUBTYPE_10BIT_PAL  0x5259515f      //'RYP_'        // 10 BIT PAL\r
45 #define BLUE_SUBTYPE_08BIT_NTSC 0x52384e5f      //'R8N_'        //  8 BIT NTSC\r
46 #define BLUE_SUBTYPE_08BIT_PAL  0x5238515f      //'R8P_'        //  8 BIT PAL\r
47 #define BLUE_SUBTYPE_32BIT_NTSC 0x52524e5f      //'RRN_'        // 32 BIT NTSC (ARGB - uncompressed)\r
48 #define BLUE_SUBTYPE_32BIT_PAL  0x5252415f      //'RRP_'        // 32 BIT PAL  (ARGB - uncompressed)\r
49 \r
50 #define BLUE_ROOTED_SUBTYPE             0x62626262      //'XXXX'\r
51 #define BLUE_FILE_NOVIDEO               0x62626262      //'XXXX'\r
52 #define BLUE_FILE_TYPE                  0x5244565f      //'RDV_'\r
53 #define BLUE_CLASS_ID                   0x52444456      //'RDDV'\r
54 \r
55 // align this structure on 512 byte boundary!\r
56 typedef struct\r
57 {\r
58         char                            name[20];               // "PREMIERE RDV_FILE";\r
59         ULONG                           hasAudio;               // See BLUE_SUBTYPE_???\r
60         ULONG                           VideoSubtype;   // See BLUE_SUBTYPE_???\r
61         ULONG                           width;                  // width of frame in pixels\r
62         ULONG                           height;                 // height of frame in pixels (can get video mode)\r
63         ULONG                           rowbytes;               // total bytes in row (can get mem format from this and width)\r
64         ULONG                           numFrames;              // number of frames in file\r
65         ULONG                           frameOffset;    // GOLDEN frame size\r
66         ULONG                           duration;               // TDB - value = total number of frames\r
67         long                            scale;                  // TDB - scale = scale / samplesize = timebase\r
68         long                            sampleSize;             // TDB - sampleSize = 1 or 100 if 29.97 fps\r
69 \r
70         ULONG                           gFmtVid;\r
71         ULONG                           gFmtMem;\r
72         ULONG                           gFmtUpd;\r
73         ULONG                           gFmtRes;\r
74         // 76 bytes\r
75         char                            orgtime[20];    // These fields map directly to those in imTimeInfoRec.\r
76         char                            alttime[20];\r
77         char                            orgreel[40];\r
78         char                            altreel[40];\r
79         // 196 bytes\r
80         char                            logcomment[256];\r
81         // 452 bytes\r
82 //      char                            pad[512-452-4];\r
83         char                            pad[56];\r
84         // For disk speed to work, this structure MUST be a multiple of sector size\r
85         ULONG                           len;                    // Length of TRAILER, *always* last!\r
86 } RDV_File2_OLD;\r
87 //#define       SIZE_RDV_FILE   512\r
88 \r
89 #define kGoldenPageSize 4096\r
90 \r
91 typedef struct\r
92 {\r
93         char                            name[20];               // "PREMIERE RDV_FILE ";\r
94         ULONG                           hasAudio;               // See BLUE_SUBTYPE_???\r
95         ULONG                           VideoSubtype;   // See BLUE_SUBTYPE_???\r
96         ULONG                           width;                  // width of frame in pixels\r
97         ULONG                           height;                 // height of frame in pixels (can get video mode)\r
98         ULONG                           rowbytes;               // total bytes in row (can get mem format from this and width)\r
99         ULONG                           numFrames;              // number of frames in file\r
100         ULONG                           frameOffset;    // GOLDEN frame size\r
101         ULONG                           duration;               // TDB - value = total number of frames\r
102         long                            scale;                  // TDB - scale = scale / samplesize = timebase\r
103         long                            sampleSize;             // TDB - sampleSize = 1 or 100 if 29.97 fps\r
104 \r
105         ULONG                           gFmtVid;\r
106         ULONG                           gFmtMem;\r
107         ULONG                           gFmtUpd;\r
108         ULONG                           gFmtRes;\r
109         // 76 bytes\r
110         char                            orgtime[20];    // These fields map directly to those in imTimeInfoRec.\r
111         char                            alttime[20];\r
112         char                            orgreel[40];\r
113         char                            altreel[40];\r
114         // 196 bytes\r
115         char                            logcomment[256];\r
116         // 452 bytes\r
117 //      char                            pad[512-452-4];\r
118         ULONG                           audioSampleRate;                // 48000 or 96000\r
119         ULONG                           numChannels;                    // 2, 4, or 6\r
120         ULONG                           numAudioBlocks;                 // how many in the file?\r
121         // 464 bytes\r
122         char                            pad[36];\r
123 \r
124         _int64                          audioBlockOffsets[kGoldenPageSize * 4];         // something like 4.5 hours max length (enough for now I guess)\r
125         ULONG                           audioBlockSizes[kGoldenPageSize * 4];\r
126 \r
127         // For disk speed to work, this structure MUST be a multiple of sector size\r
128         ULONG                           len;                    // Length of TRAILER, *always* last!\r
129 } RDV_File2;\r
130 \r
131 #endif //_BLUEVELVET_C_H\r