Annotation of multiplexer/init.c, revision 1.1
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: exit (EXIT_SUCCESS);
! 42: } else {
! 43: warn (LERR,"Command Fail",EINI,0,7,0);
! 44: }
! 45: } else {
! 46: warn (LERR,"Dispatch Fail",EINI,0,6,0);
! 47: }
! 48: } else {
! 49: warn (LERR,"Splice Fail",EINI,0,5,0);
! 50: }
! 51: } else {
! 52: warn (LERR,"Output Fail",EINI,0,4,0);
! 53: }
! 54: } else {
! 55: warn (LERR,"Input Fail",EINI,0,3,0);
! 56: }
! 57: exit (EXIT_FAILURE);
! 58: }
! 59:
LinuxTV legacy CVS <linuxtv.org/cvs>