Browse Source

drop debugging, and don't print out the backtrace on failure..

[git-p4: depot-paths = "//depot/": change = 866]
v0.3
John-Mark Gurney 18 years ago
parent
commit
e521c874be
1 changed files with 6 additions and 12 deletions
  1. +6
    -12
      mpegtsmod.py

+ 6
- 12
mpegtsmod.py View File

@@ -123,8 +123,6 @@ class MPEGTS(FSObject, VideoItem):
self.tvct = kwargs['tvct']
del kwargs['tvct']

log.msg('MPEGTS tvct:', self.tvct)
kwargs['content'] = MPEGTSResource(
mpegts.iteravpids(mpegts.TSPStream(open(path)),
sum(mpegts.getaudiovideopids(self.tvct['PMT']), [])))
@@ -176,18 +174,14 @@ class MultiMPEGTS(FSObject, StorageFolder):
StorageFolder.doUpdate(self)

def detectmpegts(path, fobj):
try:
f = mpegts.TSPStream(_LimitedFile(path, size= 2*1024*1024))
tvct = mpegts.GetTVCT(f)
except:
import traceback
traceback.print_exc(file=log.logfile)
raise

log.msg('tvct:', tvct)
f = mpegts.TSPStream(_LimitedFile(path, size= 2*1024*1024))
tvct = mpegts.GetTVCT(f)

if len(tvct['channels']) == 1:
return None, None
return MPEGTS, { 'path': path, 'tvct': tvct['channels'][0] }
# We might reenable this once we have pid filtering working
# fast enough.
#return MPEGTS, { 'path': path, 'tvct': tvct['channels'][0] }
elif len(tvct['channels']) > 1:
return MultiMPEGTS, { 'path': path }



Loading…
Cancel
Save