comparison stream.c @ 1973:5216f108cb4f

all error/warn/info messages moved to help_mp-en.h for translation
author arpi
date Wed, 26 Sep 2001 21:35:14 +0000
parents 78fa0713b823
children 0c45328c9f8b
comparison
equal deleted inserted replaced
1972:78924572fddf 1973:5216f108cb4f
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <sys/ioctl.h> 8 #include <sys/ioctl.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 10
11 #include "config.h" 11 #include "config.h"
12 #include "mp_msg.h"
13 #include "help_mp.h"
12 14
13 #include "stream.h" 15 #include "stream.h"
14 16
15 extern int verbose; // defined in mplayer.c 17 extern int verbose; // defined in mplayer.c
16 18
114 break; 116 break;
115 #endif 117 #endif
116 case STREAMTYPE_STREAM: 118 case STREAMTYPE_STREAM:
117 //s->pos=newpos; // real seek 119 //s->pos=newpos; // real seek
118 if(newpos<s->pos){ 120 if(newpos<s->pos){
119 printf("Cannot seek backward in linear streams!\n"); 121 mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n");
120 return 1; 122 return 1;
121 } 123 }
122 while(s->pos<newpos){ 124 while(s->pos<newpos){
123 if(stream_fill_buffer(s)<=0) break; // EOF 125 if(stream_fill_buffer(s)<=0) break; // EOF
124 } 126 }
132 stream_fill_buffer(s); 134 stream_fill_buffer(s);
133 if(pos>=0 && pos<s->buf_len){ 135 if(pos>=0 && pos<s->buf_len){
134 s->buf_pos=pos; // byte position in sector 136 s->buf_pos=pos; // byte position in sector
135 return 1; 137 return 1;
136 } 138 }
139
137 #ifdef _LARGEFILE_SOURCE 140 #ifdef _LARGEFILE_SOURCE
138 if(verbose) printf("stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos)); 141 mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%llX !\n",(long long)(pos+newpos));
139 #else 142 #else
140 if(verbose) printf("stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos)); 143 mp_msg(MSGT_STREAM,MSGL_V,"stream_seek: WARNING! Can't seek to 0x%X !\n",(pos+newpos));
141 #endif 144 #endif
142 return 0; 145 return 0;
143 } 146 }
144 147
145 148