1 #include "main.h"
2 /*************************************************************************
3     Startbildschirm und Anzahl der Argumente
4 
5     Intro Screen and argument check
6 *************************************************************************/
7 
8 /******************************************************************
9 	Status_Info
10 
11 	prints a status line during multiplexing
12 ******************************************************************/
13 
status_info(unsigned int nsectors_a,unsigned int nsectors_a1,unsigned int nsectors_a2,unsigned int nsectors_a3,unsigned int nsectors_a4,unsigned int nsectors_a5,unsigned int nsectors_a6,unsigned int nsectors_a7,unsigned int nsectors_v,unsigned int nsectors_p,double nbytes,unsigned int buf_v,unsigned int buf_a,unsigned int buf_a1,unsigned int buf_a2,unsigned int buf_a3,unsigned int buf_a4,unsigned int buf_a5,unsigned int buf_a6,unsigned int buf_a7)14 void status_info (
15 unsigned int nsectors_a,
16 unsigned int nsectors_a1,
17 unsigned int nsectors_a2,
18 unsigned int nsectors_a3,
19 unsigned int nsectors_a4,
20 unsigned int nsectors_a5,
21 unsigned int nsectors_a6,
22 unsigned int nsectors_a7,
23 unsigned int nsectors_v,
24 unsigned int nsectors_p,
25 double nbytes,
26 unsigned int buf_v,
27 unsigned int buf_a,
28 unsigned int buf_a1,
29 unsigned int buf_a2,
30 unsigned int buf_a3,
31 unsigned int buf_a4,
32 unsigned int buf_a5,
33 unsigned int buf_a6,
34 unsigned int buf_a7)
35 {
36   fprintf(statfile, "  | %7d | %7d | %7d | %7d | %7d | %7d | %7d | %7d     | %7d | %7d | %11.0f \
37 | %6d | %6d | %6d | %6d | %6d | %6d | %6d | %6d | %6d |\n",
38       nsectors_a, nsectors_a1, nsectors_a2, nsectors_a3, nsectors_a4, nsectors_a5, nsectors_a6, nsectors_a7,
39  nsectors_v, nsectors_p, nbytes, buf_a, buf_a1, buf_a2, buf_a3, buf_a4, buf_a5, buf_a6, buf_a7, buf_v);
40 }
41 
42 
status_header(char * filename)43 void status_header(char *filename)
44 {
45   fprintf(statfile, "\n");
46   fprintf(statfile, "Multiplexing file %s\n\n", filename);
47   status_footer();
48   fprintf(statfile, "  |  Audio1 |  Audio2 |  Video  | Padding | Bytes  MPEG | Audio1 | Audio2 | Video  |\n");
49   fprintf(statfile, "  | Sectors | Sectors | Sectors | Sectors | System File | Buffer | Buffer | Buffer |\n");
50   status_footer();
51 }
52 
53 
status_message(unsigned char what)54 void status_message (
55 unsigned char what)
56 {
57   switch (what)
58   {
59     case STATUS_AUDIO_END:
60       fprintf(statfile, "  |file  end|         |         |         |             |        |        |        |\n");
61       break;
62     case STATUS_AUDIO_TIME_OUT:
63       fprintf(statfile, "  |time  out|         |         |         |             |        |        |        |\n");
64       break;
65     case STATUS_AUDIO1_END:
66       fprintf(statfile, "  |         |file  end|         |         |             |        |        |        |\n");
67       break;
68     case STATUS_AUDIO1_TIME_OUT:
69       fprintf(statfile, "  |         |time  out|         |         |             |        |        |        |\n");
70       break;
71     case STATUS_VIDEO_END:
72       fprintf(statfile, "  |         |         |file  end|         |             |        |        |        |\n");
73       break;
74     case STATUS_VIDEO_TIME_OUT:
75       fprintf(statfile, "  |         |         |time  out|         |             |        |        |        |\n");
76   }
77 }
78 
status_footer()79 void status_footer ()
80 {
81   fprintf(statfile, "  +---------+---------+---------+---------+-------------+--------+--------+--------+\n");
82 }
83