summaryrefslogtreecommitdiffstats
path: root/stream/cache2.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/cache2.c')
-rw-r--r--stream/cache2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index aa06bc1b51..209b2bdfd5 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -16,6 +16,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "cache2.h"
#include "osdep/shmem.h"
#include "osdep/timer.h"
#if defined(__MINGW32__) || defined(__CYGWIN__)
@@ -35,9 +36,6 @@ static void ThreadProc( void *s );
#include "stream.h"
extern int use_gui;
-int stream_fill_buffer(stream_t *s);
-int stream_seek_long(stream_t *s,off_t pos);
-
typedef struct {
// constats:
unsigned char *buffer; // base pointer of the alllocated buffer memory
@@ -70,13 +68,13 @@ static int min_fill=0;
int cache_fill_status=0;
-void cache_stats(cache_vars_t* s){
+static void cache_stats(cache_vars_t* s){
int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer
mp_msg(MSGT_CACHE,MSGL_INFO,"0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos);
mp_msg(MSGT_CACHE,MSGL_INFO,"%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size);
}
-int cache_read(cache_vars_t* s,unsigned char* buf,int size){
+static int cache_read(cache_vars_t* s,unsigned char* buf,int size){
int total=0;
while(size>0){
int pos,newb,len;
@@ -122,7 +120,7 @@ int cache_read(cache_vars_t* s,unsigned char* buf,int size){
return total;
}
-int cache_fill(cache_vars_t* s){
+static int cache_fill(cache_vars_t* s){
int back,back2,newb,space,len,pos;
off_t read=s->read_filepos;
@@ -242,7 +240,7 @@ static int cache_execute_control(cache_vars_t *s) {
return res;
}
-cache_vars_t* cache_init(int size,int sector){
+static cache_vars_t* cache_init(int size,int sector){
int num;
#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__)
cache_vars_t* s=shmem_alloc(sizeof(cache_vars_t));