Re: Bug in IFileSourceFilter
From: Alessandro Angeli [MVP::DigitalMedia] (nobody_at_nowhere.in.the.net)
Date: 09/29/04
- Next message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filters\Async sample with WMA?"
- Previous message: Chris P. [MVP]: "Re: Accurate position set in variable-rate mp3"
- In reply to: godofcpu: "Re: Bug in IFileSourceFilter"
- Next in thread: godofcpu: "Re: Bug in IFileSourceFilter"
- Reply: godofcpu: "Re: Bug in IFileSourceFilter"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 22:29:33 +0200
godofcpu wrote:
> Maybe my current problem has something to do with it not
> unlocking correctly since it was locked for write by one
> object and read for another? Is there a special order
> that I should be stopping things in such a case, i.e.
> stop the writer and release it before stopping the reader
> or vice versa?
I'd try to delete the file after stopping both reader and
writer and destroying both filters (either destroying the
graphs or removing the filters).
> I also found it strange that media player
> can work with wma files fine, although it does sometimes
> seem to keep a file lock on some files for unusually
> long, after it has finished playing them. I sometimes
> have to wait a bit after I have loaded a new song to
> delete the previously playing one from explorer. I also
> found other people with similar problems which made me
> think it could of been a bug
>
http://groups.google.com/groups?q=ifilesourcefilter%20close&hl=en&lr=&ie=UTF-8&sa=N&tab=wg
This thread actually makes one wonder. However, the cases
seem to be different:
- one reads a MIDI with the AsyncFileReader
- one reads a WAV with the AsyncFileReader
- one uses the WindowsMediaEncoder and who knows what filter
WME uses (but, since the poster is the same as before, it
may be a WAV read through the AsyncFileReader)
- you read a WMA with the WindowsMediaSourceFilter or the
WMASFReader (depending on how you build the graph)
I don't think the WM readers and the AsyncFileReader share
any code and it is unlikely they have the same bug (besides,
most applications run fine with them).
A note: the Explorer on XP/2003 tries to preview the file
when you select it and so it locks the file before you can
delete it and the locks lasts sometimes for seconds or
minutes, depending on the file type and size. This may
account for the difficulty deleting files from Explorer,
while it wouldn't happen when deleting the file from the
command line (which is something you could try).
Something else that may be going on behind your back is that
the graph takes a bit of time to release all its resources
and thus there may be a delay between the call to Release()
and the time when the graph actually self-destructs. If this
is the case, you may try to delete the file a few times and
see whether you succeed after a while.
-- // Alessandro Angeli // MVP :: Digital Media // a dot angeli at psynet dot net
- Next message: Alessandro Angeli [MVP::DigitalMedia]: "Re: Filters\Async sample with WMA?"
- Previous message: Chris P. [MVP]: "Re: Accurate position set in variable-rate mp3"
- In reply to: godofcpu: "Re: Bug in IFileSourceFilter"
- Next in thread: godofcpu: "Re: Bug in IFileSourceFilter"
- Reply: godofcpu: "Re: Bug in IFileSourceFilter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|