I was browsing around some cool CI kernel demos on sam's blog -
congrats by the way :) http://www.samkass.com/blog/C1936590049/
and many of them requires a video input - I've seen some other
compositions on the web do the same. Problem is that, if the camera
is not connected or use by another app, you get no feedback at all,
which can be strange to the user, so here's a trick:
Use a multiplexer (with its type set to Images in the Settings
Inspector pane) to choose between the image coming from the video
camera and a text image saying for instance "you need a video camera
- please sure one is connected and no other application uses it".
Now, all we need to do is to select one or the either depending on
weither the video camera is available or not.
The multiplexer expects an Index value to select its current input
and we cannot directly connect an image to an index input. However,
an image can be converted to a Boolean: True if it exists, False if
it does not, and a Boolean can be converted to an index: False -> 0
and True -> 1 (you still with me?). So just insert a Splitter (with
its type set to Boolean in the Settings Inspector pane) and off you go:
If the Video Input patch produces images, the Splitter outputs True,
and the Multiplexer selects input #1 which is the video. If the Video
patch does not produce any imags, the Splitter outputs False and the
Multiplexer selects input #0 which is our placeholder image.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden
This email sent to email@hidden