Waave
An audio video engine
|
There functions permit to create standard streaming objects to stream video with a sdl renderer using textures. The renderer is not cleared by the object so do it one time before start streaming.
Don't forget to reset the object and clear the renderer when the renderer's viewport is modified !
Only for SDL 2.0 or greater !
Functions | |
WVStreamingObject * | WV_getStreamRendererObj (SDL_Renderer *targetRenderer, SDL_Rect *destRect, int updateFlag) |
Get a new renderer streaming object. | |
void | WV_resetStreamRendererOutput (WVStreamingObject *streamObj, SDL_Renderer *targetRenderer, SDL_Rect *destRect) |
Change/update the renderer of a renderer streaming object. | |
void | WV_freeStreamRendererObj (WVStreamingObject *streamObj) |
Free a renderer streaming object. |
void WV_freeStreamRendererObj | ( | WVStreamingObject * | streamObj | ) |
Free a renderer streaming object.
streamObj | The released streaming object |
Free a streaming object created with WV_getStreamRendererObj. Be carefull that the streaming object pointer is not reset.
WVStreamingObject* WV_getStreamRendererObj | ( | SDL_Renderer * | targetRenderer, |
SDL_Rect * | destRect, | ||
int | updateFlag | ||
) |
Get a new renderer streaming object.
targetRenderer | The sdl renderer we use to stream video data |
destRect | The destination rectangle. The entire rendering target if NULL; |
updateFlag | Set it if you want that waave update the target surface with SDL_RenderPresent |
Create a new streaming object for a sdl renderer. Be carefull to use it only for one video stream !
void WV_resetStreamRendererOutput | ( | WVStreamingObject * | streamObj, |
SDL_Renderer * | targetRenderer, | ||
SDL_Rect * | destRect | ||
) |
Change/update the renderer of a renderer streaming object.
streamObj | The modified/updated streaming object |
targetRenderer | The new/updated renderer |
destRect | The new/updated destination rectangle. May be NULL. |
Call this function when the renderer's viewport is modified ! It's also possible to change the renderer of a streaming object without recreate it. This can be done at any time ! Even if the stream is playing.