From 22226f94dfa40138d2d71081619fd255a5820a10 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Mon, 27 Feb 2006 21:06:47 +0000 Subject: 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 --- libmpdemux/stream.c | 5 +++++ libmpdemux/stream.h | 1 + 2 files changed, 6 insertions(+) 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" -- cgit v1.2.3