Mercurial > mplayer.hg
annotate TOOLS/realcodecs/sipr.c @ 36416:93473818b259
Avoid message spam by not trying formats that will not work.
This helps mostly with the formats that support hardware
acceleration.
author | reimar |
---|---|
date | Sat, 16 Nov 2013 08:07:08 +0000 |
parents | cef5275fc11f |
children |
rev | line source |
---|---|
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
1 /* |
28195
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
2 * This is a small DLL that works as a wrapper for the actual realsipr.so.6.0 |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
3 * DLL from RealPlayer 8.0. |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
4 * |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
5 * This file is part of MPlayer. |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
6 * |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
7 * MPlayer is free software; you can redistribute it and/or modify |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
10 * (at your option) any later version. |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
11 * |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
12 * MPlayer is distributed in the hope that it will be useful, |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
15 * GNU General Public License for more details. |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
16 * |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
17 * You should have received a copy of the GNU General Public License along |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
3f3f00ce912e
Relicense to GPLv2 or later with the author's permission.
diego
parents:
28193
diff
changeset
|
20 */ |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
21 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
22 /* |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
23 Assuming that RACloseCodec is the last call. |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
24 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
25 0000000000001b8c g DF .text 000000000000002b G2 RASetPwd |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
26 0000000000001c6c g DF .text 000000000000003e G2 RAInitEncoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
27 0000000000001a8c g DF .text 0000000000000039 G2 RAOpenCodec2 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
28 0000000000001a50 g DF .text 0000000000000039 G2 RAOpenCodec |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
29 0000000000001ac8 g DF .text 000000000000002c G2 RACloseCodec |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
30 0000000000001af4 g DF .text 000000000000000a G2 RAGetNumberOfFlavors |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
31 0000000000001bdc g DF .text 0000000000000032 G2 RADecode |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
32 0000000000001cac g DF .text 0000000000000029 G2 RAEncode |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
33 0000000000001cd8 g DF .text 0000000000000023 G2 RAFreeEncoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
34 000000000000138c g DF .text 0000000000000029 G2 SetDLLAccessPath |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
35 0000000000001c48 g DF .text 0000000000000023 G2 RAFreeDecoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
36 0000000000001c10 g DF .text 0000000000000035 G2 RAFlush |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
37 0000000000001b00 g DF .text 0000000000000052 G2 RAGetFlavorProperty |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
38 0000000000001b54 g DF .text 0000000000000038 G2 RASetFlavor |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
39 0000000000001bb8 g DF .text 0000000000000023 G2 RAInitDecoder |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
40 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
41 */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
42 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
43 #include <stddef.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
44 #include <stdio.h> |
24208
3b80b74b6813
Fix "incompatible implicit declaration of built-in function 'exit'" warnings.
diego
parents:
7774
diff
changeset
|
45 #include <stdlib.h> |
24210 | 46 #include <string.h> |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
47 #include <dlfcn.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
48 #include <sys/time.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
49 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
50 typedef unsigned long ulong; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
51 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
52 ulong (*raCloseCodec)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
53 ulong (*raDecode)(ulong,ulong,ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
54 ulong (*raEncode)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
55 ulong (*raFlush)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
56 ulong (*raFreeDecoder)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
57 ulong (*raFreeEncoder)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
58 ulong (*raGetFlavorProperty)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
59 ulong (*raGetNumberOfFlavors)(void); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
60 ulong (*raGetNumberOfFlavors2)(void); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
61 ulong (*raInitDecoder)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
62 ulong (*raInitEncoder)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
63 ulong (*raOpenCodec)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
64 ulong (*raOpenCodec2)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
65 ulong (*raSetFlavor)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
66 void (*raSetDLLAccessPath)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
67 /* the following symbol will be _dlsym()ed by rarender.so, |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
68 but at least doesn't exist in cook.so |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
69 */ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
70 ulong (*raSetPwd)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
71 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
72 int b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
73 void *handle=NULL; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
74 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
75 /* exits program when failure */ |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
76 void loadSyms(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
77 fputs("loadSyms()\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
78 if (!b_dlOpened) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
79 char *error; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
80 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
81 // fputs("opening dll...\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
82 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
|
83 if (!handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
84 fputs (dlerror(), stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
85 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
86 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
87 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
88 raCloseCodec = dlsym(handle, "RACloseCodec"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
89 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
90 fprintf (stderr, "dlsym(RACloseCodec): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
91 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
92 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
93 raDecode = dlsym(handle, "RADecode"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
94 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
95 fprintf (stderr, "dlsym(RADecode): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
96 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
97 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
98 raEncode = dlsym(handle, "RAEncode"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
99 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
100 fprintf (stderr, "dlsym(RAEncode): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
101 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
102 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
103 raFlush = dlsym(handle, "RAFlush"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
104 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
105 fprintf (stderr, "dlsym(RAFlush): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
106 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
107 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
108 raFreeDecoder = dlsym(handle, "RAFreeDecoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
109 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
110 fprintf (stderr, "dlsym(RAFreeDecoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
111 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
112 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
113 raFreeEncoder = dlsym(handle, "RAFreeEncoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
114 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
115 fprintf (stderr, "dlsym(RAFreeEncoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
116 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
117 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
118 raGetFlavorProperty = dlsym(handle, "RAGetFlavorProperty"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
119 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
120 fprintf (stderr, "dlsym(RAGetFlavorProperty): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
121 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
122 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
123 raGetNumberOfFlavors = dlsym(handle, "RAGetNumberOfFlavors"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
124 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
125 fprintf (stderr, "dlsym(RAGetNumberOfFlavors): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
126 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
127 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
128 // raGetNumberOfFlavors2 = dlsym(handle, "RAGetNumberOfFlavors2"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
129 // if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
130 // fprintf (stderr, "dlsym(RAGetNumberOfFlavors2): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
131 // exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
132 // } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
133 raInitDecoder = dlsym(handle, "RAInitDecoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
134 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
135 fprintf (stderr, "dlsym(RAInitDecoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
136 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
137 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
138 raInitEncoder = dlsym(handle, "RAInitEncoder"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
139 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
140 fprintf (stderr, "dlsym(RAInitEncoder): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
141 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
142 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
143 raOpenCodec = dlsym(handle, "RAOpenCodec"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
144 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
145 fprintf (stderr, "dlsym(RAOpenCodec): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
146 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
147 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
148 raOpenCodec2 = dlsym(handle, "RAOpenCodec2"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
149 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
150 fprintf (stderr, "dlsym(RAOpenCodec2): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
151 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
152 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
153 raSetFlavor = dlsym(handle, "RASetFlavor"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
154 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
155 fprintf (stderr, "dlsym(RASetFlavor): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
156 exit(1); |
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 raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
159 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
160 fprintf (stderr, "dlsym(SetDLLAccessPath): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
161 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
162 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
163 raSetPwd = dlsym(handle, "RASetPwd"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
164 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
165 fprintf (stderr, "dlsym(RASetPwd): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
166 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
167 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
168 b_dlOpened=1; |
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 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
171 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
172 void closeDll(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
173 if (handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
174 b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
175 dlclose(handle); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
176 handle=NULL; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
177 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
178 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
179 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
180 void _init(void) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
181 loadSyms(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
182 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
183 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
184 struct timeval tv1, tv2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
185 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
186 void tic(void) { |
35904
cef5275fc11f
Avoid usage of obsolete and BSD-specific "struct timezone".
diego
parents:
30633
diff
changeset
|
187 gettimeofday(&tv1, NULL); |
7110
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 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
190 void toc(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
191 long secs, usecs; |
35904
cef5275fc11f
Avoid usage of obsolete and BSD-specific "struct timezone".
diego
parents:
30633
diff
changeset
|
192 gettimeofday(&tv2, NULL); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
193 secs=tv2.tv_sec-tv1.tv_sec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
194 usecs=tv2.tv_usec-tv1.tv_usec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
195 if (usecs<0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
196 usecs+=1000000; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
197 --secs; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
198 } |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
199 fprintf(stderr, "Duration: %ld.%0.6lds\n", secs, usecs); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
200 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
201 |
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 void hexdump(void *pos, int len) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
204 unsigned char *cpos=pos, *cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
205 int lines=(len+15)>>4; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
206 while(lines--) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
207 int len1=len, i; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
208 fprintf(stderr, "%0x ", cpos); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
209 cpos1=cpos; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
210 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
211 if (len1>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
212 fprintf(stderr, "%02x ", *(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
213 } else { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
214 fprintf(stderr, " "); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
215 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
216 len1--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
217 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
218 fputs(" ", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
219 cpos=cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
220 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
221 if (len>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
222 unsigned char ch=(*(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
223 if ((ch<32)||(ch>127)) ch='.'; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
224 fputc(ch, stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
225 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
226 len--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
227 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
228 fputs("\n", stderr); |
7110
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 fputc('\n', stderr); |
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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
233 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
234 ulong RACloseCodec(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
235 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
236 fprintf(stderr, "RACloseCodec(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
237 result=(*raCloseCodec)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
238 // closeDll(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
239 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
240 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
241 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
242 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
243 static int pkno=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
244 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
245 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
|
246 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
247 int x,y; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
248 |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
249 fprintf(stderr, "RADecode(ulong ctx=0x%0lx, ", p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
250 fprintf(stderr, "ulong src=0x%0lx,\n", p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
251 fprintf(stderr, "ulong len=0x%0lx,", p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
252 fprintf(stderr, "ulong dst=0x%0lx,\n", p4); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
253 fprintf(stderr, "ulong dstcnt=0x%0x, ",p5); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
254 fprintf(stderr, "ulong p6=%ld)\n", p6); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
255 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
256 // hexdump((void*)p2, p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
257 // hexdump((void*)p4, 80); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
258 // hexdump((void*)p5, 16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
259 // tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
260 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
261 #if 0 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
262 hexdump(p2, 0x128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
263 #else |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
264 fprintf(stderr,"\n#CRC[%3d]",pkno++); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
265 for(y=0;y<(0x128*2);y+=37){ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
266 unsigned short crc=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
267 unsigned char* p=p2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
268 // p+=y; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
269 for(x=0;x<37;x++){ |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
270 int i=y+x; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
271 int ib=p[(i>>1)]; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
272 if(i&1) ib>>=4; else ib&=15; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
273 crc+=ib<<(x&7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
274 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
275 fprintf(stderr," %04X",crc); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
276 // fprintf(stderr," %02X",p[0]); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
277 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
278 fprintf(stderr,"\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
279 #endif |
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 { FILE *f=fopen("sipr.dump","a"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
282 fwrite(p2,p3,1,f); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
283 fclose(f); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
284 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
285 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
286 result=(*raDecode)(p1,p2,p3,p4,p5,p6); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
287 // toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
288 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
289 // hexdump((void*)p4, 80); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
290 // hexdump((void*)p5, 16); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
291 fprintf(stderr, "--> 0x%0lx(%ld) decoded: %ld \n\n\n", result, result, p5[0]); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
292 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
293 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
294 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
295 ulong RAEncode(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
296 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
297 fprintf(stderr, "RAEncode(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
298 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
299 fprintf(stderr, "ulong p3=0x%0lx(%ld))\n", p3, p3); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
300 result=(*raEncode)(p1,p2,p3); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
301 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
302 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
303 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
304 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
305 ulong RAFlush(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
306 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
307 fprintf(stderr, "RAFlush(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
308 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
309 fprintf(stderr, "ulong p3=0x%0lx(%ld))\n", p3, p3); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
310 result=(*raFlush)(p1,p2,p3); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
311 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
312 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
313 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
314 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
315 ulong RAFreeDecoder(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
316 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
317 fprintf(stderr, "RAFreeDecoder(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
318 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
319 result=(*raFreeDecoder)(p1); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
320 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
321 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
322 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
323 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
324 ulong RAFreeEncoder(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
325 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
326 fprintf(stderr, "RAFreeEncoder(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
327 result=(*raFreeEncoder)(p1); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
328 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
329 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
330 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
331 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
332 ulong RAGetFlavorProperty(ulong p1,ulong p2,ulong p3, ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
333 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
334 fprintf(stderr, "RAGetFlavorProperty(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
335 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
336 fprintf(stderr, "ulong p3=0x%0lx(%ld), ", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
337 fprintf(stderr, "ulong p4=0x%0lx(%ld))\n", p4, p4); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
338 hexdump((void*)p4/*(void*)(*((void**)p4))*/,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
339 hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
340 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
341 result=(*raGetFlavorProperty)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
342 toc(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
343 fprintf(stderr, "*p4=0x%0lx\n", *((ulong*)p4)); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
344 hexdump((void*)p4/*(void*)(*((void**)p4))*/,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
345 hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
346 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
347 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
348 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
349 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
350 ulong RAGetNumberOfFlavors(void) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
351 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
352 fprintf(stderr, "RAGetNumberOfFlavors(void)\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
353 result=(*raGetNumberOfFlavors)(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
354 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
355 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
356 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
357 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
358 ulong RAInitDecoder(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
359 ulong result; |
24216 | 360 // int temp[256]; |
361 // unsigned char temp2[256]; | |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
362 fprintf(stderr, "RAInitDecoder(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
363 fprintf(stderr, "ulong p2=0x%0lx(%ld))\n", p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
364 hexdump((void*)p2, 4*7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
365 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
366 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
367 #if 1 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
368 result=(*raInitDecoder)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
369 #else |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
370 memset(temp,0x77,256*4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
371 memcpy(temp,p2,4*7); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
372 hexdump((void*)temp[6], 32); |
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 memset(temp2,0x77,256); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
375 memcpy(temp2,temp[6],16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
376 temp[6]=temp2; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
377 |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
378 result=(*raInitDecoder)(p1,temp); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
379 hexdump((void*)temp[6], 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
380 #endif |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
381 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
382 // memcpy(p2,temp,4*11); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
383 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
384 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
385 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
386 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
387 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
388 ulong RAInitEncoder(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
389 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
390 fprintf(stderr, "RAInitEncoder(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
391 fprintf(stderr, "ulong p2=0x%0lx(%ld))\n", p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
392 result=(*raInitEncoder)(p1,p2); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
393 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
394 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
395 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
396 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
397 ulong RAOpenCodec(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
398 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
399 // loadSyms(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
400 fprintf(stderr, "RAOpenCodec(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
401 result=(*raOpenCodec)(p1); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
402 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
403 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
404 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
405 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
406 ulong RAOpenCodec2(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
407 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
408 // loadSyms(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
409 fprintf(stderr, "RAOpenCodec2(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
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 result=(*raOpenCodec2)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
412 hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
413 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
414 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
415 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
416 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
417 ulong RASetFlavor(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
418 ulong result, numprop=0, result1=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
419 ulong numflavors, flavor; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
420 unsigned short property; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
421 fprintf(stderr, "RASetFlavor(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
422 fprintf(stderr, "ulong p2=0x%0lx(%ld))\n", p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
423 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
424 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
425 result=(*raSetFlavor)(p1,p2,p3); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
426 fprintf(stderr, "--> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
427 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
428 fputs("######################## FLAVOR PROPERTIES ###################\n\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
429 numflavors=3;//raGetNumberOfFlavors(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
430 flavor=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
431 while (flavor<numflavors) { |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
432 fprintf(stderr, "************ Flavor %ld *************\n\n", flavor); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
433 numprop=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
434 while (numprop<32) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
435 result1=raGetFlavorProperty(p1, flavor, numprop, (ulong)&property); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
436 fprintf(stderr, "property %ld=%d, result=0x%0lx\n\n", |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
437 numprop, property, result1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
438 hexdump((void*)result1, property); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
439 numprop++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
440 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
441 flavor++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
442 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
443 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
444 fputs("######################## FLAVOR PROPERTIES ###################\n\n", stderr); |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
445 |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
446 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
447 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
448 |
7774 | 449 void SetDLLAccessPath(ulong p1,ulong p2) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
450 // loadSyms(); |
7774 | 451 char* ize=p1; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
452 fprintf(stderr, "SetDLLAccessPath(ulong p1=0x%0lx(%ld) p2=%p)\n", p1, p1,p2); |
7774 | 453 while(*ize){ |
454 fprintf(stderr,"%s\n",ize); | |
455 ize+=strlen(ize)+1; | |
456 } | |
457 //hexdump((void*)p1, 244); | |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
458 (*raSetDLLAccessPath)(p1); |
7774 | 459 // hexdump((void*)p1, 44); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
460 fprintf(stderr, "--> void\n\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
461 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
462 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
463 static char pwdtemp[1000]; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
464 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
465 void RASetPwd(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
466 // loadSyms(); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24216
diff
changeset
|
467 fprintf(stderr, "RASetPwd(ulong p1=0x%0lx(%ld),ulong p2=0x%0lx(%ld))\n", p1, p1, p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
468 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
469 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
470 memset(pwdtemp,0x77,1000); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
471 hexdump((void*)pwdtemp, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
472 (*raSetPwd)(pwdtemp,"Ardubancel Quazanga"); // set password... lol. |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
473 hexdump((void*)pwdtemp, 1000); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
474 strcpy(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
475 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
476 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
477 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
478 fprintf(stderr, "--> void\n\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
479 } |