summaryrefslogtreecommitdiffstats
path: root/stream.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-10 00:47:17 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-10 00:47:17 +0000
commitec5282092c3edaafddc34954e7b252c45a187a8e (patch)
treef7cf2c900dda5d69d4e7ba38ff539c8216cd0365 /stream.h
parent3ebb5053681984d9ec94af681c69b05ced4a4031 (diff)
downloadmpv-ec5282092c3edaafddc34954e7b252c45a187a8e.tar.bz2
mpv-ec5282092c3edaafddc34954e7b252c45a187a8e.tar.xz
new_memory_stream() added
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2145 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream.h')
-rw-r--r--stream.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/stream.h b/stream.h
index a426ee568a..2859b68bc4 100644
--- a/stream.h
+++ b/stream.h
@@ -7,6 +7,7 @@
#define STREAMTYPE_VCD 1
#define STREAMTYPE_STREAM 2 // same as FILE but no seeking (for stdin)
#define STREAMTYPE_DVD 3
+#define STREAMTYPE_MEMORY 4
#define VCD_SECTOR_SIZE 2352
#define VCD_SECTOR_OFFS 24
@@ -26,8 +27,8 @@ typedef struct {
int type; // 0=file 1=VCD
unsigned int buf_pos,buf_len;
off_t start_pos,end_pos;
- unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
void* priv; // used for DVD
+ unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
} stream_t;
int stream_fill_buffer(stream_t *s);
@@ -135,6 +136,6 @@ inline static int stream_skip(stream_t *s,int len){
void stream_reset(stream_t *s);
stream_t* new_stream(int fd,int type);
void free_stream(stream_t *s);
-
+stream_t* new_memory_stream(unsigned char* data,int len);
#endif // __STREAM_H