Re: What causes the CDROM's playlist to reset?
- From: "Dean Roddey" <droddey@xxxxxxxxxxxxxxxx>
- Date: Sun, 3 Sep 2006 21:48:13 -0700
Just a little followup... If I put separate CDs in my two different drives,
I can flip back and forth and it works fine. But if I swap out one of the
CDs in one of the drives, it stays on the previously seen metadata. So I'm
just completely at a loss. I've wasted a whole day on this one thing and
made no progress at all.
What's wierd is that the MPML sample seems to be able to do this without
problems. But it's not a good example since it doesn't allow you to select
drives. It only works on whichever drive is set up as the current playlist.
But if you click off the Now Playing and back onto it, it'll pick up the new
metadata for a newly inserted CD, and it seems to do nothing to make this
happen. It just gets the current playlist from the player and the new stuff
is there.
The only thing I can see different is that it creates a player and keeps it
around for the length of the program. I'm doing the metadata gathering in a
background thread, so I create a new player for each invocation. Because of
the (stupid IMHO) thread specific nature of COM objects, I don't think I can
create one in the main thread and pass it off to be processed by each new
thread that I spin up to gather metadata, can I? And if I did, would that be
likely to have anything to do with this? I.e. is the sample working because
the player is always there and sees the drive change, whereas in my scenario
it does not because it gets created each time?
But why does the CDROM object retain the old data across completely
different invocations? All of teh player and CDROM and CDROM collection
objects and everything else is completely released between invocations, but
the CDROM has the old metadata when the next invocation is done, and doesn't
ever seem to change.
I guess I could do a long background thread timeout, and open and then close
the CD drawer while the player is alive, but before I get the playlist form
the CD object, just as a sanity check to test this theory.
-------------------------------------
Dean Roddey
Chairman/CTO, Charmed Quark Systems
www.charmedquark.com
"Dean Roddey" <droddey@xxxxxxxxxxxxxxxx> wrote in message
news:OBvndh7zGHA.4976@xxxxxxxxxxxxxxxxxxxxxxx
I'm stuck on this issue. I'm getting some metadata via the WMP SDK. The
sequence of events is:
1. Get a Core object
2. Get the CDROM list from the core
3. Find the drive of interest in the CDROM list
4. Get the playlist out of the CDROM object selected
5. Set that playlist on the Core object (auto-play off.)
If you then pump messages for a bit, the metadata will show up in the
playlist of the Core object after a while. That works fine. I then clean
up the player and all the other objects involved and I'm done for that
round.
.
- Follow-Ups:
- Re: What causes the CDROM's playlist to reset?
- From: Dean Roddey
- Re: What causes the CDROM's playlist to reset?
- References:
- What causes the CDROM's playlist to reset?
- From: Dean Roddey
- What causes the CDROM's playlist to reset?
- Prev by Date: What causes the CDROM's playlist to reset?
- Next by Date: Re: What causes the CDROM's playlist to reset?
- Previous by thread: What causes the CDROM's playlist to reset?
- Next by thread: Re: What causes the CDROM's playlist to reset?
- Index(es):
Relevant Pages
|