1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-20 06:46:55 +00:00

some cosmetics - reordering declarations, 10l for cache2

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7413 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-09-15 22:38:01 +00:00
parent f272659c11
commit 84cc3f7ca3

View File

@ -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);