Lenard, I tried playing a movie using directx on a different computer, and the movie's video was displayed! This second computer has Windows XP SP2, DirectX 9.0, Python 2.5.2, pygame 1.8.1rc2-svn1514, and a GeForce 2 Ultra video adapter. (The computer which I was using when I reported the movie bug has a feeble Intel Extreme Graphics 2 video adapter.) I have a theory that the compatibility with directx depends on the video adapter being used.
Jason --- Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > Well that turned out to be pretty easy. Thanks again > Jason. > > import _winreg > > def get_directx_version(): > key = > _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, > r'SOFTWARE\Microsoft\DirectX') > try: > version, value_type = > _winreg.QueryValueEx(key, 'Version') > if value_type != _winreg.REG_SZ: > raise ValueError("DirectX version > information corrupted") > return [int(n) for n in version.split('.')] > finally: > _winreg.CloseKey(key) > > > Lenard > > > Jason M. Marshall wrote: > > Lenard, > > > > Determining the current installed version of > DirectX > > is possible without ctypes or SDL. The version is > > stored in the registry at > > > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX\Version. > > Python can retrieve this Version string using the > > standard _winreg module. The Version string can be > > interpreted using > > > http://en.wikipedia.org/wiki/DirectX#Release_history. > > > > Jason > > > > --- Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > > > > > >> Thank you Jason. Now to answer Brian's question > as > >> to how the current > >> Pygame version differs from 1236. Code was added > to > >> __init__.py > >> (1285-1286) to set the video driver to directx > for > >> Windows versions > >> predating XP. My Windows predates XP and has only > >> DirectX 8.1 installed. > >> XP has DirectX 9.0. Apparently pygame incorrectly > >> sets the video driver > >> to directx for XP and DirectX 9.0 breaks the > DirectX > >> 5 api used by SDL. > >> Surprise, surprise. > >> > >> So what to do. Obviously __init__.py needs > fixing. > >> But what about > >> checking the DirectX version? I don't see any way > to > >> do it with SDL. > >> DirectX has a COM interface so ctypes is useless > >> without comtypes. > >> > >> Lenard > >> > >> > >> Jason M. Marshall wrote: > >> > >>> With SDL_VIDEODRIVER set to windib, the movie's > >>> > >> video > >> > >>> is displayed, but with SDL_VIDEODRIVER set to > >>> > >> directx, > >> > >>> the movie's video is not displayed. > >>> > >>> (I am using Windows XP SP2, Python 2.4.4, and > >>> > >> pygame > >> > >>> 1.8.1rc2-svn1507.) > >>> > >>> Jason > >>> > >>> --- Lenard Lindstrom <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>> > >>>> I have confirmed the bug for Windows XP. I am > >>>> practically clueless as to > >>>> what could causing it. One thing I didn't > verify > >>>> > >> is > >> > >>>> that Windows XP is > >>>> actually using the windib video driver. Jason, > if > >>>> you wouldn't mind > >>>> would you set the SDL_VIDEODRIVER environment > >>>> variable to windib and try > >>>> again. > >>>> > >>>> Thanks, > >>>> > >>>> Lenard > >>>> > >>>> > >>>> Jason M. Marshall wrote: > >>>> > >>>> > >>>>> René, > >>>>> > >>>>> I tried both of these: > >>>>> > >>>>> > >>>>> > > > http://www3.telus.net/len_l/pygame/pygame-1.8.1b02.win32-py2.4.msi > > > >>> > >>> > >>> > > > http://thorbrian.com/pygame/pygame-1.8.1rc2.win32-py2.4.exe > > > >>> > >>> > >>>>> The same movie problem exists in both builds. > >>>>> > >>>>> Jason > >>>>> > >>>>> --- René Dudfield <[EMAIL PROTECTED]> wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>> hi, > >>>>>> > >>>>>> thanks for finding this bug... > >>>>>> > >>>>>> are you able to try this version of pygame > >>>>>> > >> here? > >> > >>>>>> http://thorbrian.com/pygame/builds.php > >>>>>> > >>>>>> cheers, > >>>>>> > >>>>>> > >>>>>> On Wed, Jul 16, 2008 at 11:49 PM, Jason M. > >>>>>> > >>>>>> > >>>> Marshall > >>>> > >>>> > >>>>>> <[EMAIL PROTECTED]> wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>>> The pygame 1.8.1 beta 2 movie module doesn't > >>>>>>> > >>>>>>> > >>>> work > >>>> > >>>> > >>>>>>> correctly. Sound from the MPEG file is > played, > >>>>>>> > >>>>>>> > >>>> but > >>>> > >>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> not > >>>>>> > >>>>>> > >>>>>> > >>>>>>> video. (Just a black surface is displayed.) > >>>>>>> > >> The > >> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>> pygame > >>>>>> > >>>>>> > >>>>>> > >>>>>>> 1.8.1 pre-release 1236 movie module was > === message truncated ===