home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / video / security / video.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.8 KB  |  72 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef _VIDEODEV_H
  18. #define _VIDEODEV_H
  19.  
  20. #include <vl/vl.h>
  21. #include <movie.h>
  22.  
  23. class Video
  24. {
  25.  public:
  26.   Video();
  27.   ~Video();
  28.   void getBuffer();
  29.   int hasVideo() {return _hasVideo;} 
  30.   int getWidth() {return _width;}
  31.   int getHeight() {return _height;} 
  32.   int getSize() {return _frameSize;}
  33.   MVid getID() {return _movieID;}
  34.   void setID(MVid m) {_movieID = m;}
  35.   int getState() {return _state;} 
  36.   void setState(int s) {_state = s;} 
  37.   void freeBuffer();
  38.  
  39.  protected:
  40.   VLServer _server;
  41.   VLNode _src, _drn, _mem;
  42.   VLPath _path;
  43.   VLBuffer _buf;
  44.   VLInfoPtr _info;
  45.   uint _frameSize;
  46.   int _height, _width;
  47.   char _hasVideo;
  48.   MVid _movieID;
  49.   int _state;
  50. };
  51.  
  52.  
  53. class VideoOut : public Video
  54. {
  55.  public:
  56.   VideoOut();
  57.   ~VideoOut();
  58.   void loadFrame(int, int, void *);
  59.   void nextFrame(void *buf) { loadFrame( _width, _height, buf);}
  60. };
  61.  
  62. class VideoIn : public Video
  63. {
  64.  public:
  65.   VideoIn(int divisor = 1, int devicenum = -1, int isRGB = TRUE);
  66.   ~VideoIn();
  67.   void loadFrame(int, int, void *);
  68.   void nextFrame(void *buf) { loadFrame( _width, _height, buf);}
  69. };
  70.  
  71. #endif
  72.