MME video digitizer Isis software documentation

MME video digitizer

This library contains routines for digitizing, displaying, compressing, and uncompressing video using the MME video services under Digital Unix on Alpha workstations. For handling video on other architectures and for a simpler platform-independent interface, see the video capture library documentation page.

These procedures allow for the real-time capture, display, compression, and decompression of images in RGB, YUV, or JPEG formats. Up to 640x480 frame sizes are supported. Frame sizes in the procedures below should be specified in lists: [xsize ysize]. Video cannot be open for capture and display simultaneously--you must close and reopen when you want to switch modes.

The general procedure for capture or display is to create all needed buffers with mme-create-buffer, initialize the system with mme-init-read-frame or mme-init-write-frame, and then read and write frames using mme-read-frame or mme-write-frame. When finished, be sure to close the video connection using mme-close.

For additional information, please talk to Stefan.


Examples


Library summary

##################### ### Constants ### ##################### mme-rgb # Constants to use as frametype in later calls mme-yuv mme-jpeg ############################# ### Buffer operations ### ############################# (mme-create-buffer frametype framesize) # returns buffer handle (mmebuf) (mme-free-buffer mmebuf) # free buffer when done (mme-buffer-address mmebuf) # address of buffer memory (mme-buffer-length mmebuf) # length in bytes of bufer (mme-buffer-bytes-used mmebuf) # used for jpeg buffers (mme-buffer-set-bytes-used mmebuf numbytes) # set number of bytes used (mme-buffer-time mmebuf) # "mme" time of buffer (mme-yuv-to-rgb framesize inmmebuf outmmebuf) # FAST convert yuv to rgb ### The following functions create standard Isis images that reference the ### memory in an mmebuf. Use them to access the data space of an mmebuf: (mme-extract-image frametype numchannels framesize mmebuf) ######################################## ### Capture / display operations ### ######################################## (mme-init-read-frame frametype framesize) # returns mme handle (mme) (mme-init-write-frame frametype framesize) # The above 2 functions will take an additional 3 optional arguments: # Device id (default 0) # Field mode (default mme-mode-frame) # Video standard (default mme-standard-ntsc) # If Null is passed for an optional argument, the default value is used. # Field mode and video standard constants are listed below: mme-mode-frame # default field dominance of device mme-mode-frame-even-dom # dominant field on input and output mme-mode-frame-odd-dom mme-mode-field-odd-only # only input and output to specific field mme-mode-field-even-only mme-mode-field-both # input and output to either field mme-standard-ntsc # NTSC mme-standard-pal # PAL mme-standard-secam # SECAM mme-standard-svideo525 # SVIDEO counterpart for NTSC mme-standard-svideo625 # SVIDEO counterpart for PAL (mme-read-frame mme mmebuf) # captures frame (or adds to stream queue) (mme-write-frame mme mmebuf) # displays frame (or adds to stream queue) (mme-close mme) # closes any mme handle (mme-yuv-to-rgb framesize mmeyuvbuf mmergbbuf) # fast yuv to rgb conversion (mme-set-quality mme quality) # set record quality: 0 - 10000 (best) (mme-get-quality mme) ################################################################# ### Streaming (non-blocking) capture / display operations ### ################################################################# (mme-stream-init mme) # call after mme-init-read/write-frame (mme-stream-start mme) # call after mme-stream-init (mme-prepare-buffer mme mmebuf) (mme-read-frame mme mmebuf) # adds buffer to stream capture queue (mme-write-frame mme mmebuf) # adds buffer to stream display queue (mme-stream-wait-for-buffer mme) # blocks, returns finished mmebuf (mme-stream-get-buffer mme) # nonblocking, returns Null or mmebuf (mme-unprepare-buffer mme mmebuf) (mme-stream-stop mme) (mme-stream-reset mme) (mme-stream-finish mme) ################################################## ### Compression / Decompression operations ### ################################################## (mme-init-compress inframetype outframetype framesize) # returns mme handle (mme-init-decompress inframetype outframetype framesize) (mme-compress-start mme) (mme-decompress-start mme) (mme-compress mme inmmebuf outmmebuf) (mme-decompress mme inmmebuf outmmebuf) (mme-compress-stop mme) (mme-decompress-stop mme) (mme-close mme) # closes any mme handle


Requirements:
Scripts: (load "mme-utilities.isis")
Libraries: -lisis_mme_video -lmme -lyuv_to_rgb
Headers: isis_mme_video.h
Binders: bind_mme_video_library(script);