![]() |
|
APEG issues |
Matt Kindy
Member #7,331
June 2006
![]() |
I am having a problem with APEG, I'm wondering if anyone can help me out. I made a function that uses apeg_play_mpg, but it won't move on to the next thing until I hit a button. Does anybody know what could be happening? EDIT: There is no readkey() or ureadkey() or anything of the sort in it |
Zaphos
Member #1,468
August 2001
|
It might help us help you if you could post the function. I'm not deeply familiar with apeg, but it's probably going to be hard to figure out your problem without seeing the relevant code.
|
Matt Kindy
Member #7,331
June 2006
![]() |
EDIT: Everything after the apeg_play_mpg is ignored, at least until a key is pressed, then it will display, but you still have to press a key... it basically is doing the effects of a readkey(), without the readkey()???! |
Kitty Cat
Member #2,815
October 2002
![]() |
That function looks a bit convoluted, and you're free'ing streams after they're already closed, and closing the internal stream handle. apeg_close_stream invalidates the pointer (meaning it frees it for you, just like apeg_open_stream creates it for you. And you should never do anything to apeg_stream except use it for reference it in the callback to apeg_play_mpg. That said, there does seem to be a bug in the apeg_play_mpg function that causes it to not quit when it hits the end of the stream (though it'll still run the callback, which if none is specified, causes it to quit when a key is pressed). Since you're Already using the stream functions, why bother with the blocking play function? Something like this would work:
-- |
Marco Radaelli
Member #3,028
December 2002
![]() |
simulate_keypress() perhaps?
|
Matt Kindy
Member #7,331
June 2006
![]() |
I get a linker error to apeg_get_video_area... simulate_keypress() would probably work, except for the fact that it would not execute until a key is pressed(paradox)...the movie isn't closing, so no code is executed, and I wouldn't want the closing code to execute while this was running...the blocking way would work, but only if the movie closed(like it's supposed to). |
Kitty Cat
Member #2,815
October 2002
![]() |
It's apeg_get_video_size, sorry. -- |
|