1 /* nuppelvideo.h rh */ 2 3 typedef struct rtfileheader 4 { 5 char finfo[12]; // "NuppelVideo" + \0 6 char version[5]; // "0.05" + \0 7 int width; 8 int height; 9 int desiredwidth; // 0 .. as it is 10 int desiredheight; // 0 .. as it is 11 char pimode; // P .. progressive 12 // I .. interlaced (2 half pics) [NI] 13 double aspect; // 1.0 .. square pixel (1.5 .. e.g. width=480: width*1.5=720 14 // for capturing for svcd material 15 double fps; 16 int videoblocks; // count of video-blocks -1 .. unknown 0 .. no video 17 int audioblocks; // count of audio-blocks -1 .. unknown 0 .. no audio 18 int textsblocks; // count of text-blocks -1 .. unknown 0 .. no text 19 int keyframedist; 20 } rtfileheader; 21 22 typedef struct rtframeheader 23 { 24 char frametype; // A .. Audio, V .. Video, S .. Sync, T .. Text 25 // R .. Seekpoint: String RTjjjjjjjj (use full packet) 26 // D .. Addition Data for Compressors 27 // ct: R .. RTjpeg Tables 28 29 char comptype; // V: 0 .. raw YUV420 30 // 1 .. RTJpeg 31 // 2 .. RTJpeg with lzo afterwards 32 // 3 .. raw YUV420 with lzo afterwards 33 // N .. black frame 34 // L .. simply copy last frame (if lost frames) 35 // A: 0 .. Uncompressed (44100/sec 16bit 2ch) 36 // 1 .. lzo compression [NI] 37 // 2 .. layer2 (packet) [NI] 38 // 3 .. layer3 (packet) [NI] 39 // F .. flac (lossless) [NI] 40 // S .. shorten (lossless) [NI] 41 // N .. null frame loudless 42 // L .. simply copy last frame (may sound bad) NI 43 // S: B .. Audio and Video sync point [NI] 44 // A .. Audio Sync Information 45 // timecode == effective dsp-frequency*100 46 // when reaching this audio sync point 47 // because many cheap soundcards are unexact 48 // and have a range from 44000 to 44250 49 // instead of the expected exact 44100 S./sec 50 // V .. Next Video Sync 51 // timecode == next video framenumber 52 // S .. Audio,Video,Text Correlation [NI] 53 char keyframe; // 0 .. keyframe 54 // 1 .. nr of frame in gop => no keyframe 55 56 char filters; // Every bit stands for one type of filter 57 // 1 .. Gauss 5 Pixel (8*m+2*l+2*r+2*a+2*b)/16 [NYI] 58 // 2 .. Gauss 5 Pixel (8*m+1*l+1*r+1*a+1*b)/12 [NYI] 59 // 4 .. Cartoon Filter [NI] 60 // 8 .. Reserverd Filter [NI] 61 // 16 .. Reserverd Filter [NI] 62 // 32 .. Reserverd Filter [NI] 63 // 64 .. Reserverd Filter [NI] 64 // 128 .. Reserverd Filter [NI] 65 66 int timecode; // Timecodeinformation sec*1000 + msecs 67 68 int packetlength; // V,A,T: length of following data in stream 69 // S: length of packet correl. information [NI] 70 // R: do not use here! (fixed 'RTjjjjjjjjjjjjjj') 71 } rtframeheader; 72 73 #define FRAMEHEADERSIZE sizeof(rtframeheader) 74 #define FILEHEADERSIZE sizeof(rtfileheader) 75 76 typedef struct vidbuffertype 77 { 78 int sample; 79 int timecode; 80 int freeToEncode; 81 int freeToBuffer; 82 unsigned char *buffer_offset; 83 } vidbuffertyp; 84 85 typedef struct audbuffertype 86 { 87 int sample; 88 int timecode; 89 int freeToEncode; 90 int freeToBuffer; 91 unsigned char *buffer_offset; 92 } audbuffertyp; 93 94