From 129d4fe9831dd81c25525b8141bbbf612769f10e Mon Sep 17 00:00:00 2001 From: Mark Calderbank Date: Thu, 15 Mar 2007 20:56:02 +0000 Subject: [PATCH] Clear some rubbish out of the demuxer. --- demuxer.cc | 1 - demuxerts.cc | 43 ------------------------------------------- demuxervdr.cc | 3 --- 3 files changed, 47 deletions(-) diff --git a/demuxer.cc b/demuxer.cc index 1852761..e925834 100644 --- a/demuxer.cc +++ b/demuxer.cc @@ -224,7 +224,6 @@ int Demuxer::PESPacket::submit() dx->avail_mpaudchan[packetType-PESTYPE_AUD0]=true; - //Log::getInstance()->log("PESPacket", Log::DEBUG, "%i", dx->audio_current); if (dx->audio_current == packetType && !dx->aud_seeking) sent = dx->audiostream.put(data+submitted, size-submitted, MPTYPE_MPEG_AUDIO); else diff --git a/demuxerts.cc b/demuxerts.cc index 7fcce99..da454f3 100644 --- a/demuxerts.cc +++ b/demuxerts.cc @@ -37,25 +37,6 @@ void DemuxerTS::flush() int DemuxerTS::scan(UCHAR *buf, int len) { return 0xc0; -/* - // Temporarily, just look for the lowest audio stream and return it - - UINT LoPattern = 0x100 | PESTYPE_AUD0, - HiPattern = 0x100 | PESTYPE_AUDMAX; - int ret = 0; - - while (len >= 4) - { - UINT pattern = *(UINT*)buf; - buf++; len--; - - if (pattern < LoPattern || pattern > HiPattern) continue; - ret = pattern & 0xFF; - HiPattern = pattern; - if (HiPattern == LoPattern) break; - } - return ret; -*/ } void DemuxerTS::setVID(int p_vID) @@ -210,29 +191,6 @@ int DemuxerTS::processTS(UCHAR* buf) aPacket.init(0xC0); buf += 6; datalen -= 6; } -// int pesID = -1; -// if (datalen >= 4) pesID = buf[3]; -// switch (pesID) -// { -// case PESTYPE_VID0 ... PESTYPE_VIDMAX: -// if (video_current == -1) video_current = pesID; -// if (video_current == pesID) -// { -// vPID = pid; -// vPacket.init(pesID); -// buf += 6; datalen -= 6; -// } -// break; -// case PESTYPE_AUD0 ... PESTYPE_AUDMAX: -// if (audio_current == -1) audio_current = pesID; -// if (audio_current == pesID) -// { -// aPID = pid; -// aPacket.init(pesID); -// buf += 6; datalen -= 6; -// } -// break; -// } } PESPacket* packet = NULL; @@ -242,7 +200,6 @@ int DemuxerTS::processTS(UCHAR* buf) { if (packet->write(buf, datalen) == 0) { // Writing to packet failed. It has overflowed. - Log::getInstance()->log("TS Demuxer", Log::DEBUG, "Packet overflow, pid %d", pid); if (packet->submit() == 0) return 0; packet->truncate(); diff --git a/demuxervdr.cc b/demuxervdr.cc index 44e87a7..12ccbaa 100644 --- a/demuxervdr.cc +++ b/demuxervdr.cc @@ -288,9 +288,6 @@ Log::getInstance()->log("Demuxer", Log::DEBUG, "DELETED REFERENCES"); if (actual > 1) Log::getInstance()->log("Demuxer", Log::DEBUG, "STILL USING OLD REF"); -//ULONG ret = ref_frame + difference * Video::getInstance()->getFPS() / 90000; -//Log::getInstance()->log("Demuxer", Log::DEBUG, "%llu: FOUND %d from %d, diff %llu", pts, ret, ref_frame, difference); - if (difference == (1LL<<33)) return 0; // We cannot make sense of the pts else -- 2.39.5