This is all already possible, however, I've noticed that whenever you
start a new instance of the Amcap application, it doesn't do any
searching to see first if any of the cameras in the menu are already
running. Instead, it will always open up a camera that's already being
used in one of the other Amcap instances.
I have to manually select the next available camera.
I would like to change the application to look and see if a camera is
actually running, and if not, to select the next device on the list and
check it as well.
What's the easiest way to do this (to determine if a camera is already
running in a different instance of Amcap)?
Do I use the IsRunning() method from the IMoniker interface or do I
need to first have an interface to the ROT?
Thanks,
i o n a t e A T h o t m a i l DOT c o m
> I would like to change the application to look and see if a camera is
> actually running, and if not, to select the next device on the list and
> check it as well.
>
> What's the easiest way to do this (to determine if a camera is already
> running in a different instance of Amcap)?
>
> Do I use the IsRunning() method from the IMoniker interface or do I
> need to first have an interface to the ROT?
I have never heard of anyone using the IsRunning method from the IMoniker
interface but if that works it would be a good way to tell. Let us know
what you find out.
The way that has been suggested in the past is to try to add the device to
the graph and use it and if it's already being used you will get a failed
HRESULT.
Another approach would be to adapt AMCap to display all four cameras in the
same application instance (though you would still need to check if another
application is using each device that you try to use).
Follow up set to:
microsoft.public.win32.programmer.directx.video
Please do not crosspost.
See: http://tmhare.mvps.org/help.htm#cp
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Thanks for the replies.
>>The way that has been suggested in the past is to try to add the device to
>>the graph and use it and if it's already being used you will get a failed
>>HRESULT.
This is the method that I went ahead with and seems to be doing just
fine. Thanks again!
>>>The way that has been suggested in the past is to try to add the device to
>>>the graph and use it and if it's already being used you will get a failed
>>>HRESULT.
>
> This is the method that I went ahead with and seems to be doing just
> fine. Thanks again!
Great! Thanks for letting us know.