Few "strange" things I've found for using the WMAsfWriter filter are:
1. I must query IFileSinkFilter from the filter and set the output file path
before inserting the filter into the graph. If I insert the filter first then
set the filename afterwards, the graph will fail to start.
2. Once set the file path into IFileSinkFilter, I cannot change to another
file path. If I do that (of course I stop the graph first before setting the
new output filename), then the previously encoded video file will be erased
(leaving only a few KB).
This coule mean that, in order to encode to different files, each time I
must create a new WMAsfWriter filter for a new output file, and delete the
previous WMAsfWriter filter.
I think it is completely silly. All I need to change during runtime is the
output filename. Creating a new WMAsfWriter filter consumes time (setting it
up alone will use almost 1 second), therefore losing video data unnecessarily.
I don't know if my approach mentioned above is correct. If not, could any of
you show me the correct way.
Thanks.
This is the "normal" behaviour. To write files without losing frames,
you must use techniques such as Geraint Davies' GMFBridge with
multiple backend graphs.