On Thu, Dec 22, 2011 at 6:12 AM, Jeff Shanab <jsha...@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.
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel