changeset 17696:66d7afee9a46

added new stream_control() and new command: STREAM_CTRL_GET_TIME_LENGTH
author nicodvb
date Mon, 27 Feb 2006 21:06:47 +0000
parents 3f20b096782d
children 3a56bbef9300
files libmpdemux/stream.c libmpdemux/stream.h
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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));
--- 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"