Annotation of multiplexer/init.c, revision 1.2
1.1 oskar 1: /*
2: * ISO 13818 stream multiplexer
3: * Copyright (C) 2001 Convergence Integrated Media GmbH Berlin
4: * Author: Oskar Schirmer (oskar@convergence.de)
5: */
6:
7: /*
8: * Module: Init
9: * Purpose: Initialization and start the dispatcher loop.
10: */
11:
12: #include "global.h"
13: #include "crc.h"
14: #include "error.h"
15: #include "input.h"
16: #include "output.h"
17: #include "splice.h"
18: #include "command.h"
19: #include "dispatch.h"
20:
21: int main(int argc,
22: char *argv[])
23: {
24: int a;
25: global_init ();
26: a = msec_now ();
27: gen_crc_table ();
28: if (input_init ()) {
29: if (output_init ()) {
30: if (splice_init ()) {
31: if (dispatch_init ()) {
32: if (command_init (argc,&argv[0])) {
33: dispatch ();
34: /*
35: warn (LDEB,"Global delta",EINI,0,0,global_delta);
36: warn (LERR,"(No Error) Exit Time ",EINI,0,0,
37: msec_now () - a);
38: warn (LERR,"(No Error) Exit Clock",EINI,0,0,
39: clock ()/(CLOCKS_PER_SEC/1000));
40: */
41: }
1.2 ! oskar 42: exit (EXIT_SUCCESS);
1.1 oskar 43: } else {
44: warn (LERR,"Dispatch Fail",EINI,0,6,0);
45: }
46: } else {
47: warn (LERR,"Splice Fail",EINI,0,5,0);
48: }
49: } else {
50: warn (LERR,"Output Fail",EINI,0,4,0);
51: }
52: } else {
53: warn (LERR,"Input Fail",EINI,0,3,0);
54: }
55: exit (EXIT_FAILURE);
56: }
57:
LinuxTV legacy CVS <linuxtv.org/cvs>