ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mpeg_encode/src/noparallel.c
Revision: 22
Committed: Mon Jul 7 22:16:37 2008 UTC (11 years ago) by wdelano
File size: 6588 byte(s)
Log Message:
initial checkin of mpeg_encode source
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
84
85 /*==================*
86 * GLOBAL VARIABLES *
87 *==================*/
88
89 int parallelTestFrames = 10;
90 int parallelTimeChunks = 60;
91 char *IOhostName;
92 int ioPortNumber;
93 int combinePortNumber;
94 int decodePortNumber;
95 boolean niceProcesses = FALSE;
96 boolean forceIalign = FALSE;
97 int machineNumber = -1;
98 boolean remoteIO = FALSE;
99 boolean separateConversion;
100 time_t IOtime = 0;
101
102
103 /*=====================*
104 * EXPORTED PROCEDURES *
105 *=====================*/
106
107 /*=================*
108 * IO SERVER STUFF *
109 *=================*/
110
111
112 void
113 SetIOConvert(separate)
114 boolean separate;
115 {
116 /* do nothing -- this may be called during non-parallel execution */
117 }
118
119
120 void
121 SetParallelPerfect(val)
122 boolean val;
123 {
124 /* do nothing -- this may be called during non-parallel execution */
125 }
126
127
128 void
129 SetRemoteShell(shell)
130 char *shell;
131 {
132 /* do nothing -- this may be called during non-parallel execution */
133 }
134
135
136 /* StartIOServer
137 */
138 void
139 StartIOServer(numInputFiles, parallelHostName, portNum)
140 int numInputFiles;
141 char *parallelHostName;
142 int portNum;
143 {
144 fprintf(stdout, "ERROR: (StartIOServer) This machine can NOT run parallel version\n");
145 exit(1);
146 }
147
148
149 void
150 StartCombineServer(numInputFiles, outputFileName, parallelHostName, portNum)
151 int numInputFiles;
152 char *outputFileName;
153 char *parallelHostName;
154 int portNum;
155 {
156 fprintf(stdout, "ERROR: (StartCombineServer) This machine can NOT run parallel version\n");
157 exit(1);
158 }
159
160
161 void
162 NoteFrameDone(frameStart, frameEnd)
163 int frameStart;
164 int frameEnd;
165 {
166 fprintf(stdout, "ERROR: (NoteFrameDone) This machine can NOT run parallel version\n");
167 exit(1);
168 }
169
170 /* SendRemoteFrame
171 */
172 void
173 SendRemoteFrame(frameNumber, bb)
174 int frameNumber;
175 BitBucket *bb;
176 {
177 fprintf(stdout, "ERROR: (SendRemoteFrame) This machine can NOT run parallel version\n");
178 exit(1);
179 }
180
181
182 /* GetRemoteFrame
183 */
184 void
185 GetRemoteFrame(frame, frameNumber)
186 MpegFrame *frame;
187 int frameNumber;
188 {
189 fprintf(stdout, "ERROR: (GetRemoteFrame) This machine can NOT run parallel version\n");
190 exit(1);
191 }
192
193
194 void
195 WaitForOutputFile(number)
196 int number;
197 {
198 fprintf(stdout, "ERROR: (WaitForOutputFile) This machine can NOT run parallel version\n");
199 exit(1);
200 }
201
202
203 /*=======================*
204 * PARALLEL SERVER STUFF *
205 *=======================*/
206
207
208 /* StartMasterServer
209 */
210 void
211 StartMasterServer(numInputFiles, paramFile, outputFileName)
212 int numInputFiles;
213 char *paramFile;
214 char *outputFileName;
215 {
216 fprintf(stdout, "ERROR: (StartMasterServer) This machine can NOT run parallel version\n");
217 exit(1);
218 }
219
220
221 /* NotifyMasterDone
222 */
223 boolean
224 NotifyMasterDone(hostName, portNum, machineNumber, seconds, frameStart,
225 frameEnd)
226 char *hostName;
227 int portNum;
228 int machineNumber;
229 int seconds;
230 int *frameStart;
231 int *frameEnd;
232 {
233 fprintf(stdout, "ERROR: (NotifyMasterDone) This machine can NOT run parallel version\n");
234 exit(1);
235 }
236
237
238 void
239 StartDecodeServer(numInputFiles, decodeFileName, parallelHostName, portNum)
240 int numInputFiles;
241 char *decodeFileName;
242 char *parallelHostName;
243 int portNum;
244 {
245 fprintf(stdout, "ERROR: (StartDecodeServer) This machine can NOT run parallel version\n");
246 exit(1);
247 }
248
249
250 void
251 NotifyDecodeServerReady(id)
252 int id;
253 {
254 fprintf(stdout, "ERROR: (NotifyDecodeServerReady) This machine can NOT run parallel version\n");
255 exit(1);
256 }
257
258
259 void
260 WaitForDecodedFrame(id)
261 int id;
262 {
263 fprintf(stdout, "ERROR: (WaitForDecodedFrame) This machine can NOT run parallel version\n");
264 exit(1);
265 }
266
267 void
268 SendDecodedFrame(frame)
269 MpegFrame *frame;
270 {
271 fprintf(stdout, "ERROR: (SendDecodedFrame) This machine can NOT run parallel version\n");
272 exit(1);
273 }
274
275 void
276 GetRemoteDecodedRefFrame(frame, frameNumber)
277 MpegFrame *frame;
278 int frameNumber;
279 {
280 fprintf(stdout, "ERROR: (GetRemoteDecodedRefFrame) This machine can NOT run parallel version\n");
281 exit(1);
282 }