[Live-devel] Live555 EventLoop crash
Jeremy Noring
kidjan at gmail.com
Thu Dec 22 09:45:00 PST 2011
On Thu, Dec 22, 2011 at 6:12 AM, Jeff Shanab <jshanab at smartwire.com> wrote:
> Above the live 555 libs I have my own frame class. It is a simple RAII
> data class with payload, a bit of byte alignment, and some metadata like
> size and type. I use a reference counted pointer to this. This allows my
> multiple subscribers to keep lists of pointers to frames, they each have
> their own list and not worry about memory management and there is minimal
> memcopying around.
>
I do this as well--all of our media data is reference counted to prevent
multiple copies of the same sample. That said, my embedded processor is
slow enough that even a final memcpy into Live555's buffers show up in
profiling.
> Another important detail is this makes sure he who created the memory
> deletes the memory. This is to keep windows happy, If memory is allocated
> in one heap and attempted to delete it from code running in a different
> heap, windows throws an access violation, especially in debug mode!
>
I had considered this. For Live555's event-driven model, you'd need a
function that gets called when Live555 is done with a sample so the calling
application can appropriately free the memory.
In any event, this isn't sounding like it'd be a simple or straight-forward
thing to add to Live555, so....not much to discuss.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111222/098bdebb/attachment.html>
More information about the live-devel
mailing list