ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mpeg_encode/src/noparallel.c
Revision: 74
Committed: Mon Dec 15 04:49:34 2008 UTC (12 years, 9 months ago) by wdelano
File size: 6635 byte(s)
Log Message:
Line File contents
1 /*===========================================================================*
2 * noparallel.c *
3 * *
4 * would be procedures to make encoder to run in parallel -- except *
5 * this machine doesn't have sockets, so we can only run sequentially *
6 * so this file has dummy procedures which lets it compile *
7 * *
8 * EXPORTED PROCEDURES: *
9 * StartIOServer *
10 * StartCombineServer *
11 * SendRemoteFrame *
12 * GetRemoteFrame *
13 * StartMasterServer *
14 * NotifyMasterDone *
15 * *
16 *===========================================================================*/
17
18 /*
19 * Copyright (c) 1995 The Regents of the University of California.
20 * All rights reserved.
21 *
22 * Permission to use, copy, modify, and distribute this software and its
23 * documentation for any purpose, without fee, and without written agreement is
24 * hereby granted, provided that the above copyright notice and the following
25 * two paragraphs appear in all copies of this software.
26 *
27 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
28 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
29 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
30 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
33 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
34 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
35 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
36 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
37 */
38
39 /*
40 * $Header: /n/picasso/project/mm/mpeg/mpeg_dist/mpeg_encode/RCS/noparallel.c,v 1.6 1995/05/12 00:00:06 smoot Exp $
41 * $Log: noparallel.c,v $
42 * Revision 1.6 1995/05/12 00:00:06 smoot
43 * sco defined check
44 *
45 * Revision 1.5 1995/01/19 23:08:58 eyhung
46 * Changed copyrights
47 *
48 * Revision 1.4 1994/11/14 22:33:31 smoot
49 * added ifdef for Linux
50 *
51 * Revision 1.3 1994/11/12 02:11:55 keving
52 * nothing
53 *
54 * Revision 1.2 1993/12/22 19:19:01 keving
55 * nothing
56 *
57 * Revision 1.2 1993/12/22 19:19:01 keving
58 * nothing
59 *
60 * Revision 1.1 1993/07/22 22:23:43 keving
61 * nothing
62 *
63 * Revision 1.1 1993/06/30 20:06:09 keving
64 * nothing
65 *
66 */
67
68
69 /*==============*
70 * HEADER FILES *
71 *==============*/
72
73 #include "all.h"
74 #include "mtypes.h"
75 #include "parallel.h"
76 #include "frame.h"
77 #ifdef LINUX
78 #include <time.h>
79 #endif
80 #if defined(sco)
81 #include <time.h>
82 #endif
83 #if defined(__APPLE__)
84 #include <time.h>
85 #endif
86
87 /*==================*
88 * GLOBAL VARIABLES *
89 *==================*/
90
91 int parallelTestFrames = 10;
92 int parallelTimeChunks = 60;
93 char *IOhostName;
94 int ioPortNumber;
95 int combinePortNumber;
96 int decodePortNumber;
97 boolean niceProcesses = FALSE;
98 boolean forceIalign = FALSE;
99 int machineNumber = -1;
100 boolean remoteIO = FALSE;
101 boolean separateConversion;
102 time_t IOtime = 0;
103
104
105 /*=====================*
106 * EXPORTED PROCEDURES *
107 *=====================*/
108
109 /*=================*
110 * IO SERVER STUFF *
111 *=================*/
112
113
114 void
115 SetIOConvert(separate)
116 boolean separate;
117 {
118 /* do nothing -- this may be called during non-parallel execution */
119 }
120
121
122 void
123 SetParallelPerfect(val)
124 boolean val;
125 {
126 /* do nothing -- this may be called during non-parallel execution */
127 }
128
129
130 void
131 SetRemoteShell(shell)
132 char *shell;
133 {
134 /* do nothing -- this may be called during non-parallel execution */
135 }
136
137
138 /* StartIOServer
139 */
140 void
141 StartIOServer(numInputFiles, parallelHostName, portNum)
142 int numInputFiles;
143 char *parallelHostName;
144 int portNum;
145 {
146 fprintf(stdout, "ERROR: (StartIOServer) This machine can NOT run parallel version\n");
147 exit(1);
148 }
149
150
151 void
152 StartCombineServer(numInputFiles, outputFileName, parallelHostName, portNum)
153 int numInputFiles;
154 char *outputFileName;
155 char *parallelHostName;
156 int portNum;
157 {
158 fprintf(stdout, "ERROR: (StartCombineServer) This machine can NOT run parallel version\n");
159 exit(1);
160 }
161
162
163 void
164 NoteFrameDone(frameStart, frameEnd)
165 int frameStart;
166 int frameEnd;
167 {
168 fprintf(stdout, "ERROR: (NoteFrameDone) This machine can NOT run parallel version\n");
169 exit(1);
170 }
171
172 /* SendRemoteFrame
173 */
174 void
175 SendRemoteFrame(frameNumber, bb)
176 int frameNumber;
177 BitBucket *bb;
178 {
179 fprintf(stdout, "ERROR: (SendRemoteFrame) This machine can NOT run parallel version\n");
180 exit(1);
181 }
182
183
184 /* GetRemoteFrame
185 */
186 void
187 GetRemoteFrame(frame, frameNumber)
188 MpegFrame *frame;
189 int frameNumber;
190 {
191 fprintf(stdout, "ERROR: (GetRemoteFrame) This machine can NOT run parallel version\n");
192 exit(1);
193 }
194
195
196 void
197 WaitForOutputFile(number)
198 int number;
199 {
200 fprintf(stdout, "ERROR: (WaitForOutputFile) This machine can NOT run parallel version\n");
201 exit(1);
202 }
203
204
205 /*=======================*
206 * PARALLEL SERVER STUFF *
207 *=======================*/
208
209
210 /* StartMasterServer
211 */
212 void
213 StartMasterServer(numInputFiles, paramFile, outputFileName)
214 int numInputFiles;
215 char *paramFile;
216 char *outputFileName;
217 {
218 fprintf(stdout, "ERROR: (StartMasterServer) This machine can NOT run parallel version\n");
219 exit(1);
220 }
221
222
223 /* NotifyMasterDone
224 */
225 boolean
226 NotifyMasterDone(hostName, portNum, machineNumber, seconds, frameStart,
227 frameEnd)
228 char *hostName;
229 int portNum;
230 int machineNumber;
231 int seconds;
232 int *frameStart;
233 int *frameEnd;
234 {
235 fprintf(stdout, "ERROR: (NotifyMasterDone) This machine can NOT run parallel version\n");
236 exit(1);
237 }
238
239
240 void
241 StartDecodeServer(numInputFiles, decodeFileName, parallelHostName, portNum)
242 int numInputFiles;
243 char *decodeFileName;
244 char *parallelHostName;
245 int portNum;
246 {
247 fprintf(stdout, "ERROR: (StartDecodeServer) This machine can NOT run parallel version\n");
248 exit(1);
249 }
250
251
252 void
253 NotifyDecodeServerReady(id)
254 int id;
255 {
256 fprintf(stdout, "ERROR: (NotifyDecodeServerReady) This machine can NOT run parallel version\n");
257 exit(1);
258 }
259
260
261 void
262 WaitForDecodedFrame(id)
263 int id;
264 {
265 fprintf(stdout, "ERROR: (WaitForDecodedFrame) This machine can NOT run parallel version\n");
266 exit(1);
267 }
268
269 void
270 SendDecodedFrame(frame)
271 MpegFrame *frame;
272 {
273 fprintf(stdout, "ERROR: (SendDecodedFrame) This machine can NOT run parallel version\n");
274 exit(1);
275 }
276
277 void
278 GetRemoteDecodedRefFrame(frame, frameNumber)
279 MpegFrame *frame;
280 int frameNumber;
281 {
282 fprintf(stdout, "ERROR: (GetRemoteDecodedRefFrame) This machine can NOT run parallel version\n");
283 exit(1);
284 }