[FFmpeg-devel] AVfilter with changing pixel format

Michael Niedermayer michaelni at gmx.at
Tue Jun 5 03:27:19 CEST 2012


On Tue, Jun 05, 2012 at 02:53:02AM +0200, Marton Balint wrote:
> Hi,
> 
> I'm trying to fix ffplay to be able to use avfilter with changing
> input pixel format. I'm a bit confused how it should be done.
> 
> The way I see it I'm going to get a new pixel format in
> input_get_buffer callback of the codec, where I should allocate the
> necessary space for the frame by calling avfilter_get_video_buffer.
> 
> But I cannot give a custom pixel format to
> avfilter_get_video_buffer, it is always using the link pixel format.
> Wouldn't it make sense to be able to pass the pixel format as
> parameter to
>  - avfilter_get_video_buffer
>  - ff/avfilter_null_get_video_buffer
>  - avfilter_default_get_video_buffer
>  - get_video_buffer callback of AVFilterPad

yes it would make sense


> 
> Can this be done while not breaking the API? Is there another way?

one could add
avfilter_get_video_buffer2()
avfilter_default_get_video_buffer2()
for the callback of AVFilterPad iam not sure what is best, i somehow
suspect there are very few users who directly access call or set
this function ptr from outside

also maybe nicolas has some comments ...


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120605/9debbb1d/attachment.asc>


More information about the ffmpeg-devel mailing list