File sources and seeking...
- From: "Weeb" <Weeb@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Apr 2005 09:41:16 -0700
Hi,
First off let me say I am new to Directshow. Here is what I need to do. I
need to play multiple sections, (segments perhaps), out of one MPEG file.
This needs to happen in a 'playlist' style where one clip is played and
seamlessly followed by another clip. This needs to be as frame accuate as
possible. Sometimes the in and out points of one clip will be in a different
file then the next, but for simplicity lets assume they are all from the same
file.
What I have done is created two graphs and modified the async file source
filter to allow sharing of the source file. These two graphs alternate, each
seeking the next points to be played out. At the end of these graphs are
VMR9s with a custom allocator/presenter provided by me. By setting the
positions with IMediaSeeking interface and catching the EC_COMPLETE event,
since for some reason I cannot get the EC_END_OF_SEGMENT event even with the
proper flags set on the SetPositions call, I can simply run the other graph
and switch the z-order of the graphs and get a visually seamless switch.
I have noticed a couple of things when doing some testing and I have a
problem yet to be solved. First thing I notice is that if I do a simple test
where one graph starts and switches to the second at the said event it works
fine when the source files are different, but if they are the same there is a
bit of struggle, or flicker when the switching takes place. Almost as if it
is more CPU intensive when the source filters share the same file. I don't
know why because it is my understanding that the entire file is loaded into
memory, so in effect this shouldn't matter, but it does and I need to solve
it.
Secondly, the files I will be dealing with in the future are not going to be
able to be loaded into memoy easily, 2-3 gigs. So I have a problem where I
would like to only load what I need from the file into the source filter. If
I know the in and out points of the segment is there some way to identify
what to load and only load that section? I am not sure what to expect in an
MPEG file, can this be done?
.
- Follow-Ups:
- Re: File sources and seeking...
- From: Iain
- Re: File sources and seeking...
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: File sources and seeking...
- Prev by Date: Re: Combining bitmaps?
- Next by Date: Re: GMFBridge and Video Mixing Renderer 9
- Previous by thread: Filter with dynamic format change.
- Next by thread: Re: File sources and seeking...
- Index(es):
Relevant Pages
|