Can't play a movie

Just starting out? Need help? Post your questions and find answers here.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Can't play a movie

Post by PB »

The following code will NOT play a movie on my window UNLESS the
two commented lines are uncommented... any ideas why? :(

Code: Select all

movie$="d:\test.mpg"
If InitMovie()=0 Or LoadMovie(0,movie$)=0 : End : EndIf
mw=MovieWidth() : mh=MovieHeight() : fps=MovieInfo(0)/1000 : dur=MovieLength()

;hmm=#PB_Window_Invisible
If OpenWindow(0,0,0,mw,mh,hmm|#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Movie")=0 : End : EndIf

PlayMovie(0,WindowID())
;ShowWindow_(WindowID(),#SW_SHOW)

Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
UPDATE: I just noticed that if I move the Debugger Window over the
window, then parts of the movie get drawn onto the window... do I maybe
have a video driver problem? I wouldn't think so because of the fact that
the movie plays if I uncomment the lines above...?
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post by Henrik »

Hi
Well PB i have tried both with and without the two commented lines
workes fine for me either way and when i move the debugger over
it's just cover the window.
so your code works okay on my system win98. geforce. :?

hope you fix your prob. anyway

Best Regarde
Henrik
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> i have tried both with and without the two commented lines
> workes fine for me either way

D'oh! :( I was hoping it was just a bug, rather than my own problem.
Maybe someone with Win 2000 Pro can confirm/deny this for me?

BTW, I just installed the latest drivers (v45.23) for my card (GeForce2)
and the problem didn't stop, so I doubt it's a driver problem.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

Same as Henrik, work on my PC: W2K SP4, NVIDA Geofore2
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> work on my PC: W2K SP4, NVIDA Geofore2

Damn. :cry:
Post Reply