[mythtv] EIT Passive Scanning

Stuart Auchterlonie stuarta at squashedfrog.net
Mon Oct 3 16:13:36 UTC 2005


On Mon, Oct 03, 2005 at 10:37:33AM -0400, Daniel Kristjansson wrote:
> On Mon, 2005-10-03 at 15:12 +0100, Stuart Auchterlonie wrote:
> > The attached patch fixes passive EIT scanning against rev 7376
> > 
> > Passive EIT scanning is used while watching live TV.
> > Stuart
> > ps. This superceeds the patch posted earlier in EIT broken thread.
> 
> Can you try revision 7379? 
> 
> It should enable passive EIT scanning with a single line change...
> 

Okay, have been trying it. I'm attaching a patch that fixes two
different SEGV which I need to get it to run at all.

Passive EIT scans work okay.

Active scans on data only channels get stuck in the Signal
Monitor looking for a PMT.

Oh, and I managed to deadlock the backend, so there's a logfile
for that as well.. :-)


Stuart

-------------- next part --------------
Index: mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp
===================================================================
--- mythtv.orig/libs/libmythtv/mpeg/mpegstreamdata.cpp	2005-10-03 15:48:07.000000000 +0100
+++ mythtv/libs/libmythtv/mpeg/mpegstreamdata.cpp	2005-10-03 16:52:25.000000000 +0100
@@ -230,9 +230,12 @@
                 "only using first one in new PMT");
     }
 
-    _pid_video_single_program = videoPIDs[0];
-    pids.push_back(videoPIDs[0]);
-    types.push_back(videoTypes[0]);
+    if (videoPIDs.size() != 0)
+    {
+        _pid_video_single_program = videoPIDs[0];
+        pids.push_back(videoPIDs[0]);
+        types.push_back(videoTypes[0]);
+    }
 
     // Audio
     pmt.FindPIDs(StreamID::AnyAudio, pids, types);
@@ -262,7 +265,11 @@
     SetPMTSingleProgram(pmt2);
 
     VERBOSE(VB_RECORD, "PMT for output stream");
-    VERBOSE(VB_RECORD, pmt2->toString());
+    if (pmt2->StreamCount() > 0)
+        VERBOSE(VB_RECORD, pmt2->toString());
+    else
+        VERBOSE(VB_RECORD, "PMT contains no PIDs, continuing anyway");
+
 
     return true;
 }
-------------- next part --------------
2005-10-03 16:55:25.447 PAT for output stream
2005-10-03 16:55:25.447 Program Association Table
 PSIP prefix(0x0) tableID(0x0) length(13) extension(0x3002)
      version(29) current(1) section(0) last_section(0)
         tsid: 12290
 programCount: 1
  program number 1 has PID 0x 11e   data  0x0 0x1 0x225 0x30

2005-10-03 16:55:25.447 DVBSM(0)::AddPIDFilter(0x11e): 
2005-10-03 16:55:25.629 SM(0)::AddFlags: Seen(PMT,) Match() Wait()
2005-10-03 16:55:25.630 CreatePMTSingleProgram()
2005-10-03 16:55:25.630 PMT in input stream
2005-10-03 16:55:25.630 Program Map Table ver(31) pid(0x11e) pnum(16064)

 Stream #0 pid(0x19f0) type(dsmcc-b std data  0x11)
     Unknown Descriptor (0x13) length(5)
     Data Broadcast Identifier Descriptor (0x66) length(6)
     Stream Identifier Descriptor (0x52) length(1)

2005-10-03 16:55:25.630 PMT for output stream
2005-10-03 16:55:25.630 PMT contains no PIDs, continuing anyway
2005-10-03 16:55:25.685 DTVSM(0)::GetStatusList: WaitForPMT seen(1) matching(0)

-------------- next part --------------

Threads 10 & 11 look of interest here.

-----

2005-10-03 17:00:31.650 TVRec(1): ClearFlags(RingBufferReset,) -> FrontendReady,RunMainLoop,AskAllowRecording,SIParserRunning,RecorderRunning,
^C
Program received signal SIGINT, Interrupt.
[Switching to Thread -1239079232 (LWP 29249)]
0xb645df87 in ___newselect_nocancel () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb645df87 in ___newselect_nocancel () from /lib/tls/libc.so.6
#1  0xb6866b5a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#2  0xb68d01d8 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#3  0xb68d0088 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#4  0xb68be071 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#5  0x08077aba in main (argc=3, argv=0xbf81c2d4) at main.cpp:623
(gdb) thread apply all bt

