Results 1 to 10 of 10

Thread: windows media player and monitored folders...

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283

    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???

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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 .

  3. #3

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    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?

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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 .

  5. #5

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    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?

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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 !!!

  7. #7

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    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...

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    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 .

  9. #9

    Thread Starter
    Registered User
    Join Date
    Jul 2001
    Posts
    283
    yeah. that's exactly what i mean. is it hard to implement?

  10. #10
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    No , threading in general in .NET is easy . It seems you're just posting here but you never read tutorials or articles . I mean you should read and get some background before involving into such projects. .........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width