Mercurial > mplayer.hg
annotate TOOLS/realcodecs/rv30.c @ 36305:d8a13d907c61
Enable switch_ratio -1 with videos with aspect changes.
The original aspect ratio may change during playback,
so sh->original_aspect must be set accordingly.
This is missing in r36391.
author | ib |
---|---|
date | Sun, 04 Aug 2013 20:19:58 +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 realrv30.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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
26 #include <stddef.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
27 #include <stdio.h> |
24208
3b80b74b6813
Fix "incompatible implicit declaration of built-in function 'exit'" warnings.
diego
parents:
9556
diff
changeset
|
28 #include <stdlib.h> |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
29 #include <dlfcn.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
30 #include <sys/time.h> |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
31 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
32 typedef unsigned long ulong; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
33 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
34 ulong (*pncOpen)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
35 ulong (*pncClose)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
36 ulong (*pncGetUIName)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
37 ulong (*pncGetVersion)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
38 ulong (*pncQueryMediaFormat)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
39 ulong (*pncPreferredMediaFormat)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
40 ulong (*pncGetMediaFormats)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
41 ulong (*pncStreamOpen)(ulong,ulong,ulong); |
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 ulong (*pnsOpenSettingsBox)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
44 ulong (*pnsGetIPNUnknown)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
45 ulong (*pnsSetDataCallback)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
46 ulong (*pnsSetProperty)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
47 ulong (*pnsGetProperty)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
48 ulong (*pnsClose)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
49 ulong (*pnsGetStreamHeaderSize)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
50 ulong (*pnsGetStreamHeader)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
51 ulong (*pnsInput)(ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
52 ulong (*pnsSetOutputPacketSize)(ulong,ulong,ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
53 ulong (*pnsGetInputBufferSize)(ulong,ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
54 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
55 void (*setDLLAccessPath)(ulong); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
56 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
57 int b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
58 void *handle=NULL; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
59 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
60 /* exits program when failure */ |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
61 void loadSyms(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
62 fputs("loadSyms()\n", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
63 if (!b_dlOpened) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
64 char *error; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
65 |
9556 | 66 fputs("opening dll...\n", stderr); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
67 handle = dlopen ("/usr/local/RealPlayer8/Codecs/realrv30.so.6.0", RTLD_LAZY); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
68 if (!handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
69 fputs (dlerror(), stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
70 exit(1); |
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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
73 pncOpen = dlsym(handle, "PNCodec_Open"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
74 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
75 fprintf (stderr, "dlsym(pncOpen): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
76 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
77 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
78 pncClose = dlsym(handle, "PNCodec_Close"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
79 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
80 fprintf (stderr, "dlsym(pncClose): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
81 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
82 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
83 pncGetUIName = dlsym(handle, "PNCodec_GetUIName"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
84 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
85 fprintf (stderr, "dlsym(pncGetUIName): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
86 exit(1); |
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 pncGetVersion = dlsym(handle, "PNCodec_GetVersion"); |
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(pncGetVersion): %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 pncQueryMediaFormat = dlsym(handle, "PNCodec_QueryMediaFormat"); |
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(pncQueryMediaFormat): %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 pncPreferredMediaFormat = dlsym(handle, "PNCodec_PreferredMediaFormat"); |
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(pncPreferredMediaFormat): %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 pncGetMediaFormats = dlsym(handle, "PNCodec_GetMediaFormats"); |
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(pncGetMediaFormats): %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 pncStreamOpen = dlsym(handle, "PNCodec_StreamOpen"); |
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(pncStreamOpen): %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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
114 pnsOpenSettingsBox = dlsym(handle, "PNStream_OpenSettingsBox"); |
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(pnsOpenSettingsBox): %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 pnsGetIPNUnknown = dlsym(handle, "PNStream_GetIPNUnknown"); |
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(pnsGetIPNUnknown): %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 pnsSetDataCallback = dlsym(handle, "PNStream_SetDataCallback"); |
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(pnsSetDataCallback): %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 pnsSetProperty = dlsym(handle, "PNStream_SetProperty"); |
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(pnsSetProperty): %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 pnsGetProperty = dlsym(handle, "PNStream_GetProperty"); |
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(pnsGetProperty): %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 pnsClose = dlsym(handle, "PNStream_Close"); |
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(pnsClose): %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 pnsGetStreamHeaderSize = dlsym(handle, "PNStream_GetStreamHeaderSize"); |
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(pnsGetStreamHeaderSize): %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 pnsGetStreamHeader = dlsym(handle, "PNStream_GetStreamHeader"); |
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(pnsGetStreamHeader): %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 pnsInput = dlsym(handle, "PNStream_Input"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
155 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
156 fprintf (stderr, "dlsym(pnsInput): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
157 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
158 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
159 pnsSetOutputPacketSize = dlsym(handle, "PNStream_SetOutputPacketSize"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
160 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
161 fprintf (stderr, "dlsym(pnsSetOutputPacketSize): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
162 exit(1); |
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 pnsGetInputBufferSize = dlsym(handle, "PNStream_GetInputBufferSize"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
165 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
166 fprintf (stderr, "dlsym(pnsGetInputBufferSize): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
167 exit(1); |
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 setDLLAccessPath = dlsym(handle, "SetDLLAccessPath"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
170 if ((error = dlerror()) != NULL) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
171 fprintf (stderr, "dlsym(SetDLLAccessPath): %s\n", error); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
172 exit(1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
173 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
174 b_dlOpened=1; |
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 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
178 void closeDll(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
179 if (handle) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
180 b_dlOpened=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
181 dlclose(handle); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
182 handle=NULL; |
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 } |
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 void _init(void) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
187 loadSyms(); |
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 struct timeval tv1, tv2; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
191 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
192 void tic(void) { |
35904
cef5275fc11f
Avoid usage of obsolete and BSD-specific "struct timezone".
diego
parents:
30633
diff
changeset
|
193 gettimeofday(&tv1, NULL); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
194 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
195 |
28232
8df85ad26746
Add missing 'void' keyword to parameterless function declarations.
diego
parents:
28195
diff
changeset
|
196 void toc(void) { |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
197 long secs, usecs; |
35904
cef5275fc11f
Avoid usage of obsolete and BSD-specific "struct timezone".
diego
parents:
30633
diff
changeset
|
198 gettimeofday(&tv2, NULL); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
199 secs=tv2.tv_sec-tv1.tv_sec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
200 usecs=tv2.tv_usec-tv1.tv_usec; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
201 if (usecs<0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
202 usecs+=1000000; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
203 --secs; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
204 } |
26449
105de0884218
Remove pointless '0' flag from fprintf call, fixes the warning:
diego
parents:
25313
diff
changeset
|
205 fprintf(stderr, "Duration: %ld.%.6lds\n", secs, usecs); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
206 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
207 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
208 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
209 void hexdump(void *pos, int len) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
210 unsigned char *cpos=pos, *cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
211 int lines=(len+15)>>4; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
212 while(lines--) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
213 int len1=len, i; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
214 fprintf(stderr, "%0x ", cpos); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
215 cpos1=cpos; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
216 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
217 if (len1>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
218 fprintf(stderr, "%02x ", *(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
219 } else { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
220 fprintf(stderr, " "); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
221 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
222 len1--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
223 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
224 fputs(" ", stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
225 cpos=cpos1; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
226 for (i=0;i<16;i++) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
227 if (len>0) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
228 unsigned char ch=(*(cpos++)); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
229 if ((ch<32)||(ch>127)) ch='.'; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
230 fputc(ch, 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 len--; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
233 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28232
diff
changeset
|
234 fputs("\n", stderr); |
7110
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 fputc('\n', stderr); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
237 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
238 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
239 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
240 ulong PNCodec_Open(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
241 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
242 fprintf(stderr, "PNCodec_Open(ulong fourcc=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
243 fprintf(stderr, "PNCMain **pncMain=0x%0lx(%ld))\n", p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
244 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
245 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
246 result=(*pncOpen)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
247 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
248 hexdump((void*)p2, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
249 // hexdump(*((void**)p2), 0x1278); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
250 fprintf(stderr, "PNCodec_Open --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
251 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
252 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
253 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
254 ulong PNCodec_Close(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
255 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
256 fprintf(stderr, "PNCodec_Close(PNCMain *pncMain=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
257 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
258 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
259 result=(*pncClose)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
260 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
261 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
262 fprintf(stderr, "PNCodec_Close --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
263 return result; |
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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
266 ulong PNCodec_GetUIName(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
267 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
268 fprintf(stderr, "PNCodec_GetUIName(PNCMain *pncMain=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
269 fprintf(stderr, "char **appname=0x%0lx(%ld))\n", p2, p2); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
270 // hexdump((void*)p1, 0x1278); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
271 // hexdump((void*)p2, 128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
272 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
273 result=(*pncGetUIName)(p1,p2); |
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, 0x1278); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
276 // hexdump((void*)p2, 128); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
277 fprintf(stderr, "PNCodec_GetUIName --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
278 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
279 } |
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 ulong PNCodec_GetVersion(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
282 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
283 fprintf(stderr, "PNCodec_GetVersion(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
284 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
|
285 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
286 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
287 result=(*pncGetVersion)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
288 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
289 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
290 fprintf(stderr, "PNCodec_GetVersion --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
291 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
292 } |
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 ulong PNCodec_QueryMediaFormat(ulong p1,ulong p2,ulong p3,ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
295 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
296 fprintf(stderr, "PNCodec_QueryMediaFormat(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
297 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
298 fprintf(stderr, "ulong p3=0x%0lx(%ld),", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
299 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
|
300 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
301 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
302 result=(*pncQueryMediaFormat)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
303 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
304 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
305 fprintf(stderr, "PNCodec_QueryMediaFormat --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
306 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
307 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
308 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
309 ulong PNCodec_PreferredMediaFormat(ulong p1,ulong p2,ulong p3,ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
310 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
311 fprintf(stderr, "PNCodec_PreferredMediaFormat(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
312 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
313 fprintf(stderr, "ulong p3=0x%0lx(%ld),", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
314 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
|
315 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
316 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
317 result=(*pncPreferredMediaFormat)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
318 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
319 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
320 fprintf(stderr, "PNCodec_PreferredMediaFormat --> 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 PNCodec_GetMediaFormats(ulong p1,ulong p2,ulong p3,ulong p4) { |
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:
24208
diff
changeset
|
326 fprintf(stderr, "PNCodec_GetMediaFormats(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
327 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
328 fprintf(stderr, "ulong p3=0x%0lx(%ld),", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
329 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
|
330 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
331 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
332 result=(*pncGetMediaFormats)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
333 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
334 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
335 fprintf(stderr, "PNCodec_GetMediaFormats --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
336 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
337 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
338 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
339 ulong PNCodec_StreamOpen(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
340 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
341 fprintf(stderr, "PNCodec_StreamOpen(PNCMain *pncMain=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
342 fprintf(stderr, "PNSMain **pnsMain=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
343 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
|
344 // hexdump((void*)p1, 0x1278); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
345 // hexdump((void*)p2, 128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
346 // hexdump((void*)p3, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
347 hexdump(*((void**)p3), 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
348 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
349 result=(*pncStreamOpen)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
350 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
351 // hexdump((void*)p1, 0x1278); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
352 hexdump((void*)p2, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
353 // hexdump((void*)p3, 128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
354 hexdump(*((void**)p2), 128); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
355 hexdump(**((void***)p2), 128); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
356 fprintf(stderr, "PNCodec_StreamOpen --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
357 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
358 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
359 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
360 ulong PNStream_OpenSettingsBox(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
361 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
362 fprintf(stderr, "PNStream_OpenSettingsBox(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
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*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
365 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
366 result=(*pnsOpenSettingsBox)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
367 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
368 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
369 fprintf(stderr, "PNStream_OpenSettingsBox --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
370 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
371 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
372 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
373 ulong PNStream_GetIPNUnknown(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
374 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
375 fprintf(stderr, "PNStream_GetIPNUnknown(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
376 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
377 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
378 result=(*pnsGetIPNUnknown)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
379 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
380 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
381 fprintf(stderr, "PNStream_GetIPNUnknown --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
382 return result; |
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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
385 ulong PNStream_SetDataCallback(ulong p1,ulong p2,ulong p3,ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
386 ulong result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
387 int i=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
388 void **pp; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
389 fprintf(stderr, "PNStream_SetDataCallback(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
390 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
391 fprintf(stderr, "ulong p3=0x%0lx(%ld),", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
392 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
|
393 hexdump((void*)p1, 0x24); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
394 hexdump((void*)p2, 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
395 hexdump((void*)p3, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
396 hexdump((void*)p4, 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
397 fprintf(stderr, "content of the callback functions:\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
398 while(i<8) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
399 hexdump(*((void**)p2+i), (i==0)?32*4:16); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
400 i++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
401 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
402 i=0; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
403 pp=(*(void***)p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
404 fprintf(stderr, "content of the callback functions (first entry):\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
405 while(i<15) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
406 hexdump(*((void**)pp+i), 32); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
407 i++; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
408 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
409 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
410 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
411 result=(*pnsSetDataCallback)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
412 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
413 hexdump((void*)p1, 0x24); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
414 // hexdump((void*)p2, 256); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
415 // hexdump((void*)p3, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
416 hexdump(*((void**)p3), 256); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
417 fprintf(stderr, "PNStream_SetDataCallback --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
418 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
419 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
420 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
421 ulong PNStream_SetProperty(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
422 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
423 fprintf(stderr, "PNStream_SetProperty(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
424 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
425 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
|
426 hexdump((void*)p3, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
427 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
428 result=(*pnsSetProperty)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
429 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
430 // hexdump((void*)p3, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
431 fprintf(stderr, "PNStream_SetProperty --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
432 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
433 } |
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 ulong PNStream_GetProperty(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
436 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
437 fprintf(stderr, "PNStream_GetProperty(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
438 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
439 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
|
440 // hexdump((void*)p3, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
441 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
442 result=(*pnsGetProperty)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
443 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
444 hexdump((void*)p3, 4); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
445 fprintf(stderr, "PNStream_GetProperty --> 0x%0lx(%ld)\n\n\n", result, result); |
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 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
449 ulong PNStream_Close(ulong p1) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
450 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
451 fprintf(stderr, "PNStream_Close(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
452 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
453 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
454 result=(*pnsClose)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
455 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
456 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
457 fprintf(stderr, "PNStream_Close --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
458 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
459 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
460 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
461 ulong streamHeaderSize=0; |
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 ulong PNStream_GetStreamHeaderSize(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
464 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
465 fprintf(stderr, "PNStream_GetStreamHeaderSize(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
466 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
|
467 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
468 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
469 result=(*pnsGetStreamHeaderSize)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
470 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
471 hexdump((void*)p2, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
472 streamHeaderSize=*((ulong *)p2); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
473 fprintf(stderr, "PNStream_GetStreamHeaderSize --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
474 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
475 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
476 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
477 ulong PNStream_GetStreamHeader(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
478 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
479 fprintf(stderr, "PNStream_GetStreamHeader(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
480 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
|
481 // hexdump((void*)p2, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
482 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
483 result=(*pnsGetStreamHeader)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
484 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
485 hexdump((void*)p2, streamHeaderSize); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
486 fprintf(stderr, "PNStream_GetStreamHeader --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
487 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
488 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
489 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
490 ulong PNStream_Input(ulong p1,ulong p2,ulong p3) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
491 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
492 fprintf(stderr, "PNStream_Input(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
493 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
494 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
|
495 hexdump((void*)p3, 4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
496 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
497 result=(*pnsInput)(p1,p2,p3); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
498 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
499 // hexdump((void*)p3, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
500 fprintf(stderr, "PNStream_Input --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
501 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
502 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
503 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
504 ulong PNStream_SetOutputPacketSize(ulong p1,ulong p2,ulong p3,ulong p4) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
505 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
506 fprintf(stderr, "PNStream_SetOutputPacketSize(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
507 fprintf(stderr, "ulong p2=0x%0lx(%ld),\n\t", p2, p2); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
508 fprintf(stderr, "ulong p3=0x%0lx(%ld),", p3, p3); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
509 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
|
510 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
511 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
512 result=(*pnsSetOutputPacketSize)(p1,p2,p3,p4); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
513 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
514 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
515 fprintf(stderr, "PNStream_SetOutputPacketSize --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
516 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
517 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
518 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
519 ulong PNStream_GetInputBufferSize(ulong p1,ulong p2) { |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
520 ulong result; |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
521 fprintf(stderr, "PNStream_GetInputBufferSize(ulong p1=0x%0lx(%ld), ", p1, p1); |
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
522 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
|
523 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
524 tic(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
525 result=(*pnsGetInputBufferSize)(p1,p2); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
526 toc(); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
527 // hexdump((void*)p1, 44); |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
528 fprintf(stderr, "PNStream_GetInputBufferSize --> 0x%0lx(%ld)\n\n\n", result, result); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
529 return result; |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
530 } |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
531 |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
532 void SetDLLAccessPath(ulong p1) { |
25313
9e13376e0daa
Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents:
24208
diff
changeset
|
533 fprintf(stderr, "SetDLLAccessPath(ulong p1=0x%0lx(%ld))\n", p1, p1); |
7110
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
534 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
535 (*setDLLAccessPath)(p1); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
536 // hexdump((void*)p1, 44); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
537 fprintf(stderr, "--> void\n\n\n"); |
86c478bea7ce
realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff
changeset
|
538 } |