<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<c74object category="Jitter Generators, Jitter QuickTime" module="jit" name="jit.qt.grab" kind="fakeobject">
	<digest>
		Digitize video from an external source
	</digest>
	<description>
		Use the <o>jit.grab</o> object to digitize video from any video digitizer and decompress the signal into a Jitter matrix. On OSX, QuickTime is used; on Windows, DirectX is used.
	</description>
	<discussion>
		<o>jit.grab</o> also offers a grab-to-disk mode. Although numerous parameters for control are offered, not all features are supported by all digitizers.
	</discussion>
	<!--METADATA -->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			camera
		</metadata>
	</metadatalist>
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				bang, messages in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				bang, messages in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!-- ===================================================
            MOP
   =================================================== -->
	<mop matrixinputcount="1" matrixoutputcount="1">
		<matrixoutput dimlink="1" maxdimcount="32" maxplanecount="4" mindimcount="1" minplanecount="4" name="out" planelink="1" typelink="1">
			<types>
				char
			</types>
		</matrixoutput>
	</mop>
	<!-- ===================================================
            ATTRIBUTES
   =================================================== -->
	<attributelist>
		<attribute get="1" name="adapt" set="1" size="1" type="int">
			<digest>
				Adapt output matrix dimensions to native device dimensions.
			</digest>
			<description>
				Adapt output matrix dimensions to native device dimensions. Enabled by default if no <at>dim</at> specified.
			</description>
			<attributelist>
				<attribute get="1" name="style" set="1" size="1" type="symbol" value="onoff" />
			</attributelist>
		</attribute>
		<attribute get="1" name="automatic" set="1" size="1" type="int">
			<digest>
				Enable automatic matrix output.
			</digest>
			<description>
				Enable automatic matrix output when bound to <o>jit.world</o>.
			</description>
			<attributelist>
				<attribute get="1" name="style" set="1" size="1" type="symbol" value="onoff" />
			</attributelist>
		</attribute>
		<attribute get="1" name="colormode" set="1" size="1" type="symbol">
			<digest>
				Color encoding for output matrix
			</digest>
			<description>
				The output matrix's color encoding (default = argb)
			</description>
			<attributelist>
				<attribute get="1" name="enumvals" set="1" size="2" type="atom">
					<enumlist>
						<enum name="argb">
							<digest>
								ARGB (alpha, red, green, blue) colormode
							</digest>
						</enum>
						<enum name="uyvy">
							<digest>
								UYVY (YUV 4:2:2 packed) colormode
							</digest>
						</enum>
					</enumlist>
				</attribute>
				<attribute get="1" name="style" set="1" size="1" type="symbol" value="enum" />
			</attributelist>
		</attribute>
		<attribute get="1" name="drawto" set="1" size="1" type="symbol">
			<digest>
				Render context name
			</digest>
			<description>
				A render context name, used when <at>output_texture</at> is enabled.
			</description>
			<attributelist />
		</attribute>
		<attribute get="1" name="dstrect" set="1" size="4" type="int">
			<digest>
				The portion of the output matrix used for decompressing media to the internal matrix. (default = 0 0 (matrix width)
			</digest>
			<description>
				The portion of the output matrix used for decompressing media to the internal matrix. (default = 0 0 (matrix width) (matrix height))
				<br />
				The proportions of the rectangle are expressed in the form <i>left top right bottom</i>. All values are relative to the top left corner of the viewing area of the output matrix.
			</description>
		</attribute>
		<attribute get="1" name="engine" set="1" size="1" type="symbol">
			<digest>
				Video engine backend.
			</digest>
			<description>
				Video engine backend. This argument can only be set in the max box. If not specified, it is determined by the Video Engine Max preference. As of this writing, possible values include <ar>avf</ar> (Mac only), <ar>qt</ar>, and <ar>viddll</ar>.
			</description>
		</attribute>
		<attribute get="1" name="framerate" set="1" size="1" type="float">
			<digest>
				Video digitizer frame rate
			</digest>
			<description>
				The video digitizer frame rate (default = digitizer-specific).
				<br />
				The digitizer has to be closed and re-opened before changes to <at>framerate</at> take effect.
			</description>
		</attribute>
		<attribute get="1" name="framereport" set="1" size="1" type="int">
			<digest>
				Frame reporting flag
			</digest>
			<description>
				Frame reporting flag (default = 0)
				<br />
				When enabled, the message <m>framecalc</m> will be sent from the rightmost outlet of the <o>jit.grab</o> object as each frame is processed, followed by the number of milliseconds spent doing so.
			</description>
		</attribute>
		<attribute get="1" name="input" set="1" size="1" type="int">
			<digest>
				Current video digitizer input
			</digest>
			<description>
				The current video digitizer input (default = digitizer-specific)
			</description>
		</attribute>
		<attribute get="1" name="interp" set="1" size="1" type="int">
			<digest>
				Image interpolation flag
			</digest>
			<description>
				Image interpolation flag (default = 0)
			</description>
		</attribute>
		<attribute get="1" name="output_texture" set="1" size="1" type="int">
			<digest>
				Enable OpenGL texture output
			</digest>
			<description>
				Enable OpenGL texture output (default = 0). When enabled an OpenGL texture is output instead of a Jitter matrix. The object's <at>drawto</at> attribute must be set to a valid gl context. An RGBA texture is output using the movie's native dimensions. When enabled, the following attributes have no effect:
				<br />
				<at>adapt</at> 				<br />
				<at>colormode</at> 				<br />
				<at>dim</at> 				<br />
				<at>dstrect</at> 				<br />
				<at>srcrect</at> 				<br />
				<at>usedstrect</at> 				<br />
				<at>usesrcrect</at> 
			</description>
			<attributelist>
				<attribute get="1" name="style" set="1" size="1" type="symbol" value="onoff" />
			</attributelist>
		</attribute>
		<attribute get="1" name="srcrect" set="1" size="4" type="int">
			<digest>
				Source rect from digitizer frame
			</digest>
			<description>
				Source rect from digitizer frame (default = 0 0 (matrix width) (matrix height))
			</description>
		</attribute>
		<attribute get="1" name="texture_name" set="1" size="1" type="symbol">
			<digest>
				Output texture name
			</digest>
			<description>
				Output texture name, when <at>output_texture</at> is enabled.
			</description>
			<attributelist />
		</attribute>
		<attribute get="1" name="unique" set="1" size="1" type="int">
			<digest>
				Unique frame filter flag
			</digest>
			<description>
				Unique frame filter flag (default = 0 (disabled))
				<br />
				When the flag is set, only new frames from the digitizer are output when the object receives a bang. If no new frame has been received from the digitizer, the <o>jit.grab</o> object will not respond to the bang.
			</description>
		</attribute>
		<attribute get="1" name="usedstrect" set="1" size="1" type="int">
			<digest>
				Destination rect flag
			</digest>
			<description>
				Destination rect flag (default = 0) When the flag is set, the <at>dstrect</at> attributes are used when copying an input matrix to the internal matrix.
			</description>
		</attribute>
		<attribute get="1" name="usesrcrect" set="1" size="1" type="int">
			<digest>
				Source rect flag
			</digest>
			<description>
				Source rect flag (default = 0) When the flag is set, the <at>srcrect</at> attributes are used when copying an input matrix to the internal matrix.
			</description>
		</attribute>
		<attribute get="1" name="vdevice" set="1" size="1" type="int">
			<digest>
				Current video digitizer
			</digest>
			<description>
				The current video digitizer (default = 0)
			</description>
		</attribute>
		<attribute name="format" get="1" set="1" type="int" size="1">
			<digest>
				Format
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Format" />
			</attributelist>
		</attribute>
	</attributelist>
	<!-- ===================================================
            METHODS
   =================================================== -->
	<methodlist>
		<method name="close">
			<digest>
				Close an open sequence grab component
			</digest>
			<description>
				Closes an open sequence grab component. The component is automatically closed when the object is freed.
			</description>
		</method>
		<method name="exportimage">
			<arglist>
				<arg name="filename" type="symbol" />
				<arg name="file-type" type="symbol" />
			</arglist>
			<digest>
				Export the current frame as an image file
			</digest>
			<description>
				Export the current frame as an image file with the name specified by the first argument. The second argument sets the file type (default = png). Available file types are <m>png</m>, <m>tiff</m>, and <m>jpeg</m>.				<br />
				You can use the Max Preferences to <link anchor="defaultimageresolution" module="core" name="interface_preferences" type="vignette">specify a default image resolution</link> for png image types.
			</description>
		</method>
		<method name="getinputlist">
			<digest>
				Report all video digitizer inputs
			</digest>
			<description>
				Reports the list of available inputs to the video digitizer from the object's right outlet, preceded by the word <m>inputlist</m>. Note that the digitizer must be <m>open</m> in order for this method to function.
			</description>
		</method>
		<method name="getvdevlist">
			<digest>
				Report all available video digitizers
			</digest>
			<description>
				Reports the list of available video digitizers from the object's right outlet, preceded by the word <m>vdevlist</m>.
			</description>
		</method>
		<method name="open">
			<digest>
				Open a sequence grab component
			</digest>
			<description>
				Opens a sequence grab component. A component must be explicitly opened before the <o>jit.grab</o> object will began digitizing.
			</description>
		</method>
		<method name="int">
			<arglist />
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
	</methodlist>
	<!-- ===================================================
            EXAMPLE
   =================================================== -->
	<examplelist>
		<example img="jit.grab.png" />
	</examplelist>
	<!-- ===================================================
            SEEALSO
   =================================================== -->
	<seealsolist>
		<seealso display="jit.movie" name="jit.qt.movie" />
		<seealso display="jit.record" name="jit.qt.record" />
		<seealso module="jit" name="jitterchapter21" type="tutorial" />
	</seealsolist>
</c74object>
