get_buffer/release_buffer vs. get_image/mpi

Arpi <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
Hi,

I've spent some time thinking on the $SUBJ, but i finally found a small
issue being a show-stopper: releasing teh buffer.
I don't really understand/knwo how is it done in ffmpeg (Michael?) but
I see it as a big issue in our codec/filter layer:
Ok, you do get_buffer() at any time (init or decode), and when filled by
content (decoded video) you return it to caller. But when and where will
it be released? The codec cannot release it, as it have to return it to
caller and the caller will use its content. The caller can't release it,
as it don't know about the allocators future plans (maybe its used as
reference frame...)
Maybe some kind of reference counters could help there, but it adds extra
complexity, while my primary goal was simplify the buffering code.

So i've decided to keep the mpi stuff for now, maybe we'll check get/release
thingie again at g3 :)

But i still have some idea, by simplifying mpi a bit (remove _IP and _IPB
types, and the one-get_image-per-one-decode-call restriction) but keep
the current per-filter allocation and release-at-uninit implementation.
But i'm not even sure it worth the mess.


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.