# HG changeset patch # User nicodvb # Date 1141074407 0 # Node ID 66d7afee9a46610c1c2fb76b8ad3f0c42b67e4c2 # Parent 3f20b096782dd21b82eebc37685bc54b067dc5a4 added new stream_control() and new command: STREAM_CTRL_GET_TIME_LENGTH diff -r 3f20b096782d -r 66d7afee9a46 libmpdemux/stream.c --- a/libmpdemux/stream.c Mon Feb 27 19:48:31 2006 +0000 +++ b/libmpdemux/stream.c Mon Feb 27 21:06:47 2006 +0000 @@ -347,6 +347,11 @@ //stream_seek(s,0); } +void stream_control(stream_t *s, int cmd, void *arg){ + if(!s->control) return STREAM_UNSUPORTED; + return s->control(s, cmd, arg); +} + stream_t* new_memory_stream(unsigned char* data,int len){ stream_t *s=malloc(sizeof(stream_t)+len); memset(s,0,sizeof(stream_t)); diff -r 3f20b096782d -r 66d7afee9a46 libmpdemux/stream.h --- a/libmpdemux/stream.h Mon Feb 27 19:48:31 2006 +0000 +++ b/libmpdemux/stream.h Mon Feb 27 21:06:47 2006 +0000 @@ -48,6 +48,7 @@ #define MAX_STREAM_PROTOCOLS 10 #define STREAM_CTRL_RESET 0 +#define STREAM_CTRL_GET_TIME_LENGTH 1 #ifdef MPLAYER_NETWORK #include "network.h"