|
-
Jan 4th, 2004, 08:21 AM
#1
Thread Starter
Registered User
windows media player and monitored folders...
you know when you add new songs to a monitored folder and then you start windows media player and they get added to the media library almost instantly? how does it do that do you think?
i know how to monitor folders so it does that if the file is added to a folder while my app is running, but what about files that are added to a folder when the app isn't running?
do you think it uses a for loop and just checks every file in those folders against a database every time the app starts?
also, how exactly does wmp store all the data? it dosn't load all the tag info from the files every time it starts right???
-
Jan 4th, 2004, 08:58 AM
#2
Sleep mode
I'm not sure about the tags but if you want to monitor any changes in a folder , you should do that at the startup & before shutdown of your program . This way you make sure it adds files in both cases .
-
Jan 4th, 2004, 09:04 AM
#3
Thread Starter
Registered User
monitoring changes while my app is running is not a problem. but what about the changes that occurred before my app started? i have to make a loop and check through all files right?
-
Jan 4th, 2004, 09:09 AM
#4
Sleep mode
Yes , either you check for that every run or make little windows service that logs every new file was added and save that into a db or XML file and when you start your application , you work with logs files . The windows service would be turned on and keeps logging changes as long as the pc is running. All this happens at the back ground . Never done this before but I would try it if I were you .
-
Jan 4th, 2004, 09:38 AM
#5
Thread Starter
Registered User
i dont want to use a system process that is always monitoring... i think i'll just have to make a check when my app starts up. is there a way to call a sub and tell it to only use a little bit of processing power?
-
Jan 4th, 2004, 09:57 AM
#6
Sleep mode
is there a way to call a sub and tell it to only use a little bit of processing power?
I don't know what you mean by this !!!
-
Jan 4th, 2004, 10:01 AM
#7
Thread Starter
Registered User
in some programs that need lots of cpu for a long time you can chose the priority that they get like high medium or low.
it allows other programs running at the same time to be faster, or it just takes all the cpu to itself...
-
Jan 4th, 2004, 10:09 AM
#8
Sleep mode
Originally posted by marvinklein
in some programs that need lots of cpu for a long time you can chose the priority that they get like high medium or low.
it allows other programs running at the same time to be faster, or it just takes all the cpu to itself...
Aha , you mean threading priority . Yes , you can set a thread's priority as Low , Normal , above Normal , High ....etc . Threading priority acts like this : If set to High , then the process will be processed as urgent and will be put on the high level tasks . If set to Normal or less than Normal (not quite sure of the categories though) then the thread will be executed when there is no urgent or high level threads schedualed . Meaning when the CPU's resources are free .
-
Jan 4th, 2004, 10:12 AM
#9
Thread Starter
Registered User
yeah. that's exactly what i mean. is it hard to implement?
-
Jan 4th, 2004, 10:18 AM
#10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|