[SDL] smpeg rewind

obr at nri.cz obr at nri.cz
Mon Mar 17 00:52:01 PST 2003


Hello Bill,

	i don't know what version of smpeg are you using, but when
i played with it i found out, that it's not good at rendering
some parts of mpeg - when you seek on some frames it doesn't
jump there. I made some changes in the code, that could fix it.
The seeking code is different from playing for some reason (i'm
not an mpeg expert) so my change was to do it same way (what i remember 
it's about 2 yrs ago)

mao

On Sun, Mar 16, 2003 at 02:20:12AM -0800, Bill Kendrick wrote:
> sorry if this is a stupid question, or inappropiate for the sdl list,
> but i'm having trouble rewinding an mpeg video while it's playing back.
> 
> I tried the obvious:
> 
>   SMPEG_skip(mpeg, -5.0);
> 
> ...to try and go back 5 seconds, but that doesn't seem to do anything.
> 
> 
> So I tried the more complicated:
> 
> 
>   /* Where are we now? */
> 
>   SMPEG_getinfo(mpeg, &info);
>   cur_time = info.current_time;
> 
> 
>   /* Rewind the MPEG: */
> 
>   SMPEG_rewind(mpeg);
> 
> 
>   /* Start the MPEG back up, since SMPEG_rewind() seems to stop it: */
> 
>   SMPEG_play(mpeg);
> 
> 
>   /* Skip ahead back to where we were before we rewound... but -5 seconds: */
> 
>   SMPEG_skip(mpeg, cur_time - 5.0);
> 
> 
> 
> Any ideas?
> 
> Thanks!
> 
> 
> -- 
> bill at newbreedsoftware.com                                            Hire me!
> http://newbreedsoftware.com/bill/    http://newbreedsoftware.com/bill/resume/
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl




More information about the SDL mailing list