Justin T Wetherell wrote:
> Pygame Parachute Traceback:
> Thread-0x80196478
>   File "/usr/local/src/freevo-1.4/runtime/lib/python2.3/threading.py",
> line 204, in wait
> Thread-0x80250888
>   File "/usr/local/src/freevo-1.4/runtime/lib/python2.3/threading.py",
> line 204, in wait
> Thread-0x80193a58
>   File "/usr/local/src/freevo-1.4/runtime/lib/python2.3/threading.py",
> line 204, in wait
> Thread-0x80193f90
>   File "/usr/local/src/freevo-1.4/runtime/lib/python2.3/threading.py",
> line 204, in wait
> Thread-0x8018bd30
>   File
> "/usr/local/src/freevo-1.4/runtime/lib/python2.3/site-packages/mmpython/disc/dvdinfo.py",
> line 88, in isDisc
> Thread-0x80015200
>   File "./src/main.py", line 334, in main_func
> Fatal Python error: (pygame parachute) Segmentation Fault

Please check:

a) can mplayer/xine play the dvd? Maybe it's the wrong region code?
b) do you have libdecss and if yes, what version?

I guess it' one of those. It's a bug in the c part of mmpython which
interfaces to libdvdread. Please replace dvdinfo.py in the runtime
with the attached version and send me the trace again so I can see
were it crashes.

old version:
/usr/local/src/freevo-1.4/runtime/lib/python2.3/site-packages/mmpython/disc/dvdinfo.py

Dischi


#if 0 /*
# -----------------------------------------------------------------------
# dvdinfo.py - parse dvd title structure
# -----------------------------------------------------------------------
# $Id: dvdinfo.py,v 1.10 2003/06/30 13:17:19 the_krow Exp $
#
# -----------------------------------------------------------------------
# Copyright (C) 2003 Thomas Schueppel, Dirk Meyer
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ----------------------------------------------------------------------- */
#endif


import ifoparser
from mmpython import mediainfo
import mmpython
from discinfo import DiscInfo

class DVDAudio(mediainfo.AudioInfo):
    def __init__(self, title, number):
        mediainfo.AudioInfo.__init__(self)
        self.number = number
        self.title  = title
        print 'a1'
        self.id, self.language, self.codec, self.channels, self.samplerate = \
                 ifoparser.audio(title, number)
        print 'a2'


class DVDTitle(mediainfo.AVInfo):
    def __init__(self, number):
        mediainfo.AVInfo.__init__(self)
        self.number = number
        print 't1'
        self.chapters, self.angles, self.length, audio_num, \
                       subtitles_num = ifoparser.title(number)
        print 't2'

        self.mime = 'video/mpeg'
        for a in range(1, audio_num+1):
            self.audio.append(DVDAudio(number, a))
            
        print 't3: %s' % subtitles_num
        for s in range(1, subtitles_num+1):
            print 't4'
            self.subtitles.append(ifoparser.subtitle(number, s)[0])
            print 't5'

            
class DVDInfo(DiscInfo):
    def __init__(self,device):
        DiscInfo.__init__(self)
        self.context = 'video'
        self.offset = 0
        self.valid = self.isDisc(device)
        self.mime = 'video/dvd'
        self.type = 'DVD'
        self.subtype = 'video'

    def isDisc(self, device):
        if DiscInfo.isDisc(self, device) != 2:
            return 0

        # brute force reading of the device to find out if it is a DVD
        f = open(device,'rb')
        f.seek(32808, 0)
        buffer = f.read(50000)

        if buffer.find('UDF') == -1:
            f.close()
            return 0

        # seems to be a DVD, read a little bit more
        buffer += f.read(550000)
        f.close()

        if buffer.find('VIDEO_TS') == -1 and buffer.find('VIDEO_TS.IFO') == -1 and \
               buffer.find('OSTA UDF Compliant') == -1:
            return 0

        # OK, try libdvdread
        print 'open1'
        title_num = ifoparser.open(device)
        print 'open2'

        if not title_num:
            return 0

        for title in range(1, title_num+1):
            ti = DVDTitle(title)
            ti.trackno = title
            ti.trackof = title_num
            self.appendtrack(ti)

        print 'close1'
        ifoparser.close()
        print 'close2'
        return 1



mmpython.registertype( 'video/dvd', mediainfo.EXTENSION_DEVICE, mediainfo.TYPE_AV, 
DVDInfo )
-- 
"Either toss the Windows out of your computer, or toss your computer
out the window!" -- Richard Stallman

Reply via email to