[FFmpeg-devel] [PATCH 8/9] ffplay: move video filtering graph in the VideoContext

Marton Balint cus at passwd.hu
Tue Jun 26 00:45:31 CEST 2012



On Mon, 25 Jun 2012, Stefano Sabatini wrote:

> On date Saturday 2012-06-23 12:47:46 +0200, Marton Balint encoded:
>>
>> On Fri, 22 Jun 2012, Stefano Sabatini wrote:
>>
>>> Make room for some factorization, improve consistency.
>>
>> I'm actually not a big fan of moving stuff into VideoState. Graph is
>> a video thread local variable. Also allocating and freeing it in the
>> same function is probably better than hiding the allocation inside
>> configure video filters. If we use the videoState variables
>> everywhere it will make to code less reusable.
>>
>> So I'd rather not change this only to make it consistent with audio.
>> Maybe making audio consistent with this should be the goal. Or is
>> there a place where this version has some real advantage?
>
> The video graph context is only accessed inside the video_thread(),
> where it is also destroyed. On the other hand the audio context can be
> handled inside a single function (there is nothing like video_thread()
> for audio), so we need to reference it in stream_component_close(), so
> we need to access it from the global VideoState (that should be rather
> named PlayerContext), and it looked weird to have an agraph but not a
> graph (for a simple question of simmetry).
>
> But I'm fine with the latter if you prefer that.

Yes, thanks.

Regards,
Marton


More information about the ffmpeg-devel mailing list