[Opalvoip-devel] Problems implement SDL2.0 PVideoOutputDevice
Brought to you by:
csoutheren,
rjongbloed
From: John C. <zho...@gm...> - 2016-12-19 15:52:23
|
Hi, I'm trying to implement SDL2.0 PVideoOutputDevice.I need to call SDL_UpdateYUVTexture in PVideoOutputDevice::SetFrameData. How can i get the (YUV)plane and (YUV)pitch from data? Code: PBoolean PVideoOutputDevice_SDL2::SetFrameData(unsigned x, unsigned y, unsigned width, unsigned height, const BYTE * data, PBoolean endFrame) { //TODO plane?pitch? SDL_UpdateYUVTexture(sdlTexture,sdlTect,Yplane,Ypitch,Uplane,Upitch,Vplane,Vpitch); SDL_RenderClear(sdlRenderer); SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL); SDL_RenderPresent(sdlRenderer); } SDL 2.0 API: int SDL_UpdateYUVTexture(SDL_Texture* texture, const SDL_Rect* rect, const Uint8* Yplane, int Ypitch, const Uint8* Uplane, int Upitch, const Uint8* Vplane, int Vpitch) Thanks! JohnChan |