After rendering your file, use IMediaSeeking->GetPositions on the
filtergraph to get the duration of the file (= the stop position).
Then compute the start time of the first frame you need based on the
total duration and total number of frames(=total duration divided by
frame duration).
Use IMediaSeeking->SetPositions to get to the required position.
(you cannot use TIME_FORMAT_FRAME because it is usually not supported
on the mpeg2 decompressor).
Thanks, Now if the media type is MJPEP and I can seek the given frame,
but how could I get the data of the frame and write to anther file?
> Thanks, Now if the media type is MJPEP and I can seek the given frame,
> but how could I get the data of the frame and write to anther file?- Hide quoted text -
>
> - Show quoted text -
Hi, there are two main techniques to get frame data :
1) use the sample gabber (or write a transform filter that does the
same).
You insert this filter in the graph, capture the sample and write it
to file.
2) use the dump filter (or modified version) to write to file the
frames that get played.
The choice is entirey yours...
Cheers,