better help for the user

Steve Sisak steve.sisak at ioxperts.com
Fri Jun 3 11:05:45 GMT 2005


Hi Chris,

Thanks for getting this thread started and sorry for the slow reply 
-- things have gotten insane in preparation for being out of town for 
WWDC next week.

At 11:13 AM -0700 5/31/05, Chris Silverberg wrote:
>I'd like to try to improve my application's ability to report 
>information about available and unavailable video devices.  My 
>application is a typical video application using Sequence grabber 
>calls only, opening using OpenDefaultComponent( 
>SeqGrabComponentType, 0 ) and then opening a video channel.  Then if 
>the user wants to change their video settings I present the standard 
>QuickTime configuration window and let the user configure as 
>desired.  This all works fine when a device is available, but if a 
>device is not available, a novice user can become perplexed as to 
>why the device is unavailable.  The reasons are almost always 
>explainable... either the device is already in use by another 
>application or the device isn't working properly (say, flimsy 
>non-sheilded iSight cables).  However, these often require some 
>hand-holding...  so I'd like to be able to give the user more 
>information up front, so maybe we can avoid 50% of that hand-holding.

Assuming you're using SGSettingsDialialog(), followed by 
SGGetsettings() to save and SGSetSettings() to restore, a partial 
workaround might be to use SGGet[Set]ChannelSettings() to maintain 
the settings for each video device individually.

If you get an error on the video channel, you can switch to another 
input manually -- I need to look up how to do this, but it's not hard 
(just tedious).

Also, if you get an error, you might want to go to SGSettingsDialog() 
directly as that will force the user to select a valid input, 
avoiding the issue.

>Unfortunately, I'm not sure if I can even collect this information 
>with what Sequence grabber gives me.  In an ideal world, I show the 
>user a list of devices that the system recognizes, and their current 
>status.  For example, if the iSight is currently in use by an 
>application, I'd really like to be able to tell the user what that 
>application is.  But I'm not aware of any way to get this desired 
>information.  Does anyone have any suggestions?

Agreed. One thing I've been meaning to do (and that we could do in 
this list) is develop a "best practice" code snippet for doing this.

As an aside, I have a bunch of extensions to the vdig API that could 
make application developer's (and vdig developers) lives easier.

(I'd guess 25% of our driver code is a state machine to try and 
figure out what the SG is doing -- for instance, when you open a 
preview window with the SG, the VDIG is started and stopped 3 times)

If you look in QuickTimeComponents.h, there appear to be a set if 
calls that will give you a list of the video inputs -- I'm not sure 
how far back they are supported, but I can give you the code to 
duplicate their functionality.

I did some basic tests and they appear to do what I'd expect from the names.

Also, I expect to hear something from Apple about Core Video at WWDC 
next week -- no idea if they have a replacement for the vdig API at 
this time or not, but if they don't I'm willing to put some effort 
into defining some new calls for applications to make things less 
painful for both sides.

As far as who's got which device open -- that's more complicated as 
you can have multiple vdigs sharing the same hardware (for instance, 
when we're controlling an IIDC camera). I can certainly add a way to 
do this for IOXperts' drivers, but getting Apple to cooperate is 
another story.

More later -- I need to run out, but will continue to reply in pieces.

-Steve
-- 
_________________________________________________________________________
Steve Sisak, CTO                                 steve.sisak at ioxperts.com
IOXperts, Inc.                                     voice: +1 617 876-2572
87 Bristol St #3A                                    fax: +1 617 876-2337
Cambridge, MA 02139                               mobile: +1 617 388-6476


More information about the Video-Developers mailing list