Safe Video Input

I need a patch or plugin for my that will fix the plm as you can see from below:

2008-04-18 05:51:03.353 iBrowser[4332:10b] *** Patch class "QCVideoInput" is not allowed in safe mode 2008-04-18 05:51:03.362 iBrowser[4332:10b] *** : Failed instantiating patch with name "QCVideoInput" 2008-04-18 05:51:03.376 iBrowser[4332:10b] *** Message from : Cannot create node of class "QCVideoInput" and identifier "(null)" 2008-04-18 05:51:03.383 iBrowser[4332:10b] *** Message from : Cannot create connection from ["outputImage" @ "VideoInput_1"] to ["inputImage" @ "Billboard_2"] 2008-04-18 05:51:03.386 iBrowser[4332:10b] *** Message from : Cannot create connection from ["outputImage" @ "VideoInput_1"] to ["inputImage" @ "ImageDimensions_1"] 2008-04-18 05:51:03.387 iBrowser[4332:10b] *** State restoration failed on

I'd appreciate for your help, Roman

cwright's picture
shouldn't take long

My weekend's booked up with stuff to do, but this patch shouldn't take long at all to whip up. I'll see what I can do.

cwright's picture
Here ya go

Here's the initial prototype (only took a few minutes to whip up):

NSCocoa's picture

Thank you for this patch but It still gave me the same results because are using similar webview as Safari does so can you create a private patch or open source just for me that will work for my

[Session started at 2008-04-19 18:44:12 -0400.] 2008-04-19 18:44:14.217 iBrowser[953:10b] Found bundle:/Users/NSCocoa/Desktop/iBrowser/build/ 2008-04-19 18:44:32.973 iBrowser[953:10b] *** Patch class "QCVideoInput" is not allowed in safe mode 2008-04-19 18:44:32.987 iBrowser[953:10b] *** : Failed instantiating patch with name "QCVideoInput" 2008-04-19 18:44:33.005 iBrowser[953:10b] *** Message from : Cannot create node of class "QCVideoInput" and identifier "(null)" 2008-04-19 18:44:33.020 iBrowser[953:10b] *** Message from : Cannot create connection from ["outputImage" @ "VideoInput_1"] to ["inputImage" @ "Billboard_2"] 2008-04-19 18:44:33.036 iBrowser[953:10b] *** Message from : Cannot create connection from ["outputImage" @ "VideoInput_1"] to ["inputImage" @ "ImageDimensions_1"] 2008-04-19 18:44:33.051 iBrowser[953:10b] *** State restoration failed on

cwright's picture
should work

Unless your app bundle identifier is, it should work; my guess is that the plugin isn't installed in the correct path.

Try this movie in QuickTime. if you can see yourself, the plugin works as expected; if not, it's not properly installed.

(Make sure you open it in QuickTime, not safari.)

safeVideo.zip1.85 KB

NSCocoa's picture

1) The plugin did work as expected through a shared directory but what I did was to register it explicitly with QCPatch within my application bundle "web browser" as you can see from the error log:


//iSight.qtz Drag and drop into webView - failed... Drag and drop into icon using openFile: - failed...


   <string>Quartz Composer composition</string>

I assumed that something is wrong because of this but am I wrong?

2) Is it possible to modify the existing patch or to obtain on how it works from christopher so I can correcting it myself?

iSight.qtz2.03 KB

cwright's picture
maybe not following?

I might be misunderstanding here: Are you loading the safemidi patch? that's not going to modify video (I'm guessing you're using both?) -- if you are using both, where's the line for saveVideo?

loading qtz's as you've described shouldn't be a problem. What are you using to render the composition, a QCRenderer or a QCView? If you're using a QCView and private (bundled in the application) plugins, you'll need to add a few lines to main.m to make it load them properly in time for the QCView to honour them. Otherwise, they'll not get loaded, and it won't work correctly. If you're using a QCRenderer, can you post (or, e-mail me) some of the code around where you're loading the plugins?

The source to the safe-mode hacking plugins isn't released because I don't want everyone hacking the runtime in subtly different ways for their apps; this can easily get out of hand and cause a nightmare. Maybe I'm being a prude, or maybe I'm too tired of dealing with Linux-like geek flamewars...

cwright's picture

You may also be experiencing difficulties because you're using QCPatch to register the plugins, not GFNodeManager (or something.. can't remember off the top of my head) -- because the safe-mode hacks have to use the unofficial API, you have to have QC load them in a slightly different way. If this is the problem, I can dig up the code to load it properly; just let me know.

smokris's picture
The error log you posted

The error log you posted says "Patch class "QCVideoInput" is not allowed in safe mode" --- this means the composition you're loading is still using the old, standard Video Input patch, not the one cwright supplied.

cwright's picture

He should be using the same one; the modern safe-mode patches (midi and video) modify the existing patch, rather than subclassing to create a new one. This way the composition will gracefully work on machines without the plugin installed (unless the environment is safe mode, where it'll fail as normal). So this isn't actually a problem.

[edit: eventually I'll make safe audio input 0.2 do this as well, since I think it's a better solution overall]

smokris's picture

Oh, I hadn't realized you updated the mechanism behind the safemode-altering hack. Sweet. Yeah, that sounds like a more transparent solution.

NSCocoa, please disregard my previous comment.

cwright's picture

I did some inspection into this using NSCocoa's setup. Here's what I found:

apparently webview/quicktime manage its own QC plugin registration manager, so there's no way to disable safemode in WebViews without installing the plugins in the system location (not inside the app bundle). It's not a plugin issue, and it can't really be corrected from plugin-space (since the plugin isn't loaded at all in the webview's space, it can't do anything about it)

NSCocoa's picture
What is the correct path of

What is the correct path of system location?

cwright's picture

/Library/Graphics/Quartz Composer Patches/ for system-wide plugins, or /Users/[your name here]/Library/Graphics/Quartz Composer Patches/ for plugins for your user only.

It's important to not use "Quartz Composer Plug-Ins", since those directories are for Official-API plugins (which we don't really use or make)

NSCocoa's picture
SafeMidiPatch.plugin & SafeVideoInput.plugin

It never worked because I didn't knew that SafeMidiPatch.plugin was exists so I put in both at this time and everything did work well than I've expected!

Thank you christopher, I appreciate alot! Roman