PlayWnd Sample File In Use
DirectShow programming library for .Net programmers
Brought to you by:
snarfle
I just wanted to report an issue I found with the
PlayWnd sample (and all of my projects that use your
library). After opening a file, playing it and then
closing it in PlayWnd, I try to move the file but it
says the file is in use. I am thinking it has something
to do with Garbage Collection since if I open another
file in PlayWnd, I can move the file that was
previously in use.
I was just wondering if there was a way to get around
this so that the file is closed immediately when the
interfaces are released.
DirectShow samples on the internet for C and Visual
Basic 6 do not have this issue. Also, Windows Media
Player and Media Player Classic (with all built-in
filters turned off) do not have this issue.
Logged In: YES
user_id=1220080
I have just tried this, and I'm not seeing the symptoms
you describe.
Using PlayWnd, if I open a file, it plays in a loop over
and over. If I attempt to delete the file while playing,
it fails (as I would expect). If I choose File/Close
Clip, then I can delete the file.
Perhaps you could provide more details?
Logged In: YES
user_id=831373
Yes, this problem depends on what DirectShow filter you are
using. I am using DS-MP3 Source filter from
http://www.dsp-worx.de/?n=9 as a source filter for MP3 playback.
I took the following steps to reproduce this problem:
using File -> Open Clip
following error:
MessageBox Title: Error Copying File or Folder
MessageBox Icon: Critical
MessageBox Text: "Cannot copy test: It is being used by
another person or program.\n\nClose any programs that might
be usin the file and try again."
MessageBox Buttons: OK
This seems to be dependant on how the DirectShow filter is
written but this problem seems to occur with .NET programs only?
If you want to confirm whether the the file is still in use
another way, you can check to see if there is a file handle
still open to the MP3 file right after you close the MP3
file in PlayWnd using Process Explorer from
http://www.sysinternals.com/Utilities/ProcessExplorer.html.
Logged In: YES
user_id=1220080
net147 actually discovered the problem here. PlayWnd had
a bug when playing audio-only files.
Eric provided the fix, which will be included in v1.4. In
CloseInterfaces, instead of checking if videoWindow is
null, we now check if (!this.isAudioOnly).
My contribution is resolving the bug.
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).