[FFmpeg-devel] [PATCH 3/3] lavd: add opengl device

Nicolas George george at nsup.org
Mon Jan 13 10:30:23 CET 2014

Le quartidi 24 nivôse, an CCXXII, Lukasz M a écrit :
> Few comments:
> OpenGL context cannot be used across threads.
> SDL 1.2 doesn't allow to recreate context on other thread so default window
> cannot be improved (perfectly event queue should be moved to other thread).
> As far I remember  SDL_SetVideoMode and SDL_PeepEvents should be on the
> same thread.
> More important use case for me is to allow to render to context provided by
> application. In this case there is also a thread problem. It is very
> unlikely device is working on main thread so context have to be moved.
> In my own code I rebind it on avdevice_external_window_size as it is called
> in front of opengl code in both write_header and write_frame. Personally I
> think one more callback should be added like "prepare_window" or something.
> I just wonder how to make it generec, because other devices may have other
> issues that potentially should be cared by this callback too.

I believe also this code should be made more generic. This is a good
starting point, though.

> In case someone want to test rendering to external context I may provide
> code of qt client, but I don't want to post in on ML.

Maybe you could strip it to its bare bones and put it in doc/examples?

Also, what do you think of the uncoded frame API (I just sent an updated
patch series).


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140113/2270de09/attachment.asc>

More information about the ffmpeg-devel mailing list