home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / oodleutl.cpt / oodles-of-utils / MCLs-funniest-home-videos / video-digitizers / RO24STV-vd.lisp < prev    next >
Encoding:
Text File  |  1992-02-05  |  17.9 KB  |  502 lines

  1. (in-package :oou)
  2. (oou-provide :RO24STV-vd)
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;; RO24STV-vd.Lisp
  5. ;;
  6. ;; Copyright ⌐ 1990 Northwestern University Institute for the Learning Sciences
  7. ;; All Rights Reserved
  8. ;;
  9. ;; author: Michael S. Engber
  10. ;;
  11. ;; video digitizer object for controling RasterOps 364 video digitizer boards
  12. ;; Note: 24STV boards require access to a resource file containing their driver.
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14.  
  15. (oou-dependencies
  16.  :RO-vd
  17.  :+Devices
  18.  :Records-u
  19.  :Traps-u
  20.  :Resources-u
  21.  )
  22.  
  23. (export '(RO24STV-vd
  24.            ))
  25.  
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27.  
  28.  
  29. (eval-when (:compile-toplevel :load-toplevel :execute)
  30.   (defconstant RO24STV-drvr-name ".RasterOps24STVPIP1.1d3"))
  31.  
  32.  
  33. (defclass RO24STV-vd (RO-vd)
  34.   ((drvr-refnum   :allocation :class)
  35.    (ref-count     :initform    0
  36.                   :allocation :class)
  37.    (red-inhibit   :initarg    :red-inhibit
  38.                   :accessor    red-inhibit)
  39.    (green-inhibit :initarg    :green-inhibit
  40.                   :accessor    green-inhibit)
  41.    (blue-inhibit  :initarg    :blue-inhibit
  42.                   :accessor    blue-inhibit))
  43.   (:default-initargs
  44.     :board-id RO24STV-board-id
  45.     ;default values determined empically
  46.     :hue           #.(ash 0 8)
  47.     :saturation    #.(ash 59 8)
  48.     :red-inhibit   nil
  49.     :green-inhibit nil
  50.     :blue-inhibit  nil
  51.     ))
  52.  
  53. (defmethod initialize-instance :after ((vd RO24STV-vd) &rest initargs)
  54.   (declare (dynamic-extent initargs)
  55.            (ignore initargs))
  56.   (when (minusp (slot-value vd 'ref-count))
  57.     (setf (slot-value vd 'ref-count) 0)
  58.     (error "ref-count class slot went negative - now reset to zero")))
  59.  
  60. (defmethod vd-init :before ((vd RO24STV-vd))
  61.   (when (zerop (slot-value vd 'ref-count))
  62.     (setf (slot-value vd 'drvr-refnum) (RO24STV-open-driver))
  63.     (ROvd-reset vd))
  64.   (incf (slot-value vd 'ref-count)))
  65.  
  66. (defmethod vd-dispose :after ((vd RO24STV-vd))
  67.   (decf (slot-value vd 'ref-count))
  68.   (when (zerop (slot-value vd 'ref-count))
  69.     (let ((refnum (slot-value vd 'drvr-refnum)))
  70.       (slot-makunbound vd 'drvr-refnum)
  71.       (trap-nz-echeck (#~CloseDriver refnum)))))
  72.  
  73. (defmethod vd-set-hue ((vd RO24STV-vd) hue)
  74.   (ROvd-set-hue vd (ash hue -9))
  75.   hue)
  76.  
  77. (defmethod vd-set-input-standard ((vd RO24STV-vd) standard)
  78.   (RO24STVvd-set-input-type vd standard)
  79.   standard)
  80.  
  81. (defmethod vd-get-input-standard ((vd RO24STV-vd))
  82.   (RO24STVvd-get-input-type vd))
  83.  
  84. ;;;;;;;;;;
  85. ;;RO24STV uses a 0-255 range for hue,saturation
  86. ;; ash +/- 8 converts to/from the QuickTime range (0-65535)
  87.  
  88. (defmethod vd-set-hue ((vd RO24STV-vd) hue)
  89.   (ROvd-set-hue vd (ash hue -8))
  90.   hue)
  91.  
  92. (defmethod vd-get-hue ((vd RO24STV-vd))
  93.   (ash (ROvd-get-hue vd) 8))
  94.  
  95. #| un-comment if your board supports saturation.
  96.  
  97. (defmethod vd-set-saturation ((vd RO24STV-vd) saturation)
  98.   (ROvd-set-saturation vd (ash saturation -8))
  99.   saturation)
  100.  
  101. (defmethod vd-get-saturation ((vd RO24STV-vd))
  102.   (ash (ROvd-get-saturation vd) 8))
  103. |#
  104.  
  105. (defmethod vd-install-settings :after ((vd RO24STV-vd))
  106.   (RO24STVvd-select-board vd (card-num vd))
  107.   (RO24STVvd-set-red-inhibit   vd (red-inhibit vd))
  108.   (RO24STVvd-set-green-inhibit vd (green-inhibit vd))
  109.   (RO24STVvd-set-blue-inhibit  vd (blue-inhibit vd)))
  110.  
  111. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  112. ;;RO24STV specific settings
  113.  
  114. (defmethod (setf red-inhibit) :after (inhibit-p (vd RO24STV-vd))
  115.   (when (vd-digitizing-p vd)
  116.     (RO24STVvd-set-red-inhibit vd inhibit-p)))
  117.  
  118. (defmethod (setf green-inhibit) :after (inhibit-p (vd RO24STV-vd))
  119.   (when (vd-digitizing-p vd)
  120.     (RO24STVvd-set-green-inhibit vd inhibit-p)))
  121.  
  122. (defmethod (setf blue-inhibit) :after (inhibit-p (vd RO24STV-vd))
  123.   (when (vd-digitizing-p vd)
  124.     (RO24STVvd-set-blue-inhibit vd inhibit-p)))
  125.  
  126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  127. ;; RO24STV functions
  128.  
  129. (defun RO24STV-open-driver ()
  130.   (with-pstrs ((RO24STV-drvr-name_p RO24STV-drvr-name))
  131.     (rlet ((refNum_p :integer))
  132.       (unless (zerop (#~OpenDriver RO24STV-drvr-name_p refNum_p))
  133.         (error "Unable to open 24STV driver.~%Make sure it's rsrc file is open."))
  134.       (%get-signed-word refNum_p))))
  135.  
  136. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  137. ;;Control calls
  138.  
  139. ;;For more information on the various parameters see the Signetics Philips
  140. ;;Components Video Handbook, July 1990, pp. 93-136
  141.  
  142. (defmethod RO24STVvd-set-aperture ((vd RO24STV-vd) aperture-factor)
  143. ;set the aperture factor
  144.   (rlet ((csParamPtr :ROCsParam
  145.                      (:csParam 0) (ecase aperture-factor
  146.                                     (:zero 0)
  147.                                     (:quarter 1)
  148.                                     (:half 2)
  149.                                     (:one 3))))
  150.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9056 csParamPtr))))
  151.  
  152.  
  153. (defmethod RO24STVvd-set-color-killer ((vd RO24STV-vd) on-p)
  154. ;enable or disable the automatic color killer
  155.   (rlet ((csParamPtr :ROCsParam
  156.                      (:csParam 0) (if on-p 1 0)))
  157.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9049 csParamPtr))))
  158.  
  159.  
  160. (defmethod RO24STVvd-set-bandpass-type ((vd RO24STV-vd) bandpass-type)
  161. ;set the bandpass type
  162.   (rlet ((csParamPtr :ROCsParam
  163.                      (:csParam 0) (ecase bandpass-type
  164.                                     (0 0)
  165.                                     (1 1)
  166.                                     (2 2)
  167.                                     (3 3))))
  168.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9054 csParamPtr))))
  169.  
  170.  
  171. (defmethod RO24STVvd-set-bypass-digitize-LUT ((vd RO24STV-vd) on-p)
  172. ;enable or disable bypass of the digitize LUT
  173.   (rlet ((csParamPtr :ROCsParam
  174.                      (:csParam 0) (if on-p 1 0)))
  175.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9046 csParamPtr))))
  176.  
  177.  
  178.  
  179. (defmethod RO24STVvd-set-color-key-mask ((vd RO24STV-vd)
  180.                                   topLeft botRight
  181.                                   red-value green-value blue-value
  182.                                   match-p
  183.                                   mask)
  184. ;allows you enable or disable live video within a specified  rectangle
  185. ;whenever a pixel matches (or does not match) a specified 24-bit color value
  186.   (rlet ((csParamPtr :ROCsParam
  187.                      (:csParam 0) (point-v topLeft)
  188.                      (:csParam 1) (point-h topLeft)
  189.                      (:csParam 2) (point-v botRight)
  190.                      (:csParam 3) (point-h botRight)
  191.                      (:csParam 4) red-value
  192.                      (:csParam 5) green-value
  193.                      (:csParam 6) blue-value
  194.                      (:csParam 7) (if match-p 1 0)
  195.                      (:csParam 8) (ecase mask (:graphics 0) (:video 1))))
  196.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9060 csParamPtr))))
  197.  
  198.  
  199. (defmethod RO24STVvd-set-coring ((vd RO24STV-vd) LSB-variance)
  200. ;set the coring
  201.   (rlet ((csParamPtr :ROCsParam
  202.                      (:csParam 0) (ecase LSB-variance
  203.                                     (0 0)
  204.                                     (1 1)
  205.                                     (2 2)
  206.                                     (3 3))))
  207.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9055 csParamPtr))))
  208.  
  209.  
  210. (defmethod RO24STVvd-set-cross-color-reduction ((vd RO24STV-vd) on-p)
  211. ;enable or disable SECAM cross color reduction
  212.   (rlet ((csParamPtr :ROCsParam
  213.                      (:csParam 0) (if on-p 1 0)))
  214.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9050 csParamPtr))))
  215.  
  216.  
  217. (defmethod RO24STVvd-set-input-type ((vd RO24STV-vd) input-type)
  218. ;set the input type
  219.   (rlet ((csParamPtr :ROCsParam
  220.                      (:csParam 0) (ecase input-type
  221.                                     (:NTSC 0)
  222.                                     (:PAL 1)
  223.                                     (:SECAM 2))))
  224.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9038 csParamPtr))))
  225.  
  226.  
  227. (defmethod RO24STVvd-load-digitize-LUT ((vd RO24STV-vd) table)
  228. ;loads a LUT
  229.   (rlet ((csParamPtr :ROCsParam
  230.                      :ptr table))
  231.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9044 csParamPtr))))
  232.  
  233.  
  234. (defmethod RO24STVvd-set-LUMA-delay-compensation ((vd RO24STV-vd) delay-compensation)
  235. ;set the LUMA delay compensation
  236.   (rlet ((csParamPtr :ROCsParam
  237.                      (:csParam 0) delay-compensation))
  238.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9051 csParamPtr))))
  239.  
  240.  
  241. (defmethod RO24STVvd-set-mask-enable ((vd RO24STV-vd) on-p)
  242. ;Enable or disable the mask.  When the mask is enabled the state of the mask at 
  243. ;each pixel determines whether live video or graphics is shown.
  244.   (rlet ((csParamPtr :ROCsParam
  245.                      (:csParam 0) (if on-p 1 0)))
  246.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9043 csParamPtr))))
  247.  
  248.  
  249. (defmethod RO24STVvd-set-mask-readback ((vd RO24STV-vd) on-p)
  250. ;MaskReadback controls whether the mask is read back during a read operation 
  251. ;from the frame buffer.  Usually, this should be enabled only when the mask is 
  252. ;enabled. This function is provided to prevent the cursor from turning off live 
  253. ;video whenever the cursor moves over a live video region.  Disable mask 
  254. ;readback if you're going to read data from the frame buffer, e.g., with CopyBits
  255.   (rlet ((csParamPtr :ROCsParam
  256.                      (:csParam 0) (if on-p 1 0)))
  257.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9042 csParamPtr))))
  258.  
  259.  
  260. (defmethod RO24STVvd-set-prefilter ((vd RO24STV-vd) on-p)
  261. ;enable or disable the prefilter
  262.   (rlet ((csParamPtr :ROCsParam
  263.                      (:csParam 0) (if on-p 1 0)))
  264.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9042 csParamPtr))))
  265.  
  266.  
  267. (defmethod RO24STVvd-set-red-inhibit ((vd RO24STV-vd) inhibit-p)
  268. ;controls writing of the red video component
  269.   (rlet ((csParamPtr :ROCsParam
  270.                      (:csParam 0) (if inhibit-p 1 0)))
  271.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9019 csParamPtr))))
  272.  
  273.  
  274. (defmethod RO24STVvd-set-green-inhibit ((vd RO24STV-vd) inhibit-p)
  275. ;controls writing the green video component
  276.   (rlet ((csParamPtr :ROCsParam
  277.                      (:csParam 0) (if inhibit-p 1 0)))
  278.       (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9020 csParamPtr))))
  279.  
  280.  
  281. (defmethod RO24STVvd-set-blue-inhibit ((vd RO24STV-vd) inhibit-p)
  282. ;conrols writing the blue video component
  283.   (rlet ((csParamPtr :ROCsParam
  284.                      (:csParam 0) (if inhibit-p 1 0)))
  285.       (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9021 csParamPtr))))
  286.  
  287.  
  288. (defmethod RO24STVvd-select-board ((vd RO24STV-vd) card-num)
  289. ;sets the card the driver is using
  290.   (rlet ((csParamPtr :ROCsParam
  291.                      (:csParam 0) card-num))
  292.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9053 csParamPtr))))
  293.  
  294.  
  295. (defmethod RO24STVvd-set-vert-noise-reduction ((vd RO24STV-vd) mode)
  296. ; mode = :normal, :searching, :auto, or :bypassed
  297. ;set the vertical noise reduction mode
  298.   (rlet ((csParamPtr :ROCsParam
  299.                      (:csParam 0) (ecase mode
  300.                                     (:normal    0)
  301.                                     (:searching 1)
  302.                                     (:auto      2)
  303.                                     (:bypassed  3))))
  304.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9052 csParamPtr))))
  305.  
  306.  
  307. (defmethod RO24STVvd-write-DMSD ((vd RO24STV-vd) register value)
  308. ;writes a byte to the specified register of the Digital Multi-Standard Decoder chip
  309.   (rlet ((csParamPtr :ROCsParam
  310.                      (:csParam 0) register
  311.                      (:csParam 1) value))
  312.     (vd-nz-error-check vd (#~Control (drvr-refnum vd) 9041 csParamPtr))))
  313.  
  314. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  315. ;;Status calls
  316.  
  317. ;;For more information on the various parameters see the Signetics Philips
  318. ;;Components Video Handbook, July 1990, pp. 93-136
  319.  
  320.  
  321. (defmethod RO24STVvd-get-AGC-response ((vd RO24STV-vd))
  322. ;returns the Automatic Gain Control response
  323.   (rlet ((csParamPtr :ROCsParam))
  324.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9048 csParamPtr))
  325.     (pref csParamPtr (:ROCsParam.csParam 0))))
  326.  
  327.  
  328. (defmethod RO24STVvd-get-aperture ((vd RO24STV-vd))
  329. ;returns the aperture
  330.   (rlet ((csParamPtr :ROCsParam))
  331.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9048 csParamPtr))
  332.     (ecase (pref csParamPtr (:ROCsParam.csParam 0))
  333.       (0 :zero)
  334.       (1 :quarter)
  335.       (2 :half)
  336.       (3 :one))))
  337.  
  338.  
  339. (defmethod RO24STVvd-auto-color-killer-p ((vd RO24STV-vd))
  340. ;returns the automatic color killer state
  341.   (rlet ((csParamPtr :ROCsParam))
  342.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9049 csParamPtr))
  343.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  344.  
  345.  
  346. (defmethod RO24STVvd-get-bandpass ((vd RO24STV-vd))
  347. ;returns the bandpass type
  348.   (rlet ((csParamPtr :ROCsParam))
  349.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9054 csParamPtr))
  350.     (pref csParamPtr (:ROCsParam.csParam 0))))
  351.  
  352.  
  353. (defmethod RO24STVvd-get-board-count ((vd RO24STV-vd))
  354. ;returns the number of 24STV boards in the machine
  355.   (rlet ((csParamPtr :ROCsParam
  356.                      (:csParam 0) 1))
  357.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9040 csParamPtr))
  358.     (pref csParamPtr (:ROCsParam.csParam 0))))
  359.  
  360.  
  361. (defmethod RO24STVvd-get-bypass-digitize-LUT ((vd RO24STV-vd))
  362. ;returns the bypass digitize LUT state
  363.   (rlet ((csParamPtr :ROCsParam))
  364.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9046 csParamPtr))
  365.     (pref csParamPtr (:ROCsParam.csParam 0))))
  366.  
  367.  
  368. (defmethod RO24STVvd-get-coring ((vd RO24STV-vd))
  369. ;returns the coring value
  370.   (rlet ((csParamPtr :ROCsParam))
  371.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9055 csParamPtr))
  372.     (pref csParamPtr (:ROCsParam.csParam 0))))
  373.  
  374.  
  375. (defmethod RO24STVvd-cross-color-reduction-p ((vd RO24STV-vd))
  376. ;returns the cross color reduction state
  377.   (rlet ((csParamPtr :ROCsParam))
  378.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9050 csParamPtr))
  379.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  380.  
  381.  
  382. (defmethod RO24STVvd-get-digitize-LUT ((vd RO24STV-vd))
  383. ;returns the digitize LUT
  384.   (rlet ((csParamPtr :ROCsParam))
  385.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9044 csParamPtr))
  386.     (pref csParamPtr :ROCsParam.ptr)))
  387.  
  388.  
  389. (defmethod RO24STVvd-get-input-type ((vd RO24STV-vd))
  390. ;returns the current type of video input accepted by the board
  391.   (rlet ((csParamPtr :ROCsParam))
  392.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9038 csParamPtr))
  393.     (ecase (pref csParamPtr (:ROCsParam.csParam 0))
  394.       (0 :NTSC)
  395.       (1 :PAL)
  396.       (2 :SECAM))))
  397.  
  398.  
  399. (defmethod RO24STVvd-get-LUMA-delay-compensation ((vd RO24STV-vd))
  400. ;returns the LUMA compensation value
  401.   (rlet ((csParamPtr :ROCsParam))
  402.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9051 csParamPtr))
  403.     (pref csParamPtr (:ROCsParam.csParam 0))))
  404.  
  405.  
  406. (defmethod RO24STVvd-mask-enable-p ((vd RO24STV-vd))
  407. ;returns whether the graphics/video mask is enabled
  408.   (rlet ((csParamPtr :ROCsParam))
  409.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9043 csParamPtr))
  410.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  411.  
  412.  
  413. (defmethod RO24STVvd-mask-readback-p ((vd RO24STV-vd))
  414. ;returns whether the graphics/video mask readback is enabled
  415.   (rlet ((csParamPtr :ROCsParam))
  416.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9042 csParamPtr))
  417.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  418.  
  419.  
  420. (defmethod RO24STVvd-get-max-destination-size ((vd RO24STV-vd))
  421. ;returns maximum size of the live video that can be digitized
  422.   (rlet ((csParamPtr :ROCsParam))
  423.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9059 csParamPtr))
  424.     (make-point (pref csParamPtr (:ROCsParam.csParam 0))
  425.                 (pref csParamPtr (:ROCsParam.csParam 1)))))
  426.  
  427. (defmethod RO24STVvd-prefileter-p ((vd RO24STV-vd))
  428. ;returns whether the prefilter is enabled
  429.   (rlet ((csParamPtr :ROCsParam))
  430.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9053 csParamPtr))
  431.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  432.  
  433. (defmethod RO24STVvd-get-noise-reduction ((vd RO24STV-vd))
  434. ;returns the vertical noise reduction mode
  435.   (rlet ((csParamPtr :ROCsParam))
  436.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9052 csParamPtr))
  437.     (ecase (pref csParamPtr (:ROCsParam.csParam 0))
  438.       (0 :normal)
  439.       (1 :searching)
  440.       (2 :auto)
  441.       (3 :bypassed))))
  442.  
  443. (defmethod RO24STVvd-redad-DMSD ((vd RO24STV-vd) register)
  444. ;returns the value of the specified Digital Multi-Standard Decoder chip
  445.   (rlet ((csParamPtr :ROCsParam
  446.                      (:csParam 0) register))
  447.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9041 csParamPtr))
  448.     (pref csParamPtr (:ROCsParam.csParam 1))))
  449.  
  450. (defmethod RO24STVvd-red-inhibited-p ((vd RO24STV-vd))
  451. ;returns t if the red video component is inhibited
  452.   (rlet ((csParamPtr :ROCsParam))
  453.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9019 csParamPtr))
  454.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  455.  
  456. (defmethod RO24STVvd-green-inhibited-p ((vd RO24STV-vd))
  457. ;returns t if the green video component is inhibited
  458.   (rlet ((csParamPtr :ROCsParam))
  459.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9020 csParamPtr))
  460.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  461.  
  462. (defmethod RO24STVvd-blue-inhibited-p ((vd RO24STV-vd))
  463. ;returns t if the blue video component is inhibited
  464.   (rlet ((csParamPtr :ROCsParam))
  465.     (vd-nz-error-check vd (#~Status (drvr-refnum vd) 9021 csParamPtr))
  466.     (= 1 (pref csParamPtr (:ROCsParam.csParam 0)))))
  467.  
  468. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  469.  
  470. #|
  471.  
  472. ;; a modest example
  473.  
  474. (oou-dependencies :video-digitizer-svm
  475.                   :Resources-u)
  476.  
  477. (open-res-file "oou:MCLs-funniest-home-videos;RO24STV-driver.rsrc")
  478.  
  479. (defclass vsview (video-digitizer-svm simple-view) () )
  480.  
  481.  
  482. (progn
  483.   (setf *test-w*
  484.         (make-instance 'window
  485.                        :window-type :document
  486.                        :view-position #@(10 40)
  487.                        :view-size #@(320 300)
  488.                        :window-title "video demo"
  489.                        :color-p t
  490.                        ))
  491.   (add-subviews *test-w* (make-instance 'vsview
  492.                                         :view-position #@(10 10)
  493.                                         :view-size #@(300 250)                  
  494.                                         :view-nick-name :vview
  495.                                         :digitizer-class 'RO24STV-vd
  496.                                         )))
  497.  
  498. (start-digitizing (view-named :vview *test-w*))
  499.  
  500. (stop-digitizing (view-named :vview *test-w*))
  501.  
  502. |#