[FFmpeg-devel] [PATCH 2/5] ffmpeg: use the write_uncoded_frame() API.
michaelni at gmx.at
Sun Jan 26 20:42:26 CET 2014
On Sun, Jan 26, 2014 at 07:59:00PM +0100, Nicolas George wrote:
> Le septidi 7 pluviôse, an CCXXII, Lukasz Marek a écrit :
> > I don't understand what you mean by "the API should be just that" :)
> The user puts a pointer to the AVFrame in AVPacket.data. That is risky,
> since AVFrame can not be simply copied (refcounting) and do not behave like
> a normal packet payload, and that is why I do not like it.
no, the user is never allowed to cast AVPacket.data to or from a AVFrame
any such cast in user code is a design flaw somewhere
The user provides a AVFrame to an encoder and the (raw) encoder
would do the magic encapsulation of the AVFrame into a AVPacket
If a user wants to send a AVFrame directly to a muxer then this
would call the uncoded_frame API which takes a AVFrame and this would
then do the magic encapsulation if needed (thats identical your API)
(strictly speaking the uncoded frame API could call the rawvideo
encoder or share code with it to do it)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel