[SDL] SMPEG: playing back MPG in pak-like container
davidkment at web.de
Tue Jun 28 03:51:44 PDT 2005
thanks a lot for the help.
i will look into it.
with best regards,
"A list for developers using the SDL library. \(includes SDL-announce\)" <sdl at libsdl.org> schrieb am 27.06.05 19:45:21:
> > sounds good. are there any tutorials on coding with SDLRWOPs?
> With rwops, you basically fill in four functions: seek, close, read, and
> write for your archive type (and write can just fail if this is
> read-only...seek may not be used by smpeg, either), and then smpeg will
> do all its i/o through those functions, which means you can make a
> single file in an archive visible to the library.
> Here's how PhysicsFS (a generic archive processing library) does it:
> create_rwops() sets up the structure with the function pointers; the
> return value from that would be what you give to SMPEG_new_rwops(). The
> other functions (physfsrwops_close(), physfsrwops_read(), etc) are the
> functions that make up the rwops structure. Obviously, "PHYSFS_File"
> would be a pointer to whatever data your specific archive code needs.
> zziplib (another library like PhysicsFS) did something almost identical:
> Overall, it's really just a little bit of glue code. Internally, SMPEG
> uses rwops for all cases...if you give it a filename, it'll create a
> rwops that uses fread(), fclose(), etc, so you're not really even
> looking at a wildly different codepath through the library when you're done.
> Good luck,
> SDL mailing list
> SDL at libsdl.org
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179
More information about the SDL