Mercurial > mplayer.hg
annotate TOOLS/realcodecs/sipr.c @ 25107:ad93c5ba83be
Fix compilation error.
FFmpeg commit r11071 removed the static ByteIOContext from AVFormatContext
and replaced it with a dynamic one.
Thus muxer_lavf.c needs to be modified to reflect the change.
author | iive |
---|---|
date | Thu, 22 Nov 2007 00:22:29 +0000 |
parents | 5fcc1a21f978 |
children | 9e13376e0daa |
rev | line source |
---|---|
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
1 /* |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
2 GPL v2 blah blah |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
3 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
4 This is a small dll that works as a wrapper for the actual cook.so.6.0 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
5 dll from real player 8.0. |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
6 */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
7 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
8 /* |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
9 Assuming that RACloseCodec is the last call. |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
10 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
11 0000000000001b8c g DF .text 000000000000002b G2 RASetPwd |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
12 0000000000001c6c g DF .text 000000000000003e G2 RAInitEncoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
13 0000000000001a8c g DF .text 0000000000000039 G2 RAOpenCodec2 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
14 0000000000001a50 g DF .text 0000000000000039 G2 RAOpenCodec |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
15 0000000000001ac8 g DF .text 000000000000002c G2 RACloseCodec |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
16 0000000000001af4 g DF .text 000000000000000a G2 RAGetNumberOfFlavors |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
17 0000000000001bdc g DF .text 0000000000000032 G2 RADecode |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
18 0000000000001cac g DF .text 0000000000000029 G2 RAEncode |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
19 0000000000001cd8 g DF .text 0000000000000023 G2 RAFreeEncoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
20 000000000000138c g DF .text 0000000000000029 G2 SetDLLAccessPath |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
21 0000000000001c48 g DF .text 0000000000000023 G2 RAFreeDecoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
22 0000000000001c10 g DF .text 0000000000000035 G2 RAFlush |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
23 0000000000001b00 g DF .text 0000000000000052 G2 RAGetFlavorProperty |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
24 0000000000001b54 g DF .text 0000000000000038 G2 RASetFlavor |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
25 0000000000001bb8 g DF .text 0000000000000023 G2 RAInitDecoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
26 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
27 */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
28 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
29 #include <stddef.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
30 #include <stdio.h> |
24208
3b80b74b6813
Fix "incompatible implicit declaration of built-in function 'exit'" warnings.
diego
parents:
7774
diff
changeset
|
31 #include <stdlib.h> |
24210 | 32 #include <string.h> |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
33 #include <dlfcn.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
34 #include <sys/time.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
35 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
36 typedef unsigned long ulong; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
37 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
38 ulong (*raCloseCodec)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
39 ulong (*raDecode)(ulong,ulong,ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
40 ulong (*raEncode)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
41 ulong (*raFlush)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
42 ulong (*raFreeDecoder)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
43 ulong (*raFreeEncoder)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
44 ulong (*raGetFlavorProperty)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
45 ulong (*raGetNumberOfFlavors)(void); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
46 ulong (*raGetNumberOfFlavors2)(void); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
47 ulong (*raInitDecoder)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
48 ulong (*raInitEncoder)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
49 ulong (*raOpenCodec)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
50 ulong (*raOpenCodec2)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
51 ulong (*raSetFlavor)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
52 void (*raSetDLLAccessPath)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
53 /* the following symbol will be _dlsym()ed by rarender.so, |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
54 but at least doesn't exist in cook.so |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
55 */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
56 ulong (*raSetPwd)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
57 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
58 int b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
59 void *handle=NULL; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
60 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
61 /* exits program when failure */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
62 void loadSyms() { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
63 fputs("loadSyms()\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
64 if (!b_dlOpened) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
65 char *error; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
66 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
67 // fputs("opening dll...\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
68 handle = dlopen ("/usr/local/RealPlayer8/Codecs/realsipr.so.6.0", RTLD_LAZY); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
69 if (!handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
70 fputs (dlerror(), stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
71 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
72 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
73 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
74 raCloseCodec = dlsym(handle, "RACloseCodec"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
75 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
76 fprintf (stderr, "dlsym(RACloseCodec): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
77 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
78 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
79 raDecode = dlsym(handle, "RADecode"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
80 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
81 fprintf (stderr, "dlsym(RADecode): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
82 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
83 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
84 raEncode = dlsym(handle, "RAEncode"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
85 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
86 fprintf (stderr, "dlsym(RAEncode): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
87 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
88 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
89 raFlush = dlsym(handle, "RAFlush"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
90 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
91 fprintf (stderr, "dlsym(RAFlush): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
92 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
93 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
94 raFreeDecoder = dlsym(handle, "RAFreeDecoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
95 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
96 fprintf (stderr, "dlsym(RAFreeDecoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
97 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
98 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
99 raFreeEncoder = dlsym(handle, "RAFreeEncoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
100 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
101 fprintf (stderr, "dlsym(RAFreeEncoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
102 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
103 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
104 raGetFlavorProperty = dlsym(handle, "RAGetFlavorProperty"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
105 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
106 fprintf (stderr, "dlsym(RAGetFlavorProperty): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
107 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
108 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
109 raGetNumberOfFlavors = dlsym(handle, "RAGetNumberOfFlavors"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
110 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
111 fprintf (stderr, "dlsym(RAGetNumberOfFlavors): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
112 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
113 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
114 // raGetNumberOfFlavors2 = dlsym(handle, "RAGetNumberOfFlavors2"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
115 // if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
116 // fprintf (stderr, "dlsym(RAGetNumberOfFlavors2): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
117 // exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
118 // } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
119 raInitDecoder = dlsym(handle, "RAInitDecoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
120 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
121 fprintf (stderr, "dlsym(RAInitDecoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
122 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
123 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
124 raInitEncoder = dlsym(handle, "RAInitEncoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
125 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
126 fprintf (stderr, "dlsym(RAInitEncoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
127 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
128 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
129 raOpenCodec = dlsym(handle, "RAOpenCodec"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
130 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
131 fprintf (stderr, "dlsym(RAOpenCodec): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
132 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
133 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
134 raOpenCodec2 = dlsym(handle, "RAOpenCodec2"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
135 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
136 fprintf (stderr, "dlsym(RAOpenCodec2): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
137 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
138 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
139 raSetFlavor = dlsym(handle, "RASetFlavor"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
140 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
141 fprintf (stderr, "dlsym(RASetFlavor): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
142 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
143 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
144 raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
145 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
146 fprintf (stderr, "dlsym(SetDLLAccessPath): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
147 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
148 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
149 raSetPwd = dlsym(handle, "RASetPwd"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
150 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
151 fprintf (stderr, "dlsym(RASetPwd): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
152 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
153 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
154 b_dlOpened=1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
155 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
156 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
157 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
158 void closeDll() { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
159 if (handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
160 b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
161 dlclose(handle); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
162 handle=NULL; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
163 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
164 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
165 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
166 void _init(void) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
167 loadSyms(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
168 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
169 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
170 struct timezone tz; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
171 struct timeval tv1, tv2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
172 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
173 void tic() { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
174 gettimeofday(&tv1, &tz); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
175 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
176 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
177 void toc() { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
178 long secs, usecs; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
179 gettimeofday(&tv2, &tz); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
180 secs=tv2.tv_sec-tv1.tv_sec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
181 usecs=tv2.tv_usec-tv1.tv_usec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
182 if (usecs<0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
183 usecs+=1000000; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
184 --secs; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
185 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
186 fprintf(stderr, "Duration: %d.%0.6ds\n", secs, usecs); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
187 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
188 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
189 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
190 void hexdump(void *pos, int len) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
191 unsigned char *cpos=pos, *cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
192 int lines=(len+15)>>4; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
193 while(lines--) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
194 int len1=len, i; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
195 fprintf(stderr, "%0x ", cpos); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
196 cpos1=cpos; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
197 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
198 if (len1>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
199 fprintf(stderr, "%02x ", *(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
200 } else { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
201 fprintf(stderr, " "); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
202 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
203 len1--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
204 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
205 fputs(" ", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
206 cpos=cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
207 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
208 if (len>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
209 unsigned char ch=(*(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
210 if ((ch<32)||(ch>127)) ch='.'; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
211 fputc(ch, stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
212 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
213 len--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
214 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
215 fputs("\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
216 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
217 fputc('\n', stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
218 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
219 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
220 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
221 ulong RACloseCodec(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
222 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
223 fprintf(stderr, "RACloseCodec(ulong p1=0x%0x(%d))\n", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
224 result=(*raCloseCodec)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
225 // closeDll(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
226 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
227 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
228 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
229 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
230 static int pkno=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
231 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
232 ulong RADecode(ulong p1,ulong p2,ulong p3,ulong p4,ulong* p5,ulong p6) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
233 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
234 int x,y; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
235 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
236 fprintf(stderr, "RADecode(ulong ctx=0x%0x, ", p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
237 fprintf(stderr, "ulong src=0x%0x,\n", p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
238 fprintf(stderr, "ulong len=0x%0x,", p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
239 fprintf(stderr, "ulong dst=0x%0x,\n", p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
240 fprintf(stderr, "ulong dstcnt=0x%0x, ",p5); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
241 fprintf(stderr, "ulong p6=%d)\n", p6); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
242 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
243 // hexdump((void*)p2, p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
244 // hexdump((void*)p4, 80); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
245 // hexdump((void*)p5, 16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
246 // tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
247 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
248 #if 0 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
249 hexdump(p2, 0x128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
250 #else |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
251 fprintf(stderr,"\n#CRC[%3d]",pkno++); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
252 for(y=0;y<(0x128*2);y+=37){ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
253 unsigned short crc=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
254 unsigned char* p=p2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
255 // p+=y; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
256 for(x=0;x<37;x++){ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
257 int i=y+x; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
258 int ib=p[(i>>1)]; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
259 if(i&1) ib>>=4; else ib&=15; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
260 crc+=ib<<(x&7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
261 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
262 fprintf(stderr," %04X",crc); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
263 // fprintf(stderr," %02X",p[0]); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
264 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
265 fprintf(stderr,"\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
266 #endif |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
267 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
268 { FILE *f=fopen("sipr.dump","a"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
269 fwrite(p2,p3,1,f); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
270 fclose(f); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
271 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
272 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
273 result=(*raDecode)(p1,p2,p3,p4,p5,p6); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
274 // toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
275 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
276 // hexdump((void*)p4, 80); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
277 // hexdump((void*)p5, 16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
278 fprintf(stderr, "--> 0x%0x(%d) decoded: %d \n\n\n", result, result, p5[0]); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
279 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
280 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
281 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
282 ulong RAEncode(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
283 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
284 fprintf(stderr, "RAEncode(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
285 fprintf(stderr, "ulong p2=0x%0x(%d),\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
286 fprintf(stderr, "ulong p3=0x%0x(%d))\n", p3, p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
287 result=(*raEncode)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
288 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
289 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
290 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
291 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
292 ulong RAFlush(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
293 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
294 fprintf(stderr, "RAFlush(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
295 fprintf(stderr, "ulong p2=0x%0x(%d),\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
296 fprintf(stderr, "ulong p3=0x%0x(%d))\n", p3, p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
297 result=(*raFlush)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
298 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
299 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
300 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
301 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
302 ulong RAFreeDecoder(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
303 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
304 fprintf(stderr, "RAFreeDecoder(ulong p1=0x%0x(%d))\n", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
305 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
306 result=(*raFreeDecoder)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
307 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
308 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
309 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
310 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
311 ulong RAFreeEncoder(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
312 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
313 fprintf(stderr, "RAFreeEncoder(ulong p1=0x%0x(%d))\n", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
314 result=(*raFreeEncoder)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
315 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
316 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
317 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
318 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
319 ulong RAGetFlavorProperty(ulong p1,ulong p2,ulong p3, ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
320 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
321 fprintf(stderr, "RAGetFlavorProperty(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
322 fprintf(stderr, "ulong p2=0x%0x(%d),\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
323 fprintf(stderr, "ulong p3=0x%0x(%d), ", p3, p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
324 fprintf(stderr, "ulong p4=0x%0x(%d))\n", p4, p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
325 hexdump((void*)p4/*(void*)(*((void**)p4))*/,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
326 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
327 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
328 result=(*raGetFlavorProperty)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
329 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
330 fprintf(stderr, "*p4=0x%0x\n", *((ulong*)p4)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
331 hexdump((void*)p4/*(void*)(*((void**)p4))*/,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
332 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
333 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
334 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
335 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
336 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
337 ulong RAGetNumberOfFlavors(void) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
338 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
339 fprintf(stderr, "RAGetNumberOfFlavors(void)\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
340 result=(*raGetNumberOfFlavors)(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
341 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
342 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
343 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
344 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
345 ulong RAInitDecoder(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
346 ulong result; |
24216 | 347 // int temp[256]; |
348 // unsigned char temp2[256]; | |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
349 fprintf(stderr, "RAInitDecoder(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
350 fprintf(stderr, "ulong p2=0x%0x(%d))\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
351 hexdump((void*)p2, 4*7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
352 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
353 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
354 #if 1 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
355 result=(*raInitDecoder)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
356 #else |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
357 memset(temp,0x77,256*4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
358 memcpy(temp,p2,4*7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
359 hexdump((void*)temp[6], 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
360 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
361 memset(temp2,0x77,256); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
362 memcpy(temp2,temp[6],16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
363 temp[6]=temp2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
364 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
365 result=(*raInitDecoder)(p1,temp); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
366 hexdump((void*)temp[6], 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
367 #endif |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
368 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
369 // memcpy(p2,temp,4*11); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
370 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
371 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
372 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
373 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
374 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
375 ulong RAInitEncoder(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
376 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
377 fprintf(stderr, "RAInitEncoder(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
378 fprintf(stderr, "ulong p2=0x%0x(%d))\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
379 result=(*raInitEncoder)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
380 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
381 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
382 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
383 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
384 ulong RAOpenCodec(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
385 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
386 // loadSyms(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
387 fprintf(stderr, "RAOpenCodec(ulong p1=0x%0x(%d))\n", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
388 result=(*raOpenCodec)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
389 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
390 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
391 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
392 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
393 ulong RAOpenCodec2(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
394 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
395 // loadSyms(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
396 fprintf(stderr, "RAOpenCodec2(ulong p1=0x%0x(%d))\n", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
397 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
398 result=(*raOpenCodec2)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
399 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
400 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
401 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
402 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
403 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
404 ulong RASetFlavor(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
405 ulong result, numprop=0, result1=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
406 ulong numflavors, flavor; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
407 unsigned short property; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
408 fprintf(stderr, "RASetFlavor(ulong p1=0x%0x(%d), ", p1, p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
409 fprintf(stderr, "ulong p2=0x%0x(%d))\n", p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
410 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
411 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
412 result=(*raSetFlavor)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
413 fprintf(stderr, "--> 0x%0x(%d)\n\n\n", result, result); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
414 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
415 #if 1 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
416 fputs("######################## FLAVOR PROPERTIES ###################\n\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
417 numflavors=3;//raGetNumberOfFlavors(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
418 flavor=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
419 while (flavor<numflavors) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
420 fprintf(stderr, "************ Flavor %d *************\n\n", flavor); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
421 numprop=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
422 while (numprop<32) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
423 result1=raGetFlavorProperty(p1, flavor, numprop, (ulong)&property); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
424 fprintf(stderr, "property %d=%d, result=0x%0x\n\n", |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
425 numprop, property, result1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
426 hexdump((void*)result1, property); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
427 numprop++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
428 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
429 flavor++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
430 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
431 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
432 fputs("######################## FLAVOR PROPERTIES ###################\n\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
433 #endif |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
434 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
435 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
436 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
437 |
7774 | 438 void SetDLLAccessPath(ulong p1,ulong p2) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
439 // loadSyms(); |
7774 | 440 char* ize=p1; |
441 fprintf(stderr, "SetDLLAccessPath(ulong p1=0x%0x(%d) p2=%p)\n", p1, p1,p2); | |
442 while(*ize){ | |
443 fprintf(stderr,"%s\n",ize); | |
444 ize+=strlen(ize)+1; | |
445 } | |
446 //hexdump((void*)p1, 244); | |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
447 (*raSetDLLAccessPath)(p1); |
7774 | 448 // hexdump((void*)p1, 44); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
449 fprintf(stderr, "--> void\n\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
450 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
451 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
452 static char pwdtemp[1000]; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
453 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
454 void RASetPwd(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
455 // loadSyms(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
456 fprintf(stderr, "RASetPwd(ulong p1=0x%0x(%d),ulong p2=0x%0x(%d))\n", p1, p1, p2, p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
457 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
458 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
459 memset(pwdtemp,0x77,1000); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
460 hexdump((void*)pwdtemp, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
461 (*raSetPwd)(pwdtemp,"Ardubancel Quazanga"); // set password... lol. |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
462 hexdump((void*)pwdtemp, 1000); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
463 strcpy(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
464 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
465 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
466 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
467 fprintf(stderr, "--> void\n\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
468 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
469 |