changeset 7412:ecef4f2191b2

some cosmetics - reordering declarations, 10l for cache2
author arpi
date Sun, 15 Sep 2002 22:38:01 +0000
parents 72a9bd0314a4
children 7d83ac879f51
files libmpdemux/stream.h
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/stream.h	Sun Sep 15 21:24:45 2002 +0000
+++ b/libmpdemux/stream.h	Sun Sep 15 22:38:01 2002 +0000
@@ -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 @@
 
 #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);