Open GoogleCodeExporter opened 9 years ago
Well the simple way to get anything is to write it yourself and provide a
patch. Also, I'd point out you don't need to lock up the UI while the optimize
call is happening; you shouldn't be calling MP4Optimize on your GUI thread.
Call it on a separate thread, then send a signal/fire an event/set a watch
variable/etc. once it's one.
Original comment by jnor...@logitech.com
on 8 Sep 2011 at 2:24
If I were familiar with your API and remembered anything about C++ I
would...but I'd end up breaking things rather than helping.
Original comment by Scott.Gr...@gmail.com
on 8 Sep 2011 at 8:38
Hi, I made a simple implementation which does iterative copy of mdat.
This is just "iterative", not "asynchronous".
In this implementation, a class named MP4FileCopy does the copying job.
It does almost the same with MP4File::MP4Optimize(), in iterative manner.
Basically it works like the following:
MP4FileCopy::start(): -> Write moov with BeginOptimalWrite()
MP4FileCopy::copyNextChunk(): -> Copy next chunk in mdat (in timestamp order).
Similar to RewriteMdat(), but copy only one chunk.
MP4FileCopy::finish(): -> Fix moov with EndOptimalWrite()
This class does nothing about temporary file handling, therefore you have to
wrap around this if you write back the result. However, it would be fairy easy.
I use dirty trick here to access MP4File's protected member from this class.
If this is implemented officially, it could be written in more cleaner and
saner say.
Also, MP4File::Optimize could be re-implemented based on this.
Original comment by honeycom...@gmail.com
on 13 Sep 2011 at 4:08
Attachments:
Original comment by kid...@gmail.com
on 19 Mar 2012 at 3:01
Original issue reported on code.google.com by
Scott.Gr...@gmail.com
on 8 Sep 2011 at 3:47