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

Lukasz M lukasz.m.luki at gmail.com
Mon Jan 13 13:13:20 CET 2014


On 13 January 2014 10:30, Nicolas George <george at nsup.org> wrote:

> 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.
>

What do you mean exactly?


>
> > 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?
>

I will prepare some example later.


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

I have no remarks for the API and I'm waiting for merge.
Implementation (patches 1 and 2) should be reviewed by someone else anyway.


More information about the ffmpeg-devel mailing list