Jump to content

Can I detect if Media Browser is playing content?


Silver

Recommended Posts

Hi,

 

Is there any way I can detect in my external program whether or not a video being played is using Media Browser rather than the internal WMC player (for WTV content)?

 

My gut feel was to check is ffdshow was running, but that doesn't appear on the task list.

 

Before I go hunting for other possible process names, is there a much easier way to do this?

 

Thanks!

Link to comment
Share on other sites

Unless you specify an external one, we use the internal WMC player so there really isn't any difference.

 

What are you actually trying to accomplish?

Link to comment
Share on other sites

It kind of ties into this question. In short I've remapped the >| and |< keys to go via a program I've build which then does some logic before passing keypresses to WMC.

 

The problem is that the jump forward/backwards X seconds keypresses between playing WTV and DVR-MS files and playing every other format is completely different.

 

So when I press >|, I cannot get my app to send 500[ctrl][shift]F because although it works for WTV and DVR-MS files, it goes completely nuts with all other formats.

 

My first thought was to check if FFDShow is running, as that would indicate whether or not non-MS files are being used - but I'm not sure if there is a better solution.

 

Was hoping you might have a genius idea :)

Edited by Silver
Link to comment
Share on other sites

So, you don't really need to know if MB is playing something - you need to know what type of content is playing or, rather, what codecs are involved.

 

I'm afraid I don't have any good ideas other than to call over our codec/playback expert - @@babgvant.

Link to comment
Share on other sites

babgvant

So to be clear, you want to know if a file is playing in WMC? Then know what the container of that file is?

Link to comment
Share on other sites

That would be perfect, yes.

 

Failing that, I'd like to know if a file being played is using ffdshow or not.

 

My initial thought was to look at the processes running but unfortunately there isn't any difference in the output of tasklist /svc between playing a WTV file (through MB) and playing a non-WTV file (through MB) - even though ffdshow is showing in the system tray in the latter case.

 

Any help you can give would really be appreciated!

Link to comment
Share on other sites

babgvant

ffdshow (like all DS filters) is a COM object. It won't show in the process list.

 

First thing I'd check is to see if ffdshow publishes itself (or the graph) to the ROT (you may need to regsvr32 proppage.dll for this to work, so don't give up until you've checked that).

 

Baring that, you can write a WMC addin that can check the metadata to see what the current file path is. This is quite a bit more complex than it sounds. The DTBAddin does this, so I'd say it's the best place to start if you want to know how to do that.

Link to comment
Share on other sites

Tranquil

If you use ffdshow you can easily communicate with it by sending messages to the window handle of ffdshow. I use it for my frame rate changer and it is working like charm.

Link to comment
Share on other sites

  • 2 weeks later...

Perfect, thanks for all your help.

 

In the end I looked for ffdshow_remote_class and if I could get a hWnd then I knew that ffdshow was running.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...