summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-27 21:06:47 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-27 21:06:47 +0000
commit22226f94dfa40138d2d71081619fd255a5820a10 (patch)
tree6388bef5e35a1baf70278ef54cfda377452720e3 /libmpdemux
parentaba3f4a7ab511d5e6d42cf2ade4c13a8f685ed71 (diff)
downloadmpv-22226f94dfa40138d2d71081619fd255a5820a10.tar.bz2
mpv-22226f94dfa40138d2d71081619fd255a5820a10.tar.xz
added new stream_control() and new command: STREAM_CTRL_GET_TIME_LENGTH
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17697 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/stream.c5
-rw-r--r--libmpdemux/stream.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 4eebbbc485..8b4b21fd14 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -347,6 +347,11 @@ void stream_reset(stream_t *s){
//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 --git a/libmpdemux/stream.h b/libmpdemux/stream.h
index 19c9e7a3fc..b1d303581a 100644
--- a/libmpdemux/stream.h
+++ b/libmpdemux/stream.h
@@ -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"