libmng data-push mechanism(s)
"Gerard Juyn" <gjuyn-qWit8jRvyhVmR6Xm/[email protected]> Thu, 8 Apr 2004 21:57:27 +0200
| Newsgroups | gmane.comp.graphics.mng.general |
|---|---|
| Organization | Triple-T |
| Message-ID | <4075CAC7.6439.58255AD5@localhost> |
Alex & Ralph, The data you're wanting to push into libmng is obviously in some memory- buffer. The first question is: how volatile is that buffer? If it remains available for the lifetime of the animation great. But I doubt if that's the case. So the second question is: can onwership of this buffer be relinquished? Eg. can libmng take ownership of the buffer and perform the free() call? If so it could save a buffer-copy operation (which Ralph seemed anxious about, and for good reasons of course). But I *will* have to buffer the data inside libmng until it (libmng) is ready to read some more. Changing the whole reader-mechanism is pretty much beyond the scope of the current excercise. If libmng can take ownership of your buffer the costs are negligable. Otherwise the whole P/M/JNG stream will be copied in memory at least once just for the pushing to work. It is again (but only the useful stuff) copied inside libmng into more suitable buffers for playback (unless the caching has been turned off by the App or with a nEED "CACHEOFF" chunk; the latter specifically for video-like MNG- streams with no LOOP/TERM). Of course I can also offer both methods (for reasons of flexibility) where in the one case ownership is transferred and in the other the buffer gets copied to a new one. That way you (and the next guy on the block) could decide which method would suite your needs best. All in all I think it shouldn't be more than a couple of hours of work. The key issue will be when these hours will be floating past with nothing more pressing to fill them with... Gerard -- Send the message body "help" to [email protected]