summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-08-12 12:49:37 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-08-12 12:49:37 +0300
commit0d091760781466c3cb6a3426daecadf8a696fa88 (patch)
treee1f19671d2b3baf7b0f575e49182143cd9ccc5ab /stream
parent17d3e4b36d18f4a653f7c5f6ea2f15fcd3a2f069 (diff)
downloadmpv-0d091760781466c3cb6a3426daecadf8a696fa88.tar.bz2
mpv-0d091760781466c3cb6a3426daecadf8a696fa88.tar.xz
stream.h: Add 2 prototypes instead of declaring them in cache2.c
Declare stream_fill_buffer() and stream_seek_long() always (before they were only declared if cache was disabled and those were used instead of cached versions). Remove the now redundant declarations in cache2.c.
Diffstat (limited to 'stream')
-rw-r--r--stream/cache2.c3
-rw-r--r--stream/stream.h4
2 files changed, 2 insertions, 5 deletions
diff --git a/stream/cache2.c b/stream/cache2.c
index 366727302a..c90bf09e72 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -35,9 +35,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
diff --git a/stream/stream.h b/stream/stream.h
index a2f78307de..9b598418ef 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -119,14 +119,14 @@ typedef struct stream {
unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
} stream_t;
+int stream_fill_buffer(stream_t *s);
+int stream_seek_long(stream_t *s,off_t pos);
#ifdef CONFIG_STREAM_CACHE
int stream_enable_cache(stream_t *stream,int size,int min,int prefill);
int cache_stream_fill_buffer(stream_t *s);
int cache_stream_seek_long(stream_t *s,off_t pos);
#else
// no cache, define wrappers:
-int stream_fill_buffer(stream_t *s);
-int stream_seek_long(stream_t *s,off_t pos);
#define cache_stream_fill_buffer(x) stream_fill_buffer(x)
#define cache_stream_seek_long(x,y) stream_seek_long(x,y)
#define stream_enable_cache(x,y,z,w) 1