Avnish
Guest
|
Posted:
Thu Sep 16, 2004 2:43 pm Post subject:
ASF File duration |
|
|
Hi,
I have created a Filter that acts like asf writer but the difference is it
switches files.
My graph goes like this:
Capture Source-----> My Timestamp Filter (Transform Filter)----> My ASF File
writer.
The filter uses Windows Media Format for writing the ASF file.
Lets say the writing process is done by a class name CEncode. This class has
a sink that actually writes to file.
In the Filter, I create two instances of CEncode class and start writing to
first one.
As soon as the desired number of video frames are written(1 min file we have
1500 frames in pal) I start writing to the other instance of the CEncode
class and previous one I close previous sink and reopen a new sink.
I have instructed the capture device to provide audio sample at a time of 40
millisecond.
Now when a file is created, I get the video stream length through IMediaDet,
that some times gives me
1500, 1502, 1499, etc.
I am passing the timestamps that are coming to me through Capture device.
If I do provide the writer timestamps from zero every time it switches then
audio/video goes out of sink.
Avnish.
|
|