static PyObject* movie_render_frame (PyObject* self, PyObject* args) { SMPEG* movie = PyMovie_AsSMPEG (self); SMPEG_Info info; int framenum; if (!SDL_WasInit (SDL_INIT_VIDEO)) return RAISE (PyExc_SDLError, "cannot convert without pygame.display initialized"); if (!PyArg_ParseTuple (args, "i", &framenum)) return NULL; Py_BEGIN_ALLOW_THREADS; SMPEG_renderFrame (movie, framenum); SMPEG_getinfo (movie, &info); Py_END_ALLOW_THREADS; return PyInt_FromLong (info.current_frame); }
// Render some frame of the movie void CSmpeg::RenderFrame( int frame ) { SMPEG_renderFrame( movie, frame ); if(SMPEG_error(movie) != NULL) log << WARN << "RenderFrame() error: " << SMPEG_error(movie) << endl; }