I want to modify GDLC MP4 Muxer so that
-
it will not send data to other writer but it will just record it
itself to a file data itself… -
It will be not a muxer any more…it will be a writer which have mp4 muxer…
But firstly i have to figure out, where is the last [muxed] data stay , so that i can write it to a file…
To get a playable file, i have to write the data where?
My Attempts:
I put debug info and see that it calls Append and this method call Replace periodically…I write the buffer [ BYTE pBuffer] which is given to Append method of MuxOutput .I get binary data which has some headers but not playable…So it its wrong place or i do it wrong…..Then i check what calls Append — FillSpace methos and YUVVideoHandler::WriteDescriptor… But can not able to get usefull info from other methods call Append…
UPDATE
Well, i can able to write data to file at MuxOutput::Replace method…The problem is that the header info and footer(tables at the end of file) are wrong… The other data [ payload data] is correct… The playable file which is recorded by File writer started with 00 00 00 18…[hexadecimal] but my recorded data start with 00 00 00 08 [hexadecimal]…. when i replace the mp4 header and footer parts with the file generated by the file writer using a hex editor tool, file becomes identical and plays.
What may be the problem?
In Mpeg4Mux::Pause, the MovieWriter is created with a pointer to an AtomWriter interface (in my case, implemented by the output pin by calls to the downstream file-writer filter). All writes to the file are via this interface. The data is written first, and then on stop, the index data (moov chunk) is written and the file header and data chunk headers are updated.
G