1 /*===========================================================================* 2 * parallel.h 3 * 4 * parallel encoding 5 * 6 *===========================================================================*/ 7 8 /* 9 * Copyright (c) 1995 The Regents of the University of California. 10 * All rights reserved. 11 * 12 * Permission to use, copy, modify, and distribute this software and its 13 * documentation for any purpose, without fee, and without written agreement is 14 * hereby granted, provided that the above copyright notice and the following 15 * two paragraphs appear in all copies of this software. 16 * 17 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 18 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 19 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 20 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 * 22 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 24 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 25 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO 26 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 27 */ 28 29 /*==============* 30 * HEADER FILES * 31 *==============*/ 32 33 #include "bitio.h" 34 #include "frame.h" 35 36 37 struct inputSource; 38 39 /*===============================* 40 * EXTERNAL PROCEDURE prototypes * 41 *===============================*/ 42 43 void 44 MasterServer(struct inputSource * const inputSourceP, 45 const char * const paramFileName, 46 const char * const outputFileName); 47 48 void 49 NotifyMasterDone(const char * const hostName, 50 int const portNum, 51 int const machineNumber, 52 unsigned int const seconds, 53 boolean * const moreWorkToDoP, 54 int * const frameStartP, 55 int * const frameEndP); 56 57 void 58 IoServer(struct inputSource * const inputSourceP, 59 const char * const parallelHostName, 60 int const portNum); 61 62 void 63 CombineServer(int const numInputFiles, 64 const char * const masterHostName, 65 int const masterPortNum, 66 const char* const outputFileName); 67 68 void 69 DecodeServer(int const numInputFiles, 70 const char * const decodeFileName, 71 const char * const parallelHostName, 72 int const portNum); 73 74 void 75 WaitForOutputFile(int number); 76 77 void 78 GetRemoteFrame(MpegFrame * const frameP, 79 int const frameNumber); 80 81 void 82 SendRemoteFrame(int const frameNumber, 83 BitBucket * const bbP); 84 85 void 86 NoteFrameDone(int frameStart, int frameEnd); 87 88 void 89 SetIOConvert(boolean const separate); 90 91 void 92 SetRemoteShell(const char * const shell); 93 94 void 95 NotifyDecodeServerReady(int const id); 96 97 void 98 WaitForDecodedFrame(int id); 99 100 void 101 SendDecodedFrame(MpegFrame * const frameP); 102 103 void 104 GetRemoteDecodedRefFrame(MpegFrame * const frameP, 105 int const frameNumber); 106 107 void 108 SetParallelPerfect(boolean val); 109 110 111 /*==================* 112 * GLOBAL VARIABLES * 113 *==================*/ 114 115 extern int parallelTestFrames; 116 extern int parallelTimeChunks; 117 118 extern const char *IOhostName; 119 extern int ioPortNumber; 120 extern int decodePortNumber; 121 122 extern boolean ioServer; 123 extern boolean niceProcesses; 124 extern boolean forceIalign; 125 extern int machineNumber; 126 extern boolean remoteIO; 127 extern boolean separateConversion; 128 129 130 131 132 133 134 135