Thread 21 (Thread -1340671056 (LWP 29333)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb74e0 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb7b84829 in RecorderBase::PauseAndWait (this=0x811e420, timeout=100) at recorderbase.cpp:167
#3  0xb7c77a9a in DVBRecorder::StartRecording (this=0x811e420) at dvbrecorder.cpp:583
#4  0xb7b6605e in TVRec::RecorderThread (param=0x811e420) at tv_rec.cpp:1114
#5  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#6  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 20 (Thread -1374430288 (LWP 29332)):
#0  0xb645b5a9 in poll () from /lib/tls/libc.so.6
#1  0xb7c43128 in DVBSIParser::StartSectionReader (this=0x81374b8) at dvbsiparser.cpp:279
#2  0xb7c40e69 in DVBSIParser::SystemInfoThread (param=0x81374b8) at dvbsiparser.cpp:100
#3  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#4  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 16 (Thread -1363219536 (LWP 29326)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb74e0 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb79026d6 in ThreadedFileWriter::SyncLoop (this=0x8139908) at ThreadedFileWriter.cpp:231
#3  0xb7901565 in ThreadedFileWriter::boot_syncer (wotsit=0x8139908) at ThreadedFileWriter.cpp:65
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 15 (Thread -1354830928 (LWP 29325)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb74e0 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb7902789 in ThreadedFileWriter::DiskLoop (this=0x8139908) at ThreadedFileWriter.cpp:252
#3  0xb7901537 in ThreadedFileWriter::boot_writer (wotsit=0x8139908) at ThreadedFileWriter.cpp:58
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 12 (Thread -1323893840 (LWP 29282)):
#0  0xb65bfb61 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb7658 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0x080a827f in ProcessRequestThread::run (this=0x811a690) at mainserver.cpp:78
#3  0xb68b14ea in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 11 (Thread -1315505232 (LWP 29281)):
#0  0xb65bfb61 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb7539 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb7b66f0d in TVRec::WaitForEventThreadSleep (this=0x8114a40, wake=true, time=4294967295) at tv_rec.cpp:1248
#3  0xb7b77e67 in TVRec::SetChannel (this=0x8114a40, name={static null = {static null = <same as static member of an already seen type>, d = 0x80e8070, static shared_null = 0x80e8070}, d = 0x81368b8, static shared_null = 0x80e8070}, requestType=256) at tv_rec.cpp:2824
#4  0x08067a0a in EncoderLink::SetChannel (this=0x8115fb8, name=@0xb196f100) at encoderlink.cpp:732
#5  0x08093cb5 in MainServer::HandleRecorderQuery (this=0x81168c8, slist=@0xb196f3d0, commands=@0xb196f3b0, pbs=0x81482f8) at mainserver.cpp:2458
#6  0x0807c2b0 in MainServer::ProcessRequestWork (this=0x81168c8, sock=0x8130eb8) at mainserver.cpp:391
#7  0x0807ada0 in MainServer::ProcessRequest (this=0x81168c8, sock=0x8130eb8) at mainserver.cpp:232
#8  0x080a82a2 in ProcessRequestThread::run (this=0x810b638) at mainserver.cpp:83
#9  0xb68b14ea in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#10 0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#11 0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 10 (Thread -1307116624 (LWP 29280)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb7607 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb78fc476 in RingBuffer::Read (this=0x810d0f8, buf=0xb5970008, count=256000) at RingBuffer.cpp:1283
#3  0xb7b7a5f6 in TVRec::RequestRingBufferBlock (this=0x8114a40, size=256000) at tv_rec.cpp:3120
#4  0x0806962e in EncoderLink::RequestRingBufferBlock (this=0x8115fb8, size=256000) at encoderlink.cpp:981
#5  0x08095859 in MainServer::HandleRecorderQuery (this=0x81168c8, slist=@0xb216f3d0, commands=@0xb216f3b0, pbs=0x813f508) at mainserver.cpp:2635
#6  0x0807c2b0 in MainServer::ProcessRequestWork (this=0x81168c8, sock=0x814dea8) at mainserver.cpp:391
#7  0x0807ada0 in MainServer::ProcessRequest (this=0x81168c8, sock=0x814dea8) at mainserver.cpp:232
#8  0x080a82a2 in ProcessRequestThread::run (this=0x8116ac0) at mainserver.cpp:83
#9  0xb68b14ea in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#10 0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#11 0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 9 (Thread -1298728016 (LWP 29279)):
#0  0xb65bfb61 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb7658 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0x080a827f in ProcessRequestThread::run (this=0x811a300) at mainserver.cpp:78
#3  0xb68b14ea in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 8 (Thread -1290339408 (LWP 29278)):
#0  0xb65bfb61 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb7658 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0x080a827f in ProcessRequestThread::run (this=0x810bc50) at mainserver.cpp:78
#3  0xb68b14ea in QThreadInstance::start () from /usr/lib/libqt-mt.so.3
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 7 (Thread -1281950800 (LWP 29277)):
#0  0xb64262ec in __nanosleep_nocancel () from /lib/tls/libc.so.6
#1  0xb6426110 in sleep () from /lib/tls/libc.so.6
#2  0xb7922320 in JobQueue::ProcessQueue (this=0x811a330) at jobqueue.cpp:469
#3  0xb791cfbc in JobQueue::RunQueueProcesser (this=0x811a330) at jobqueue.cpp:135
#4  0xb791cfe5 in JobQueue::QueueProcesserThread (param=0x811a330) at jobqueue.cpp:141
#5  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#6  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 6 (Thread -1273562192 (LWP 29276)):
#0  0xb64262ec in __nanosleep_nocancel () from /lib/tls/libc.so.6
#1  0xb6426110 in sleep () from /lib/tls/libc.so.6
#2  0x080c7ff7 in HouseKeeper::RunHouseKeeping (this=0x8116550) at housekeeper.cpp:181
#3  0x080c8b27 in HouseKeeper::doHouseKeepingThread (param=0x8116550) at housekeeper.cpp:242
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 5 (Thread -1265173584 (LWP 29275)):
#0  0xb64262ec in __nanosleep_nocancel () from /lib/tls/libc.so.6
#1  0xb6426110 in sleep () from /lib/tls/libc.so.6
#2  0x0805aab9 in AutoExpire::Sleep (this=0x8116458) at autoexpire.cpp:273
#3  0x0805aa6f in AutoExpire::RunExpirer (this=0x8116458) at autoexpire.cpp:261
#4  0x0805c3b3 in AutoExpire::ExpirerThread (param=0x8116458) at autoexpire.cpp:379
#5  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#6  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 4 (Thread -1256784976 (LWP 29274)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 3 (Thread -1248396368 (LWP 29272)):
#0  0xb65c2179 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
#1  0xb65beee7 in _L_mutex_lock_29 () from /lib/tls/libpthread.so.0
#2  0xb6d8f7e8 in qt_open_extension_dict () from /usr/lib/libqt-mt.so.3
#3  0x00000002 in ?? ()
#4  0xb6d8253c in ?? () from /usr/lib/libqt-mt.so.3
#5  0xb65bf204 in _L_mutex_unlock_113 () from /lib/tls/libpthread.so.0
#6  0xb596f228 in ?? ()
#7  0xb6d8253c in ?? () from /usr/lib/libqt-mt.so.3
#8  0x081125c8 in ?? ()
#9  0x081125ec in ?? ()
#10 0xb596f218 in ?? ()
#11 0xb6bb67dc in QRecursiveMutexPrivate::lock () from /usr/lib/libqt-mt.so.3
#12 0xb6bb67dc in QRecursiveMutexPrivate::lock () from /usr/lib/libqt-mt.so.3
#13 0xb6bb6be4 in QMutex::lock () from /usr/lib/libqt-mt.so.3
#14 0xb7b66e47 in TVRec::RunTV (this=0x8114a40) at tv_rec.cpp:1231
#15 0xb7b66035 in TVRec::EventThread (param=0x8114a40) at tv_rec.cpp:1103
#16 0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#17 0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 2 (Thread -1239741520 (LWP 29270)):
#0  0xb65bfdc2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/libpthread.so.0
#1  0xb6bb74e0 in QWaitCondition::wait () from /usr/lib/libqt-mt.so.3
#2  0xb7ca48bb in EITScanner::RunEventLoop (this=0x810f9c0) at eitscanner.cpp:97
#3  0xb7ca46b7 in EITScanner::SpawnEventLoop (param=0x810f9c0) at eitscanner.cpp:65
#4  0xb65bdccd in start_thread () from /lib/tls/libpthread.so.0
#5  0xb6465b0e in clone () from /lib/tls/libc.so.6

Thread 1 (Thread -1239079232 (LWP 29249)):
#0  0xb645df87 in ___newselect_nocancel () from /lib/tls/libc.so.6
#1  0xb6866b5a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#2  0xb68d01d8 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#3  0xb68d0088 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#4  0xb68be071 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#5  0x08077aba in main (argc=3, argv=0xbf81c2d4) at main.cpp:623
(gdb) 


More information about the mythtv-dev mailing list