Waave
An audio video engine
|
Loading an audio or video stream in the Waave engine is done in three steps. First open a file and check it's type. Next you can set stream attributes to control the stream behavior. Finally load the stream so you can play it.
Functions | |
WVStream * | WV_getStream (const char *filename) |
Open an audio/video file and give a stream handle. | |
WVStream * | WV_closeStream (WVStream *stream) |
Close an opened stream. | |
int | WV_getStreamType (WVStream *stream) |
Get the stream type : audio, video ... | |
int | WV_getStreamWidth (WVStream *stream) |
Get the stream width. | |
int | WV_getStreamHeight (WVStream *stream) |
Get the stream height. | |
int | WV_loadStream (WVStream *stream) |
Load the stream in the Waave engine. |
WVStream* WV_closeStream | ( | WVStream * | stream | ) |
Close an opened stream.
stream | The stream you want to release |
The WV_getStream function return NULL on success, so the classic way to free a stream is :
WVStream* WV_getStream | ( | const char * | filename | ) |
Open an audio/video file and give a stream handle.
filename | The file you want to open |
To open a new stream just do a :
int WV_getStreamHeight | ( | WVStream * | stream | ) |
Get the stream height.
stream | The stream you want the height |
Return the stream width or -1 if the stream doesn't contain video
int WV_getStreamType | ( | WVStream * | stream | ) |
Get the stream type : audio, video ...
stream | The stream you want the type |
Return the stream type. Possible returned values are :
Flag value | Description |
---|---|
WV_STREAM_TYPE_NONE | Unknow stream type |
WV_STREAM_TYPE_AUDIO | An audio only stream |
WV_STREAM_TYPE_VIDEO | An video only stream |
WV_STREAM_TYPE_AUDIOVIDEO | A stream with audio and video |
int WV_getStreamWidth | ( | WVStream * | stream | ) |
Get the stream width.
stream | The stream you want the width |
Return the stream width or -1 if the stream doesn't contain video
int WV_loadStream | ( | WVStream * | stream | ) |
Load the stream in the Waave engine.
stream | The stream to load. |
Before playing a stream it need to be loaded in the Waave engine. WV_closeStream will unload it if needed.