Mercurial > mplayer.hg
annotate libmpdemux/nuppelvideo.h @ 15310:b01679500a5e
compilation fix (libavcodec sync)
author | rik |
---|---|
date | Sun, 01 May 2005 08:33:35 +0000 |
parents | 9ddae5897422 |
children | 6825cbde2df6 |
rev | line source |
---|---|
3807 | 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 .. Uncompressed [NI] | |
30 // 1 .. RTJpeg | |
31 // 2 .. RTJpeg with lzo afterwards | |
32 // N .. black frame | |
33 // L .. simply copy last frame (if lost frames) | |
34 // A: 0 .. Uncompressed (44100/sec 16bit 2ch) | |
35 // 1 .. lzo compression [NI] | |
36 // 2 .. layer2 (packet) [NI] | |
37 // 3 .. layer3 (packet) [NI] | |
38 // F .. flac (lossless) [NI] | |
39 // S .. shorten (lossless) [NI] | |
40 // N .. null frame loudless | |
41 // L .. simply copy last frame (may sound bad) NI | |
42 // S: B .. Audio and Video sync point [NI] | |
43 // A .. Audio Sync Information | |
44 // timecode == effective dsp-frequency*100 | |
45 // when reaching this audio sync point | |
46 // because many cheap soundcards are unexact | |
47 // and have a range from 44000 to 44250 | |
48 // instead of the expected exact 44100 S./sec | |
49 // V .. Next Video Sync | |
50 // timecode == next video framenumber | |
51 // S .. Audio,Video,Text Correlation [NI] | |
52 char keyframe; // 0 .. keyframe | |
53 // 1 .. nr of frame in gop => no keyframe | |
54 | |
55 char filters; // Every bit stands for one type of filter | |
56 // 1 .. Gauss 5 Pixel (8*m+2*l+2*r+2*a+2*b)/16 [NYI] | |
57 // 2 .. Gauss 5 Pixel (8*m+1*l+1*r+1*a+1*b)/12 [NYI] | |
58 // 4 .. Cartoon Filter [NI] | |
59 // 8 .. Reserverd Filter [NI] | |
60 // 16 .. Reserverd Filter [NI] | |
61 // 32 .. Reserverd Filter [NI] | |
62 // 64 .. Reserverd Filter [NI] | |
63 // 128 .. Reserverd Filter [NI] | |
64 | |
65 int timecode; // Timecodeinformation sec*1000 + msecs | |
66 | |
67 int packetlength; // V,A,T: length of following data in stream | |
68 // S: length of packet correl. information [NI] | |
69 // R: do not use here! (fixed 'RTjjjjjjjjjjjjjj') | |
70 } rtframeheader; | |
71 | |
72 #define FRAMEHEADERSIZE sizeof(rtframeheader) | |
73 #define FILEHEADERSIZE sizeof(rtfileheader) | |
74 | |
75 typedef struct vidbuffertype | |
76 { | |
77 int sample; | |
78 int timecode; | |
79 int freeToEncode; | |
80 int freeToBuffer; | |
81 unsigned char *buffer_offset; | |
82 } vidbuffertyp; | |
83 | |
84 typedef struct audbuffertype | |
85 { | |
86 int sample; | |
87 int timecode; | |
88 int freeToEncode; | |
89 int freeToBuffer; | |
90 unsigned char *buffer_offset; | |
91 } audbuffertyp; | |
92 | |
14896
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
93 #ifdef WORDS_BIGENDIAN |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
94 #define le2me_rtfileheader(h) { \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
95 (h)->width = le2me_32((h)->width); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
96 (h)->height = le2me_32((h)->height); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
97 (h)->desiredwidth = le2me_32((h)->desiredwidth); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
98 (h)->desiredheight = le2me_32((h)->desiredheight); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
99 (h)->videoblocks = le2me_32((h)->videoblocks); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
100 (h)->audioblocks = le2me_32((h)->audioblocks); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
101 (h)->textsblocks = le2me_32((h)->textsblocks); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
102 (h)->keyframedist = le2me_32((h)->keyframedist); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
103 } |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
104 #define le2me_rtframeheader(h) { \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
105 (h)->timecode = le2me_32((h)->timecode); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
106 (h)->packetlength = le2me_32((h)->packetlength); \ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
107 } |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
108 #else |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
109 #define le2me_rtfileheader(h) /**/ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
110 #define le2me_rtframeheader(h) /**/ |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
111 #endif |
9ddae5897422
Make nuv files work on bigendian (but old nuv files created with mencoder
reimar
parents:
3807
diff
changeset
|
112 |