[MPlayer-cvslog] r29930 - in trunk/stream: cache2.c stream.h stream_live555.c
reimar
subversion at mplayerhq.hu
Tue Nov 17 20:23:55 CET 2009
Author: reimar
Date: Tue Nov 17 20:23:55 2009
New Revision: 29930
Log:
Deobfuscate the special hack to disable cache for live555.
Cache can not be used for it, since it does not provide any
data stream, the data is provided to the demuxer "behind
MPlayer's back".
Modified:
trunk/stream/cache2.c
trunk/stream/stream.h
trunk/stream/stream_live555.c
Modified: trunk/stream/cache2.c
==============================================================================
--- trunk/stream/cache2.c Tue Nov 17 20:14:42 2009 (r29929)
+++ trunk/stream/cache2.c Tue Nov 17 20:23:55 2009 (r29930)
@@ -311,8 +311,7 @@ int stream_enable_cache(stream_t *stream
int ss = stream->sector_size ? stream->sector_size : STREAM_BUFFER_SIZE;
cache_vars_t* s;
- if (stream->type==STREAMTYPE_STREAM && stream->fd < 0) {
- // The stream has no 'fd' behind it, so is non-cacheable
+ if (stream->flags & STREAM_NON_CACHEABLE) {
mp_msg(MSGT_CACHE,MSGL_STATUS,"\rThis stream is non-cacheable\n");
return 1;
}
Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h Tue Nov 17 20:14:42 2009 (r29929)
+++ trunk/stream/stream.h Tue Nov 17 20:23:55 2009 (r29930)
@@ -41,6 +41,10 @@
#define STREAM_SEEK_BW 2
#define STREAM_SEEK_FW 4
#define STREAM_SEEK (STREAM_SEEK_BW|STREAM_SEEK_FW)
+/** This is a HACK for live555 that does not respect the
+ separation between stream an demuxer and thus is not
+ actually a stream cache can not be used */
+#define STREAM_NON_CACHEABLE 8
//////////// Open return code
#define STREAM_REDIRECTED -2
Modified: trunk/stream/stream_live555.c
==============================================================================
--- trunk/stream/stream_live555.c Tue Nov 17 20:14:42 2009 (r29929)
+++ trunk/stream/stream_live555.c Tue Nov 17 20:23:55 2009 (r29930)
@@ -44,6 +44,7 @@ static int open_live_rtsp_sip(stream_t *
*file_format = DEMUXER_TYPE_RTP;
stream->type = STREAMTYPE_STREAM;
+ stream->flags = STREAM_NONCACHEABLE;
return STREAM_OK;
fail:
More information about the MPlayer-cvslog
mailing list