c - SDL2.0 Alternative for SDL_Overlay -
so i've been trying go through following tutorial on ffmpeg: http://dranger.com/ffmpeg/tutorial02.html
however, when try compile using gcc, following output:
root:/users/mbrodeur/downloads/hackathon content/tutorials-> gcc -o tutorial02 tutorial02.c -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale -d_thread_safe -lsdl2 tutorial02.c: in function ‘main’: tutorial02.c:41: error: ‘sdl_overlay’ undeclared (first use in function) tutorial02.c:41: error: (each undeclared identifier reported once tutorial02.c:41: error: each function appears in.) tutorial02.c:41: error: ‘bmp’ undeclared (first use in function) tutorial02.c:98: warning: assignment makes pointer integer without cast tutorial02.c:110: error: ‘sdl_yv12_overlay’ undeclared (first use in function)
now, read sdl_overlay no longer used in sdl2, therein lies problem. i've been poking around, can't seem find helpful. there replacement sdl_overlay? necessary?
sdl_overlay used in following context:
sdl_overlay *bmp; bmp = sdl_createyuvoverlay(pcodecctx->width, pcodecctx->height, sdl_yv12_overlay, screen);
try sdl_createtexture()
yuv pixel format matches layout , planar-ity of decoded frames.
or use libswscale
convert ffmpeg
's yuv buffers rgb.
edit: sdl2 >= 2.0.1 has sdl_updateyuvtexture()
updating planar yuv textures don't have manually coalesce libav
's buffers more.
Comments
Post a Comment