Mercurial > mplayer.hg
annotate stream/cache2.c @ 26583:6559b9364ca3
Add compilation rule for libvo/aspecttest and (hackishly) fix linking.
author | diego |
---|---|
date | Wed, 30 Apr 2008 14:29:17 +0000 |
parents | 5bfc1d8bece9 |
children | 77003eb2d9a8 |
rev | line source |
---|---|
2324 | 1 #include "config.h" |
2 | |
2322 | 3 // Initial draft of my new cache system... |
2352 | 4 // Note it runs in 2 processes (using fork()), but doesn't requires locking!! |
2322 | 5 // TODO: seeking, data consistency checking |
6 | |
2352 | 7 #define READ_USLEEP_TIME 10000 |
8 #define FILL_USLEEP_TIME 50000 | |
4825
41d2da3bd082
Make blocking call in libmpdemux interuptable (only with new input,
albeu
parents:
3726
diff
changeset
|
9 #define PREFILL_SLEEP_TIME 200 |
2322 | 10 |
11 #include <stdio.h> | |
12 #include <stdlib.h> | |
13 #include <string.h> | |
14 #include <signal.h> | |
3726 | 15 #include <sys/types.h> |
16 #include <unistd.h> | |
2322 | 17 |
17012 | 18 #include "osdep/timer.h" |
26077 | 19 #ifdef WIN32 |
20 #include <windows.h> | |
21 static DWORD WINAPI ThreadProc(void* s); | |
22 #elif defined(__OS2__) | |
23 #define INCL_DOS | |
24 #include <os2.h> | |
25 static void ThreadProc( void *s ); | |
26 #else | |
10242 | 27 #include <sys/wait.h> |
17012 | 28 #include "osdep/shmem.h" |
10197 | 29 #endif |
2322 | 30 |
2371 | 31 #include "mp_msg.h" |
16793
8d4fb5469efb
Make a few more messages translatable by moving them into help_mp-en.h.
diego
parents:
16750
diff
changeset
|
32 #include "help_mp.h" |
2371 | 33 |
2322 | 34 #include "stream.h" |
24697
8f2154e066cf
Make sure forked code does not try to display a GTK message box (and thus crashes)
reimar
parents:
22142
diff
changeset
|
35 extern int use_gui; |
2322 | 36 |
37 int stream_fill_buffer(stream_t *s); | |
38 int stream_seek_long(stream_t *s,off_t pos); | |
39 | |
40 typedef struct { | |
41 // constats: | |
42 unsigned char *buffer; // base pointer of the alllocated buffer memory | |
2352 | 43 int buffer_size; // size of the alllocated buffer memory |
44 int sector_size; // size of a single sector (2048/2324) | |
45 int back_size; // we should keep back_size amount of old bytes for backward seek | |
46 int fill_limit; // we should fill buffer only if space>=fill_limit | |
16152
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
47 int seek_limit; // keep filling cache if distanse is less that seek limit |
2374 | 48 // filler's pointers: |
49 int eof; | |
50 off_t min_filepos; // buffer contain only a part of the file, from min-max pos | |
51 off_t max_filepos; | |
52 off_t offset; // filepos <-> bufferpos offset value (filepos of the buffer's first byte) | |
2322 | 53 // reader's pointers: |
2374 | 54 off_t read_filepos; |
2322 | 55 // commands/locking: |
2352 | 56 // int seek_lock; // 1 if we will seek/reset buffer, 2 if we are ready for cmd |
57 // int fifo_flag; // 1 if we should use FIFO to notice cache about buffer reads. | |
2322 | 58 // callback |
59 stream_t* stream; | |
60 } cache_vars_t; | |
61 | |
2352 | 62 static int min_fill=0; |
63 | |
64 int cache_fill_status=0; | |
2322 | 65 |
66 void cache_stats(cache_vars_t* s){ | |
67 int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer | |
18176
f72bc5754209
Part3 of Otvos Attila's oattila AT chello-hu mp_msg changes, with lots of modifications as usual
reynaldo
parents:
18067
diff
changeset
|
68 mp_msg(MSGT_CACHE,MSGL_INFO,"0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos); |
f72bc5754209
Part3 of Otvos Attila's oattila AT chello-hu mp_msg changes, with lots of modifications as usual
reynaldo
parents:
18067
diff
changeset
|
69 mp_msg(MSGT_CACHE,MSGL_INFO,"%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size); |
2322 | 70 } |
71 | |
72 int cache_read(cache_vars_t* s,unsigned char* buf,int size){ | |
73 int total=0; | |
74 while(size>0){ | |
75 int pos,newb,len; | |
2352 | 76 |
77 //printf("CACHE2_READ: 0x%X <= 0x%X <= 0x%X \n",s->min_filepos,s->read_filepos,s->max_filepos); | |
2322 | 78 |
2374 | 79 if(s->read_filepos>=s->max_filepos || s->read_filepos<s->min_filepos){ |
2352 | 80 // eof? |
81 if(s->eof) break; | |
82 // waiting for buffer fill... | |
10197 | 83 usec_sleep(READ_USLEEP_TIME); // 10ms |
2352 | 84 continue; // try again... |
85 } | |
86 | |
2374 | 87 newb=s->max_filepos-s->read_filepos; // new bytes in the buffer |
2322 | 88 if(newb<min_fill) min_fill=newb; // statistics... |
89 | |
90 // printf("*** newb: %d bytes ***\n",newb); | |
2352 | 91 |
92 pos=s->read_filepos - s->offset; | |
93 if(pos<0) pos+=s->buffer_size; else | |
94 if(pos>=s->buffer_size) pos-=s->buffer_size; | |
95 | |
2322 | 96 if(newb>s->buffer_size-pos) newb=s->buffer_size-pos; // handle wrap... |
97 if(newb>size) newb=size; | |
98 | |
2352 | 99 // check: |
2371 | 100 if(s->read_filepos<s->min_filepos) mp_msg(MSGT_CACHE,MSGL_ERR,"Ehh. s->read_filepos<s->min_filepos !!! Report bug...\n"); |
2352 | 101 |
2322 | 102 // len=write(mem,newb) |
103 //printf("Buffer read: %d bytes\n",newb); | |
104 memcpy(buf,&s->buffer[pos],newb); | |
105 buf+=newb; | |
2352 | 106 len=newb; |
2322 | 107 // ... |
108 | |
109 s->read_filepos+=len; | |
110 size-=len; | |
111 total+=len; | |
112 | |
113 } | |
18067
ac7eaa0313c2
avoid cache fill status overflow with caches > ca. 20 MB
reimar
parents:
17384
diff
changeset
|
114 cache_fill_status=(s->max_filepos-s->read_filepos)/(s->buffer_size / 100); |
2322 | 115 return total; |
116 } | |
117 | |
118 int cache_fill(cache_vars_t* s){ | |
7472
c4434bdf6e51
tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bug
arpi
parents:
7204
diff
changeset
|
119 int back,back2,newb,space,len,pos; |
2374 | 120 off_t read=s->read_filepos; |
2322 | 121 |
2352 | 122 if(read<s->min_filepos || read>s->max_filepos){ |
123 // seek... | |
17366 | 124 mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%"PRIX64" \n",(int64_t)read); |
8938
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
125 // streaming: drop cache contents only if seeking backward or too much fwd: |
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
126 if(s->stream->type!=STREAMTYPE_STREAM || |
16152
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
127 read<s->min_filepos || read>=s->max_filepos+s->seek_limit) |
8938
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
128 { |
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
129 s->offset= // FIXME!? |
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
130 s->min_filepos=s->max_filepos=read; // drop cache content :( |
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
131 if(s->stream->eof) stream_reset(s->stream); |
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
132 stream_seek(s->stream,read); |
17366 | 133 mp_msg(MSGT_CACHE,MSGL_DBG2,"Seek done. new pos: 0x%"PRIX64" \n",(int64_t)stream_tell(s->stream)); |
8938
fc21a94f98c6
do not discard cache content at seeking type=STREAMTYPE_STREAM
arpi
parents:
7862
diff
changeset
|
134 } |
2352 | 135 } |
136 | |
2322 | 137 // calc number of back-bytes: |
138 back=read - s->min_filepos; | |
139 if(back<0) back=0; // strange... | |
140 if(back>s->back_size) back=s->back_size; | |
141 | |
142 // calc number of new bytes: | |
143 newb=s->max_filepos - read; | |
144 if(newb<0) newb=0; // strange... | |
145 | |
146 // calc free buffer space: | |
147 space=s->buffer_size - (newb+back); | |
148 | |
149 // calc bufferpos: | |
150 pos=s->max_filepos - s->offset; | |
151 if(pos>=s->buffer_size) pos-=s->buffer_size; // wrap-around | |
152 | |
153 if(space<s->fill_limit){ | |
154 // printf("Buffer is full (%d bytes free, limit: %d)\n",space,s->fill_limit); | |
155 return 0; // no fill... | |
156 } | |
157 | |
158 // printf("### read=0x%X back=%d newb=%d space=%d pos=%d\n",read,back,newb,space,pos); | |
159 | |
160 // reduce space if needed: | |
161 if(space>s->buffer_size-pos) space=s->buffer_size-pos; | |
162 | |
163 // if(space>32768) space=32768; // limit one-time block size | |
164 if(space>4*s->sector_size) space=4*s->sector_size; | |
165 | |
2352 | 166 // if(s->seek_lock) return 0; // FIXME |
167 | |
168 #if 1 | |
169 // back+newb+space <= buffer_size | |
170 back2=s->buffer_size-(space+newb); // max back size | |
171 if(s->min_filepos<(read-back2)) s->min_filepos=read-back2; | |
172 #else | |
2322 | 173 s->min_filepos=read-back; // avoid seeking-back to temp area... |
2352 | 174 #endif |
2322 | 175 |
176 // .... | |
177 //printf("Buffer fill: %d bytes of %d\n",space,s->buffer_size); | |
178 //len=stream_fill_buffer(s->stream); | |
179 //memcpy(&s->buffer[pos],s->stream->buffer,len); // avoid this extra copy! | |
180 // .... | |
2348 | 181 len=stream_read(s->stream,&s->buffer[pos],space); |
182 if(!len) s->eof=1; | |
2322 | 183 |
184 s->max_filepos+=len; | |
185 if(pos+len>=s->buffer_size){ | |
186 // wrap... | |
187 s->offset+=s->buffer_size; | |
188 } | |
189 | |
190 return len; | |
191 | |
192 } | |
193 | |
194 cache_vars_t* cache_init(int size,int sector){ | |
195 int num; | |
26077 | 196 #if !defined(WIN32) && !defined(__OS2__) |
2322 | 197 cache_vars_t* s=shmem_alloc(sizeof(cache_vars_t)); |
10197 | 198 #else |
199 cache_vars_t* s=malloc(sizeof(cache_vars_t)); | |
200 #endif | |
12899 | 201 if(s==NULL) return NULL; |
202 | |
2322 | 203 memset(s,0,sizeof(cache_vars_t)); |
204 num=size/sector; | |
12835
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
205 if(num < 16){ |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
206 num = 16; |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
207 }//32kb min_size |
2322 | 208 s->buffer_size=num*sector; |
209 s->sector_size=sector; | |
26077 | 210 #if !defined(WIN32) && !defined(__OS2__) |
2322 | 211 s->buffer=shmem_alloc(s->buffer_size); |
10197 | 212 #else |
213 s->buffer=malloc(s->buffer_size); | |
214 #endif | |
12899 | 215 |
216 if(s->buffer == NULL){ | |
26077 | 217 #if !defined(WIN32) && !defined(__OS2__) |
12899 | 218 shmem_free(s,sizeof(cache_vars_t)); |
219 #else | |
220 free(s); | |
221 #endif | |
222 return NULL; | |
223 } | |
224 | |
2322 | 225 s->fill_limit=8*sector; |
12835
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
226 s->back_size=s->buffer_size/2; |
2322 | 227 return s; |
228 } | |
229 | |
9915 | 230 void cache_uninit(stream_t *s) { |
231 cache_vars_t* c = s->cache_data; | |
232 if(!s->cache_pid) return; | |
26077 | 233 #ifdef WIN32 |
234 TerminateThread((HANDLE)s->cache_pid,0); | |
235 #elif defined(__OS2__) | |
236 DosKillThread( s->cache_pid ); | |
237 DosWaitThread( &s->cache_pid, DCWW_WAIT ); | |
238 #else | |
9915 | 239 kill(s->cache_pid,SIGKILL); |
240 waitpid(s->cache_pid,NULL,0); | |
10197 | 241 #endif |
9915 | 242 if(!c) return; |
26077 | 243 #if defined(WIN32) || defined(__OS2__) |
244 free(c->stream); | |
245 free(c->buffer); | |
246 free(s->cache_data); | |
247 #else | |
9915 | 248 shmem_free(c->buffer,c->buffer_size); |
249 shmem_free(s->cache_data,sizeof(cache_vars_t)); | |
10197 | 250 #endif |
9915 | 251 } |
252 | |
2322 | 253 static void exit_sighandler(int x){ |
254 // close stream | |
255 exit(0); | |
256 } | |
257 | |
16152
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
258 int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ |
25445
959fca775f43
Fix stream_cache to use sector_size set in stream_t.
ulion
parents:
24697
diff
changeset
|
259 int ss = stream->sector_size ? stream->sector_size : STREAM_BUFFER_SIZE; |
5991 | 260 cache_vars_t* s; |
7006
c0b490505298
disable cache if stream->fd<0 (no regular file/pipe but some special thing)
arpi
parents:
5991
diff
changeset
|
261 |
7204 | 262 if (stream->type==STREAMTYPE_STREAM && stream->fd < 0) { |
263 // The stream has no 'fd' behind it, so is non-cacheable | |
264 mp_msg(MSGT_CACHE,MSGL_STATUS,"\rThis stream is non-cacheable\n"); | |
265 return 1; | |
266 } | |
7006
c0b490505298
disable cache if stream->fd<0 (no regular file/pipe but some special thing)
arpi
parents:
5991
diff
changeset
|
267 |
5991 | 268 s=cache_init(size,ss); |
12899 | 269 if(s == NULL) return 0; |
3562 | 270 stream->cache_data=s; |
271 s->stream=stream; // callback | |
16152
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
272 s->seek_limit=seek_limit; |
12835
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
273 |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
274 |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
275 //make sure that we won't wait from cache_fill |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
276 //more data than it is alowed to fill |
16152
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
277 if (s->seek_limit > s->buffer_size - s->fill_limit ){ |
10a69a812eff
remove unused cache-prefill and create cache-seek-min that controls when seek_long is prefered over waiting for cache to fill
iive
parents:
12899
diff
changeset
|
278 s->seek_limit = s->buffer_size - s->fill_limit; |
12835
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
279 } |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
280 if (min > s->buffer_size - s->fill_limit) { |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
281 min = s->buffer_size - s->fill_limit; |
4235ae5a2d60
cache min fill adjustment, based on patch by Jeremy Huddleston
iive
parents:
10272
diff
changeset
|
282 } |
3562 | 283 |
26077 | 284 #if !defined(WIN32) && !defined(__OS2__) |
3562 | 285 if((stream->cache_pid=fork())){ |
10197 | 286 #else |
287 { | |
26077 | 288 #ifdef WIN32 |
10197 | 289 DWORD threadId; |
26077 | 290 #endif |
10197 | 291 stream_t* stream2=malloc(sizeof(stream_t)); |
292 memcpy(stream2,s->stream,sizeof(stream_t)); | |
293 s->stream=stream2; | |
26077 | 294 #ifdef WIN32 |
10197 | 295 stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId); |
26077 | 296 #else // OS2 |
297 stream->cache_pid = _beginthread( ThreadProc, NULL, 256 * 1024, s ); | |
298 #endif | |
10197 | 299 #endif |
3562 | 300 // wait until cache is filled at least prefill_init % |
17366 | 301 mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %"PRId64" [%"PRId64"] %"PRId64" pre:%d eof:%d \n", |
17384 | 302 (int64_t)s->min_filepos,(int64_t)s->read_filepos,(int64_t)s->max_filepos,min,s->eof); |
3562 | 303 while(s->read_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){ |
16793
8d4fb5469efb
Make a few more messages translatable by moving them into help_mp-en.h.
diego
parents:
16750
diff
changeset
|
304 mp_msg(MSGT_CACHE,MSGL_STATUS,MSGTR_CacheFill, |
3600 | 305 100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size), |
17366 | 306 (int64_t)s->max_filepos-s->read_filepos |
3562 | 307 ); |
308 if(s->eof) break; // file is smaller than prefill size | |
26326
5bfc1d8bece9
Remove the need for code using stream to export an mp_input_check_interrupt()
albeu
parents:
26077
diff
changeset
|
309 if(stream_check_interrupt(PREFILL_SLEEP_TIME)) |
4825
41d2da3bd082
Make blocking call in libmpdemux interuptable (only with new input,
albeu
parents:
3726
diff
changeset
|
310 return 0; |
3562 | 311 } |
16870 | 312 mp_msg(MSGT_CACHE,MSGL_STATUS,"\n"); |
4825
41d2da3bd082
Make blocking call in libmpdemux interuptable (only with new input,
albeu
parents:
3726
diff
changeset
|
313 return 1; // parent exits |
3562 | 314 } |
315 | |
26077 | 316 #if defined(WIN32) || defined(__OS2__) |
10197 | 317 } |
26077 | 318 #ifdef WIN32 |
10197 | 319 static DWORD WINAPI ThreadProc(void*s){ |
26077 | 320 #else // OS2 |
321 static void ThreadProc( void *s ){ | |
322 #endif | |
10197 | 323 #endif |
324 | |
24697
8f2154e066cf
Make sure forked code does not try to display a GTK message box (and thus crashes)
reimar
parents:
22142
diff
changeset
|
325 #ifdef HAVE_NEW_GUI |
8f2154e066cf
Make sure forked code does not try to display a GTK message box (and thus crashes)
reimar
parents:
22142
diff
changeset
|
326 use_gui = 0; // mp_msg may not use gui stuff in forked code |
8f2154e066cf
Make sure forked code does not try to display a GTK message box (and thus crashes)
reimar
parents:
22142
diff
changeset
|
327 #endif |
2322 | 328 // cache thread mainloop: |
329 signal(SIGTERM,exit_sighandler); // kill | |
330 while(1){ | |
10197 | 331 if(!cache_fill((cache_vars_t*)s)){ |
332 usec_sleep(FILL_USLEEP_TIME); // idle | |
2322 | 333 } |
2327 | 334 // cache_stats(s->cache_data); |
2322 | 335 } |
336 } | |
337 | |
338 int cache_stream_fill_buffer(stream_t *s){ | |
339 int len; | |
340 if(s->eof){ s->buf_pos=s->buf_len=0; return 0; } | |
341 if(!s->cache_pid) return stream_fill_buffer(s); | |
342 | |
2352 | 343 // cache_stats(s->cache_data); |
344 | |
2371 | 345 if(s->pos!=((cache_vars_t*)s->cache_data)->read_filepos) mp_msg(MSGT_CACHE,MSGL_ERR,"!!! read_filepos differs!!! report this bug...\n"); |
2327 | 346 |
2322 | 347 len=cache_read(s->cache_data,s->buffer, ((cache_vars_t*)s->cache_data)->sector_size); |
2352 | 348 //printf("cache_stream_fill_buffer->read -> %d\n",len); |
2327 | 349 |
2322 | 350 if(len<=0){ s->eof=1; s->buf_pos=s->buf_len=0; return 0; } |
351 s->buf_pos=0; | |
352 s->buf_len=len; | |
353 s->pos+=len; | |
354 // printf("[%d]",len);fflush(stdout); | |
355 return len; | |
356 | |
357 } | |
358 | |
2352 | 359 int cache_stream_seek_long(stream_t *stream,off_t pos){ |
360 cache_vars_t* s; | |
361 off_t newpos; | |
362 if(!stream->cache_pid) return stream_seek_long(stream,pos); | |
363 | |
364 s=stream->cache_data; | |
365 // s->seek_lock=1; | |
366 | |
17366 | 367 mp_msg(MSGT_CACHE,MSGL_DBG2,"CACHE2_SEEK: 0x%"PRIX64" <= 0x%"PRIX64" (0x%"PRIX64") <= 0x%"PRIX64" \n",s->min_filepos,pos,s->read_filepos,s->max_filepos); |
2322 | 368 |
2352 | 369 newpos=pos/s->sector_size; newpos*=s->sector_size; // align |
370 stream->pos=s->read_filepos=newpos; | |
371 s->eof=0; // !!!!!!! | |
372 | |
373 cache_stream_fill_buffer(stream); | |
2322 | 374 |
2352 | 375 pos-=newpos; |
376 if(pos>=0 && pos<=stream->buf_len){ | |
377 stream->buf_pos=pos; // byte position in sector | |
378 return 1; | |
379 } | |
380 | |
381 // stream->buf_pos=stream->buf_len=0; | |
382 // return 1; | |
383 | |
16750
0a31740dd5e6
Use PRI?64 defines as format strings for 64 bit variables.
reimar
parents:
16152
diff
changeset
|
384 mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos)); |
2322 | 385 return 0; |
386 } |