summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-15 22:38:01 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-09-15 22:38:01 +0000
commit84cc3f7ca3062cc66173632aaf0dc16c204743e9 (patch)
tree199196a978df6f6cafb7ed3c42f326cf5d7960ca /libmpdemux
parentf272659c11515d7f1d79c76246dbc4ad89cfbb95 (diff)
downloadmpv-84cc3f7ca3062cc66173632aaf0dc16c204743e9.tar.bz2
mpv-84cc3f7ca3062cc66173632aaf0dc16c204743e9.tar.xz
some cosmetics - reordering declarations, 10l for cache2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7413 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/stream.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/libmpdemux/stream.h b/libmpdemux/stream.h
index e40cf92684..7a0c9f6a18 100644
--- a/libmpdemux/stream.h
+++ b/libmpdemux/stream.h
@@ -2,11 +2,10 @@
#define __STREAM_H
#include "mp_msg.h"
+#include <string.h>
#include <inttypes.h>
#include <sys/types.h>
-#define STREAM_BUFFER_SIZE 2048
-
#define STREAMTYPE_DUMMY -1 // for placeholders, when the actual reading is handled in the demuxer
#define STREAMTYPE_FILE 0 // read from seekable file
#define STREAMTYPE_VCD 1 // raw mode-2 CDROM reading, 2324 bytes/sector
@@ -18,6 +17,8 @@
#define STREAMTYPE_DVDNAV 9 // we cannot safely "seek" in this...
#define STREAMTYPE_CDDA 10 // raw audio CD reader
+#define STREAM_BUFFER_SIZE 2048
+
#define VCD_SECTOR_SIZE 2352
#define VCD_SECTOR_OFFS 24
#define VCD_SECTOR_DATA 2324
@@ -47,18 +48,15 @@ typedef struct {
#ifdef USE_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
+// no cache, define wrappers:
#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
#endif
-int cache_stream_fill_buffer(stream_t *s);
-int cache_stream_seek_long(stream_t *s,off_t pos);
-
-#include <string.h>
-
inline static int stream_read_char(stream_t *s){
return (s->buf_pos<s->buf_len)?s->buffer[s->buf_pos++]:
(cache_stream_fill_buffer(s)?s->buffer[s->buf_pos++]:-256);