home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / video / simpleVideo / examples / svtest1.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.5 KB  |  51 lines

  1. /*
  2.  * Copyright (c) 1994, Silicon Graphics, Inc.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that the name of Silicon Graphics may not be used in any advertising or
  7.  * publicity relating to the software without the specific, prior written
  8.  * permission of Silicon Graphics.
  9.  *
  10.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  11.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  12.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  13.  *
  14.  * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  15.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
  16.  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE
  17.  * POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN
  18.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  19.  */
  20. /* $Id: svtest1.c,v 1.2 1994/07/16 01:45:32 dpb Exp $ */
  21.  
  22. /*** Grab 3 frames from the indycam */
  23.  
  24. #include <stdio.h>
  25. #include "sv.h"
  26.  
  27. int
  28. main(void)
  29. {
  30.     svImage *imageInfo;
  31.  
  32.     sleep(2);
  33.     svSelectInput(vnINPUT_INDYCAM);
  34.     svSetFrameCount(1);
  35.  
  36.     imageInfo = svNewImage();
  37.     svGetFrame(imageInfo);
  38.     svSaveImage("test1.rgb", imageInfo);
  39.     sleep(2);
  40.  
  41.     svGetFrame(imageInfo);
  42.     svSaveImage("test2.rgb", imageInfo);
  43.     sleep(2);
  44.  
  45.     svGetFrame(imageInfo);
  46.     svSaveImage("test3.rgb", imageInfo);
  47.  
  48.     svFreeImage(&imageInfo);
  49.     return 0;
  50. }
  51.