Menu

#8 PlayWnd Sample File In Use

v1.0_(example)
closed
nobody
Samples (12)
5
2012-10-29
2006-04-18
No

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.

Discussion

  • snarfle

    snarfle - 2006-04-18

    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?

     
  • Jonathan Liu

    Jonathan Liu - 2006-04-18

    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:

    1. Run PlayWnd.exe
    2. Open and play an MP3 file at say C:\SomeFolder\test.mp3
      using File -> Open Clip
    3. File -> Close Clip
    4. Move C:\SomeFolder\test.mp3 to C:\test.mp3. You get the
      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.

     
  • snarfle

    snarfle - 2006-04-21

    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.

     
  • SourceForge Robot

    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).

     

Log in to post a comment.

MongoDB Logo MongoDB