Mercurial > mplayer.hg
annotate libmpdemux/muxer.c @ 15889:efb8b8fa323e
Add missing escapes, this should now cover all shell special characters AFAICS
author | ranma |
---|---|
date | Sat, 02 Jul 2005 19:12:01 +0000 |
parents | 59e8dcea6d9e |
children | 6ff3379a0862 |
rev | line source |
---|---|
8585 | 1 |
2 #include <stdio.h> | |
3 #include <stdlib.h> | |
4 #include <string.h> | |
5 #include <inttypes.h> | |
8591 | 6 #include <unistd.h> |
8585 | 7 |
8 #include "config.h" | |
9 #include "../version.h" | |
10 | |
12341
0db4a3a5b01d
removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
12016
diff
changeset
|
11 #include "aviheader.h" |
0db4a3a5b01d
removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
12016
diff
changeset
|
12 #include "ms_hdr.h" |
8585 | 13 |
14 #include "muxer.h" | |
14753
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
15 #include "stream.h" |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
16 #include "demuxer.h" |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
17 #include "mp_msg.h" |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
18 #include "help_mp.h" |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
19 #include "stheader.h" |
8585 | 20 |
9007
12fc55eb3373
Cleanup of the muxer API, func parameters muxer & muxer_f eliminated.
arpi
parents:
8591
diff
changeset
|
21 muxer_t *muxer_new_muxer(int type,FILE *f){ |
8585 | 22 muxer_t* muxer=malloc(sizeof(muxer_t)); |
23 memset(muxer,0,sizeof(muxer_t)); | |
9007
12fc55eb3373
Cleanup of the muxer API, func parameters muxer & muxer_f eliminated.
arpi
parents:
8591
diff
changeset
|
24 muxer->file = f; |
8585 | 25 switch (type) { |
26 case MUXER_TYPE_MPEG: | |
14753
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
27 if(! muxer_init_muxer_mpeg(muxer)) |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
28 return NULL; |
8585 | 29 break; |
12016 | 30 case MUXER_TYPE_RAWVIDEO: |
14753
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
31 if(! muxer_init_muxer_rawvideo(muxer)) |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
32 return NULL; |
12016 | 33 break; |
15794
59e8dcea6d9e
messed up ordering of cases, special delivery of Cola to Tobias
henry
parents:
15754
diff
changeset
|
34 case MUXER_TYPE_RAWAUDIO: |
59e8dcea6d9e
messed up ordering of cases, special delivery of Cola to Tobias
henry
parents:
15754
diff
changeset
|
35 if(! muxer_init_muxer_rawaudio(muxer)) |
59e8dcea6d9e
messed up ordering of cases, special delivery of Cola to Tobias
henry
parents:
15754
diff
changeset
|
36 return NULL; |
59e8dcea6d9e
messed up ordering of cases, special delivery of Cola to Tobias
henry
parents:
15754
diff
changeset
|
37 break; |
14757
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
38 #ifdef USE_LIBAVFORMAT |
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
39 case MUXER_TYPE_LAVF: |
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
40 if(! muxer_init_muxer_lavf(muxer)) |
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
41 return NULL; |
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
42 break; |
7a2adc5e8928
initial, extremely experimental, libavformat muxer; don't expect anything to work yet
nicodvb
parents:
14753
diff
changeset
|
43 #endif |
8585 | 44 case MUXER_TYPE_AVI: |
45 default: | |
14753
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
46 if(! muxer_init_muxer_avi(muxer)) |
70c446099f40
new mpeg muxer compatible with dvd/[s]vcd; small changes in the muxer layer (sanity checks in the muxer_init functions)
nicodvb
parents:
12341
diff
changeset
|
47 return NULL; |
8585 | 48 } |
49 return muxer; | |
50 } |