home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / videoedt / videoedt.h < prev   
Encoding:
C/C++ Source or Header  |  1993-06-15  |  7.8 KB  |  242 lines

  1. /*
  2.  * Copyright (c) 1990, 1991 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/collab/VideoEdit/RCS/VideoEdit.h,v 0.29 92/06/15 14:54:35 drapeau Exp $ */
  25. /* $Log:    VideoEdit.h,v $
  26.  * Revision 0.29  92/06/15  14:54:35  drapeau
  27.  * Minor change, declared "UpdateHeader()" with function prototypes.
  28.  * 
  29.  * Revision 0.28  92/05/29  12:38:47  drapeau
  30.  * Modified code to track new name of the MAEstro "Selection" structure;
  31.  * it is now named "MAESelection".
  32.  * 
  33.  * Revision 0.27  92/05/13  00:21:39  drapeau
  34.  * Minor change, changed name of function "SetPlayer()" to
  35.  * "SetPlayerHandler()".
  36.  * 
  37.  * Revision 0.26  92/05/12  19:07:32  drapeau
  38.  * Slight changes to definitions of a couple of functions, that reflect
  39.  * changes in the interface.
  40.  * 
  41.  * Revision 0.25  92/01/07  14:06:57  drapeau
  42.  * Cosmetic changes only, to make the code more readable.
  43.  * 
  44.  * Revision 0.24  91/09/26  11:48:45  lim
  45.  * Added chosenHost.
  46.  * 
  47.  * Revision 0.23  91/09/24  20:45:22  lim
  48.  * Combined all the header files (from Edit, Options, Preview, and Protocol)
  49.  * into this file.
  50.  * 
  51.  * Revision 0.22  91/08/24  17:56:11  lim
  52.  * Added diagMode for printing diagnostics.
  53.  * 
  54.  * Revision 0.21  91/08/21  10:47:50  lim
  55.  * Added new variable, mySerialPort, to denote serial port setting on
  56.  * options panel.
  57.  * 
  58.  * Revision 0.20  91/08/09  10:45:48  lim
  59.  * *** empty log message ***
  60.  * 
  61.  * Revision 0.19  91/08/09  10:44:09  lim
  62.  * *** empty log message ***
  63.  * 
  64.  * Revision 0.18  91/08/09  10:34:36  lim
  65.  * Header files for drivers are taken out and put with 
  66.  * 'videoObjects.c'
  67.  * 
  68.  * Revision 0.17  91/08/07  13:25:25  lim
  69.  * 1. Removed 'MyAbs' and 'MyRound' to 'videoObj.h'.
  70.  * 2. Removed 'playerLine' because now each device has an instance object, which
  71.  * stores the appropriate file descriptor.
  72.  * 3. Added 'DevInit()' and 'DisplayError()'.
  73.  * 
  74.  * Revision 0.16  91/08/02  12:59:03  lim
  75.  * 1. Removed "videoObjects.h"
  76.  * 2. Added variables : 'currentAudio' and 'myVideo'.
  77.  * 
  78.  * Revision 0.15  91/07/29  22:29:38  lim
  79.  * Added "PlayerStatus.h" and "Sony1550Driver.h"
  80.  * 
  81.  * Revision 0.14  91/07/27  22:28:41  lim
  82.  * 1. Changed speed to int from double.
  83.  * 2. Added Pioneer6000Driver.
  84.  * 3. "MyRound" has been shifted here.
  85.  * 
  86.  * Revision 0.13  91/07/24  11:01:36  lim
  87.  * Ran through xsaber - added declarations for Pause and Stop.
  88.  * 
  89.  * Revision 0.12  91/07/23  15:56:20  lim
  90.  * Included Panasonic Optical Driver header file.
  91.  * Declared SetPlayer() for choosing driver to use.
  92.  * 
  93.  * Revision 0.11  91/07/19  14:10:15  lim
  94.  * Added AudioType and arrays for audio and speed settings.
  95.  * 
  96.  * Revision 0.10  91/07/12  16:19:42  lim
  97.  * Initial revision implementing VideoObject.
  98.  *  */
  99.  
  100. #include <errno.h>
  101. #include <stdio.h>
  102. #include <sys/param.h>
  103. #include <sys/types.h>
  104. #include <sys/stat.h>
  105. #include <xview/xview.h>
  106. #include <xview/font.h>
  107. #include <xview/panel.h>
  108. #include <xview/notice.h>
  109. #include <xview/textsw.h>
  110. #include <xview/xv_xrect.h>
  111. #include <gdd.h>
  112. #include "VideoEdit_ui.h"
  113. #include "Sender.h"
  114. #include "Receiver.h"
  115. #include <getopt.h>
  116. #include <videoObj.h>
  117. #include <PlayerStatus.h>
  118. #include <Browse.h>
  119.  
  120. #define MAX_LISTSIZE    1000
  121. #define MAX_LABELSIZE    22
  122. #define MAX_FRAME    54000
  123. #define MAX_PATHLENGTH    256
  124. #define MAX_HOSTNAME    256
  125. #define MaxNameLength    30
  126.  
  127. #define LOAD 0
  128. #define SAVE 1
  129. #define SAVEAS 2
  130.  
  131. enum AudioType {Stereo, Right, Left, Mute};                /* Different audio settings available for each edit */
  132.  
  133. int paused;                                /* Set when player is paused. Unset when pause is hit again */
  134. int lines;                                /* number of lines in the edit list */
  135. int editnum;                                /* the current selection in the edit list */
  136. int change;                                /* indicates if unsaved changes exist in the edit list */
  137. int clearframe;                                /* determines if the frame/chapter textfield is to be cleared*/
  138. int search;                                /* flag to indicate if a notify procedure is to be executed. 
  139.                                        This is necessary because a textfield notify procedure is 
  140.                                        executed twice for each key depressed (possibly a XView 
  141.                                        bug */
  142. int        startframe[MAX_LISTSIZE]; 
  143. int        endframe[MAX_LISTSIZE];                    /* arrays to store the start/end frames of
  144.                                        each entry in the edit list */
  145. char        label[MAX_LISTSIZE][MAX_LABELSIZE+1];            /* array to store the label of each entry in the edit list */
  146. enum AudioType    audioStg[MAX_LISTSIZE];                    /* array to store the audio settings for each edit */
  147. int        speedStg[MAX_LISTSIZE];                    /* array to store the speed settings for each edit */
  148.  
  149. char        deviceName[MaxNameLength];                /* Name of device currently used */
  150. int        currentAudio;                        /* Audio setting of current edit */
  151. VideoObject*    myVideo;                        /* Pointer to current video object */
  152. static char    chosenHost[MAX_HOSTNAME];                /* Current (chosen from options panel) network host */
  153. char        mySerialPort[10];                    /* Serial port setting from options panel */
  154.  
  155. int        receiverPort;                        /* Command line port */
  156. char*        startFilename;                        /* Name of file in command line */
  157. char        hostname[MAX_HOSTNAME];                    /* Name of host */
  158. Xv_font*    font;                            /* Font used in the panel list */
  159.  
  160. enum Boolean    diagMode;                        /* Flag : Whether to print diagnostic messages */
  161.  
  162. VideoEdit_window1_objects        *VideoEdit_window1;
  163. VideoEdit_optionsPopup_objects         *VideoEdit_optionsPopup;
  164. VideoEdit_editPopup_objects         *VideoEdit_editPopup;
  165. VideoEdit_previewPopup_objects         *VideoEdit_previewPopup;
  166. VideoEdit_infoPopup_objects         *VideoEdit_infoPopup;
  167.  
  168. Attr_attribute    INSTANCE;
  169.  
  170. void PlayMode();
  171. void SetDuration();
  172. void SetPlayerHandler(Panel_item item, Event *event);
  173. void Stop();
  174. void Pause();
  175.  
  176. VideoObject* DevInit();                            /* These functions are added from `videoObjects.c' */
  177. void DisplayError();
  178. void PrintDiagnostics();
  179.  
  180. /* Defined in VideoEditProtocol.c */
  181.  
  182. void InitNetwork();
  183. void OpenDoc();
  184. void SetSelection();
  185. void PerformSelection();
  186. char ** GetDoc();
  187. MAESelection* GetSelection();
  188. void HaltSelection();
  189. void PauseSelection();
  190. void ResumeSelection();
  191. void HideApplication();
  192. void ShowApplication();
  193. IconData* GetAppIcon();
  194.  
  195. Sender* sender;
  196. Receiver* receiver;
  197.  
  198.  
  199. /* Defined in VideoEditPreview.c */
  200.  
  201. Menu_item PreviewStartEnd();
  202. void PreviewStart();
  203. void PreviewEnd();
  204. void PreviewDone();
  205.  
  206.  
  207. /* Defined in VideoEditOptions.c */
  208.  
  209. void DisplaySelect();
  210. void SearchSet();
  211. void optionsSetPort();
  212. void Audio();
  213. void Done();
  214.  
  215.  
  216. /* Defined in VideoEditEdit.c */
  217.  
  218. int OpenHandler();
  219. int SaveHandler();
  220.  
  221. void PrintOnList();
  222. void PrintNumEdits();
  223. void FileError();
  224. Menu_item FileLoad();
  225. Menu_item FileSave();
  226. Menu_item FileSaveAs();
  227. Menu_item EditCloseFile();
  228. void EditDone();
  229. void GetStart();
  230. void GetEnd();
  231. Menu_item EditPreview();
  232. void EditAdd();
  233. void EditDelete();
  234. void EditModify();
  235. int List();
  236. void EditDeleteAll();
  237. void UpdateHeader (char* documentName, int modified);
  238.  
  239.  
  240. static char mainhrcs[] = "$Header: /Source/Media/collab/VideoEdit/RCS/VideoEdit.h,v 0.29 92/06/15 14:54:35 drapeau Exp $";
  241.  
  242.