From f273d0613cfc37bda3066122b86da20681cb0585 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 25 Nov 2007 13:33:33 +0000 Subject: [PATCH] Live TV update --- playerlivetv.cc | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/playerlivetv.cc b/playerlivetv.cc index 46433ba..c88d056 100644 --- a/playerlivetv.cc +++ b/playerlivetv.cc @@ -233,7 +233,7 @@ void PlayerLiveTV::streamReceive(void* data, ULONG len) logger->log("PlayerLiveTV", Log::DEBUG, "Got data, %p, %lu", data, len); - if (streamChunks.size() < 30) + if (streamChunks.size() < 11) { StreamChunk s; s.data = data; @@ -266,42 +266,7 @@ void PlayerLiveTV::chunkToDemuxer() StreamChunk s = streamChunks.front(); streamChunks.pop(); logger->log("PlayerLiveTV", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len); - demuxer->put((UCHAR*)s.data, s.len); - -/* - FILE* fp = fopen("/data.ts", "a"); - fwrite(s.data, s.len, 1, fp); - fclose(fp); -*/ - - /* logger->log("PlayerLiveTV", Log::DEBUG, "Back from demuxer %i", a); - if (0)//(a != 50000) - { - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); - abort(); - - } - */ + demuxer->put((UCHAR*)s.data, s.len); free(s.data); } @@ -457,7 +422,7 @@ void PlayerLiveTV::threadMethod() { if (state == S_PREBUFFERING) { - if (streamChunks.size() > 0) + if (streamChunks.size() > 4) { while(streamChunks.size()) chunkToDemuxer(); switchState(S_PLAY); -- 2.39.5