annotate TOOLS/realcodecs/rv30.c @ 25509:1cfa39a320cc

Fix update_subtitles() checking subtitle type for the wrong track. update_subtitles() uses 'type' field from d_dvdsub even when some other track is active. For this reason, external vobsub is not displayed when there is at least one text track from demuxer (type is always 't' or 'a' in this case). The solution is to check vobsub_id and dvdsub_id instead.
author eugeni
date Fri, 28 Dec 2007 20:57:38 +0000
parents 9e13376e0daa
children 105de0884218
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7110
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
1 /*
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
2 GPL v2 blah blah
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
3
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
4 This is a small dll that works as a wrapper for the actual cook.so.6.0
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
5 dll from real player 8.0.
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
6 */
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
7
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
8 /*
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
9 Assuming that RACloseCodec is the last call.
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
10 */
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
11
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
12 #include <stddef.h>
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
13 #include <stdio.h>
24208
3b80b74b6813 Fix "incompatible implicit declaration of built-in function 'exit'" warnings.
diego
parents: 9556
diff changeset
14 #include <stdlib.h>
7110
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
15 #include <dlfcn.h>
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
16 #include <sys/time.h>
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
17
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
18 typedef unsigned long ulong;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
19
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
20 ulong (*pncOpen)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
21 ulong (*pncClose)(ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
22 ulong (*pncGetUIName)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
23 ulong (*pncGetVersion)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
24 ulong (*pncQueryMediaFormat)(ulong,ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
25 ulong (*pncPreferredMediaFormat)(ulong,ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
26 ulong (*pncGetMediaFormats)(ulong,ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
27 ulong (*pncStreamOpen)(ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
28
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
29 ulong (*pnsOpenSettingsBox)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
30 ulong (*pnsGetIPNUnknown)(ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
31 ulong (*pnsSetDataCallback)(ulong,ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
32 ulong (*pnsSetProperty)(ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
33 ulong (*pnsGetProperty)(ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
34 ulong (*pnsClose)(ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
35 ulong (*pnsGetStreamHeaderSize)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
36 ulong (*pnsGetStreamHeader)(ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
37 ulong (*pnsInput)(ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
38 ulong (*pnsSetOutputPacketSize)(ulong,ulong,ulong,ulong);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
39 ulong (*pnsGetInputBufferSize)(ulong,ulong);
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 void (*setDLLAccessPath)(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 int b_dlOpened=0;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
44 void *handle=NULL;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
45
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
46 /* exits program when failure */
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
47 void loadSyms() {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
48 fputs("loadSyms()\n", stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
49 if (!b_dlOpened) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
50 char *error;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
51
9556
42376fcd704b 100l :)
arpi
parents: 7110
diff changeset
52 fputs("opening dll...\n", stderr);
7110
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
53 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
54 if (!handle) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
55 fputs (dlerror(), stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
56 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
57 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
58
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
59 pncOpen = dlsym(handle, "PNCodec_Open");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
60 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
61 fprintf (stderr, "dlsym(pncOpen): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
62 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
63 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
64 pncClose = dlsym(handle, "PNCodec_Close");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
65 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
66 fprintf (stderr, "dlsym(pncClose): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
67 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
68 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
69 pncGetUIName = dlsym(handle, "PNCodec_GetUIName");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
70 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
71 fprintf (stderr, "dlsym(pncGetUIName): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
72 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
73 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
74 pncGetVersion = dlsym(handle, "PNCodec_GetVersion");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
75 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
76 fprintf (stderr, "dlsym(pncGetVersion): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
77 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
78 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
79 pncQueryMediaFormat = dlsym(handle, "PNCodec_QueryMediaFormat");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
80 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
81 fprintf (stderr, "dlsym(pncQueryMediaFormat): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
82 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
83 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
84 pncPreferredMediaFormat = dlsym(handle, "PNCodec_PreferredMediaFormat");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
85 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
86 fprintf (stderr, "dlsym(pncPreferredMediaFormat): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
87 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
88 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
89 pncGetMediaFormats = dlsym(handle, "PNCodec_GetMediaFormats");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
90 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
91 fprintf (stderr, "dlsym(pncGetMediaFormats): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
92 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
93 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
94 pncStreamOpen = dlsym(handle, "PNCodec_StreamOpen");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
95 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
96 fprintf (stderr, "dlsym(pncStreamOpen): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
97 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
98 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
99
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
100 pnsOpenSettingsBox = dlsym(handle, "PNStream_OpenSettingsBox");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
101 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
102 fprintf (stderr, "dlsym(pnsOpenSettingsBox): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
103 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
104 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
105 pnsGetIPNUnknown = dlsym(handle, "PNStream_GetIPNUnknown");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
106 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
107 fprintf (stderr, "dlsym(pnsGetIPNUnknown): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
108 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
109 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
110 pnsSetDataCallback = dlsym(handle, "PNStream_SetDataCallback");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
111 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
112 fprintf (stderr, "dlsym(pnsSetDataCallback): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
113 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
114 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
115 pnsSetProperty = dlsym(handle, "PNStream_SetProperty");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
116 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
117 fprintf (stderr, "dlsym(pnsSetProperty): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
118 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
119 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
120 pnsGetProperty = dlsym(handle, "PNStream_GetProperty");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
121 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
122 fprintf (stderr, "dlsym(pnsGetProperty): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
123 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
124 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
125 pnsClose = dlsym(handle, "PNStream_Close");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
126 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
127 fprintf (stderr, "dlsym(pnsClose): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
128 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
129 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
130 pnsGetStreamHeaderSize = dlsym(handle, "PNStream_GetStreamHeaderSize");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
131 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
132 fprintf (stderr, "dlsym(pnsGetStreamHeaderSize): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
133 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
134 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
135 pnsGetStreamHeader = dlsym(handle, "PNStream_GetStreamHeader");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
136 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
137 fprintf (stderr, "dlsym(pnsGetStreamHeader): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
138 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
139 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
140 pnsInput = dlsym(handle, "PNStream_Input");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
141 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
142 fprintf (stderr, "dlsym(pnsInput): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
143 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
144 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
145 pnsSetOutputPacketSize = dlsym(handle, "PNStream_SetOutputPacketSize");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
146 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
147 fprintf (stderr, "dlsym(pnsSetOutputPacketSize): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
148 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
149 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
150 pnsGetInputBufferSize = dlsym(handle, "PNStream_GetInputBufferSize");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
151 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
152 fprintf (stderr, "dlsym(pnsGetInputBufferSize): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
153 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
154 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
155 setDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
156 if ((error = dlerror()) != NULL) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
157 fprintf (stderr, "dlsym(SetDLLAccessPath): %s\n", error);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
158 exit(1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
159 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
160 b_dlOpened=1;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
161 }
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
164 void closeDll() {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
165 if (handle) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
166 b_dlOpened=0;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
167 dlclose(handle);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
168 handle=NULL;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
172 void _init(void) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
173 loadSyms();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
174 }
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 struct timezone tz;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
177 struct timeval tv1, tv2;
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 void tic() {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
180 gettimeofday(&tv1, &tz);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
181 }
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 void toc() {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
184 long secs, usecs;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
185 gettimeofday(&tv2, &tz);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
186 secs=tv2.tv_sec-tv1.tv_sec;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
187 usecs=tv2.tv_usec-tv1.tv_usec;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
188 if (usecs<0) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
189 usecs+=1000000;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
190 --secs;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
191 }
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
192 fprintf(stderr, "Duration: %ld.%0.6lds\n", secs, usecs);
7110
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
193 }
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
196 void hexdump(void *pos, int len) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
197 unsigned char *cpos=pos, *cpos1;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
198 int lines=(len+15)>>4;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
199 while(lines--) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
200 int len1=len, i;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
201 fprintf(stderr, "%0x ", cpos);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
202 cpos1=cpos;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
203 for (i=0;i<16;i++) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
204 if (len1>0) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
205 fprintf(stderr, "%02x ", *(cpos++));
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
206 } else {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
207 fprintf(stderr, " ");
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 len1--;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
210 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
211 fputs(" ", stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
212 cpos=cpos1;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
213 for (i=0;i<16;i++) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
214 if (len>0) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
215 unsigned char ch=(*(cpos++));
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
216 if ((ch<32)||(ch>127)) ch='.';
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
217 fputc(ch, stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
218 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
219 len--;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
220 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
221 fputs("\n", stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
222 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
223 fputc('\n', stderr);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
224 }
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
227 ulong PNCodec_Open(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
228 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
229 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
230 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
231 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
232 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
233 result=(*pncOpen)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
234 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
235 hexdump((void*)p2, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
236 // hexdump(*((void**)p2), 0x1278);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
237 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
238 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
241 ulong PNCodec_Close(ulong p1) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
242 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
243 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
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=(*pncClose)(p1);
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*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
249 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
250 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
251 }
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 ulong PNCodec_GetUIName(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
254 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
255 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
256 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
257 // hexdump((void*)p1, 0x1278);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
258 // hexdump((void*)p2, 128);
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 result=(*pncGetUIName)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
261 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
262 // hexdump((void*)p1, 0x1278);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
263 // hexdump((void*)p2, 128);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
264 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
265 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
266 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
267
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
268 ulong PNCodec_GetVersion(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
269 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
270 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
271 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
272 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
273 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
274 result=(*pncGetVersion)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
275 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
276 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
277 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
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_QueryMediaFormat(ulong p1,ulong p2,ulong p3,ulong p4) {
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_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
284 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
285 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
286 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
287 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
288 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
289 result=(*pncQueryMediaFormat)(p1,p2,p3,p4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
290 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
291 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
292 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
293 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
296 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
297 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
298 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
299 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
300 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
301 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
302 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
303 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
304 result=(*pncPreferredMediaFormat)(p1,p2,p3,p4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
305 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
306 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
307 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
308 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
309 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
310
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
311 ulong PNCodec_GetMediaFormats(ulong p1,ulong p2,ulong p3,ulong p4) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
312 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
313 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
314 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
315 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
316 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
317 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
318 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
319 result=(*pncGetMediaFormats)(p1,p2,p3,p4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
320 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
321 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
322 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
323 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
324 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
325
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
326 ulong PNCodec_StreamOpen(ulong p1,ulong p2,ulong p3) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
327 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
328 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
329 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
330 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
331 // hexdump((void*)p1, 0x1278);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
332 // hexdump((void*)p2, 128);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
333 // hexdump((void*)p3, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
334 hexdump(*((void**)p3), 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
335 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
336 result=(*pncStreamOpen)(p1,p2,p3);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
337 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
338 // hexdump((void*)p1, 0x1278);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
339 hexdump((void*)p2, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
340 // hexdump((void*)p3, 128);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
341 hexdump(*((void**)p2), 128);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
342 hexdump(**((void***)p2), 128);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
343 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
344 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
345 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
346
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
347 ulong PNStream_OpenSettingsBox(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
348 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
349 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
350 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
351 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
352 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
353 result=(*pnsOpenSettingsBox)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
354 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
355 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
356 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
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_GetIPNUnknown(ulong p1) {
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_GetIPNUnknown(ulong p1=0x%0lx(%ld))\n", p1, p1);
7110
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
363 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
364 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
365 result=(*pnsGetIPNUnknown)(p1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
366 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
367 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
368 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
369 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
370 }
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 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
373 ulong result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
374 int i=0;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
375 void **pp;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
376 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
377 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
378 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
379 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
380 hexdump((void*)p1, 0x24);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
381 hexdump((void*)p2, 32);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
382 hexdump((void*)p3, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
383 hexdump((void*)p4, 32);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
384 fprintf(stderr, "content of the callback functions:\n\n");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
385 while(i<8) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
386 hexdump(*((void**)p2+i), (i==0)?32*4:16);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
387 i++;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
388 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
389 i=0;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
390 pp=(*(void***)p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
391 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
392 while(i<15) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
393 hexdump(*((void**)pp+i), 32);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
394 i++;
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 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
398 result=(*pnsSetDataCallback)(p1,p2,p3,p4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
399 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
400 hexdump((void*)p1, 0x24);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
401 // hexdump((void*)p2, 256);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
402 // hexdump((void*)p3, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
403 hexdump(*((void**)p3), 256);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
404 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
405 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
406 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
407
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
408 ulong PNStream_SetProperty(ulong p1,ulong p2,ulong p3) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
409 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
410 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
411 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
412 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
413 hexdump((void*)p3, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
414 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
415 result=(*pnsSetProperty)(p1,p2,p3);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
416 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
417 // hexdump((void*)p3, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
418 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
419 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
422 ulong PNStream_GetProperty(ulong p1,ulong p2,ulong p3) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
423 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
424 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
425 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
426 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
427 // hexdump((void*)p3, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
428 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
429 result=(*pnsGetProperty)(p1,p2,p3);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
430 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
431 hexdump((void*)p3, 4);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
432 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
433 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
436 ulong PNStream_Close(ulong p1) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
437 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
438 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
439 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
440 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
441 result=(*pnsClose)(p1);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
442 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
443 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
444 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
445 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
446 }
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 ulong streamHeaderSize=0;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
449
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
450 ulong PNStream_GetStreamHeaderSize(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
451 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
452 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
453 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
454 // hexdump((void*)p2, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
455 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
456 result=(*pnsGetStreamHeaderSize)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
457 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
458 hexdump((void*)p2, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
459 streamHeaderSize=*((ulong *)p2);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
460 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
461 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
464 ulong PNStream_GetStreamHeader(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
465 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
466 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
467 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
468 // hexdump((void*)p2, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
469 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
470 result=(*pnsGetStreamHeader)(p1,p2);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
471 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
472 hexdump((void*)p2, streamHeaderSize);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
473 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
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_Input(ulong p1,ulong p2,ulong p3) {
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_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
480 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
481 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
482 hexdump((void*)p3, 4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
483 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
484 result=(*pnsInput)(p1,p2,p3);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
485 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
486 // hexdump((void*)p3, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
487 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
488 return result;
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
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
491 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
492 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
493 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
494 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
495 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
496 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
497 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
498 tic();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
499 result=(*pnsSetOutputPacketSize)(p1,p2,p3,p4);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
500 toc();
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
501 // hexdump((void*)p1, 44);
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
502 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
503 return result;
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
504 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
505
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
506 ulong PNStream_GetInputBufferSize(ulong p1,ulong p2) {
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
507 ulong result;
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
508 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
509 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
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=(*pnsGetInputBufferSize)(p1,p2);
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_GetInputBufferSize --> 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 void SetDLLAccessPath(ulong p1) {
25313
9e13376e0daa Fix printf format string length modifiers, removes about a trillion warnings.
diego
parents: 24208
diff changeset
520 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
521 // hexdump((void*)p1, 44);
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
522 (*setDLLAccessPath)(p1);
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 fprintf(stderr, "--> void\n\n\n");
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
525 }
86c478bea7ce realplayer codecs wrappers, originaly written by Florian Schneider, extended
arpi
parents:
diff changeset
526