updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / replex-yacoto / replex-0.1.6.8-yacoto.diff
blobc47bf59be7f34b7f7f948290e7eb8bba53da6a64
1 diff -ruN replex-0.1.6.8/replex.c replex-0.1.6.8a/replex.c
2 --- replex-0.1.6.8/replex.c 2007-06-19 11:30:08.000000000 +0200
3 +++ replex-0.1.6.8a/replex.c 2008-03-20 10:31:31.000000000 +0100
4 @@ -287,7 +287,7 @@
5 *filled = 1;
8 - if (iu->length != aframe->framesize){
9 + if (iu->length != aframe->framesize && iu->length != aframe->framesize + 4){
10 iu->err= FRAME_ERR;
11 fprintf(stderr,"Wrong audio frame size: %d (%d)\n",
12 iu->length, aframe->framesize);
13 @@ -1095,6 +1095,7 @@
15 case PRIVATE_STREAM1:{
16 int hl=4;
17 + if (!rx->ac3n) break;
18 if (rx->vdr){
19 hl=0;
20 p->type=0x80;
21 @@ -1570,7 +1571,7 @@
23 case PRIVATE_STREAM1:
24 if (rx->vdr){
25 - rx->scan_found = 0x80;
26 + rx->scan_found = p->cid;
27 break;
29 else {
30 @@ -1680,6 +1681,7 @@
31 break;
33 case 0x80 ... 0x8f:
34 + case PRIVATE_STREAM1:
36 int old=0;
37 for (j=0; j < ac3n; j++)
38 @@ -1689,15 +1691,10 @@
40 if (!old){
41 ac3pid[ac3n]=rx->ac3_id[ac3n]=rx->scan_found;
42 - if (rx->vdr){
43 - printf("possible AC3 AUDIO with private stream 1 pid (0xbd) \n");
44 - }
45 - else {
46 - printf("AC3 AUDIO %d: 0x%02x (%d) \n",
47 - ac3n+1,
48 - (int)ac3pid[ac3n],
49 - (int)ac3pid[ac3n]);
50 - }
51 + printf("AC3 AUDIO %d: 0x%02x (%d) \n",
52 + ac3n+1,
53 + (int)ac3pid[ac3n],
54 + (int)ac3pid[ac3n]);
55 if (ac3n+1< MAXAC3PID) ac3n++;
57 rx->scan_found = 0;
58 @@ -2406,8 +2403,11 @@
61 while (get_next_video_unit(rx, &dummy)){
62 - ring_read_file(&rx->vrbuffer, rx->dmx_out[0],
63 - dummy.length);
64 + if ( ! rx->audio_only )
65 + ring_read_file(&rx->vrbuffer, rx->dmx_out[0],
66 + dummy.length);
67 + else
68 + ring_skip(&rx->vrbuffer, dummy.length);
72 @@ -2480,6 +2480,7 @@
73 printf (" --allow_jump, -j : allow jump in the PTS and try repair\n");
74 printf (" --keep_PTS, -k : keep and don't correct PTS information of original\n");
75 printf (" --min_jump, -l <integer> : don't try to fix jumps in PTS larger than <int> but treat them as a cut (default 100ms)\n");
76 + printf (" --audio_only -n : don't demux video stream\n");
77 printf (" --of, -o <filename> : set output file\n");
78 printf (" --fillzero -p : fill audio frames with zeros (only MPEG AUDIO)\n");
79 printf (" --max_overflow -q <integer> : max_number of overflows allowed (default: 100, 0=no restriction)\n");
80 @@ -2518,20 +2519,21 @@
81 {"ac3_id", required_argument, NULL, 'c'},
82 {"video_delay", required_argument, NULL, 'd'},
83 {"audio_delay", required_argument, NULL, 'e'},
84 - {"ignore_PTS",required_argument, NULL, 'f'},
85 + {"ignore_PTS",no_argument, NULL, 'f'},
86 {"larger_buffer",required_argument, NULL, 'g'},
87 {"help", no_argument , NULL, 'h'},
88 {"input_stream", required_argument, NULL, 'i'},
89 - {"allow_jump",required_argument, NULL, 'j'},
90 - {"keep_PTS",required_argument, NULL, 'k'},
91 + {"allow_jump",no_argument, NULL, 'j'},
92 + {"keep_PTS",no_argument, NULL, 'k'},
93 {"min_jump",required_argument, NULL, 'l'},
94 + {"audio_only",no_argument, NULL, 'n'},
95 {"of",required_argument, NULL, 'o'},
96 - {"fillzero",required_argument, NULL, 'p'},
97 + {"fillzero",no_argument, NULL, 'p'},
98 {"max_overflow",required_argument, NULL, 'q'},
99 - {"scan",required_argument, NULL, 's'},
100 + {"scan",no_argument, NULL, 's'},
101 {"type", required_argument, NULL, 't'},
102 {"video_pid", required_argument, NULL, 'v'},
103 - {"vdr",required_argument, NULL, 'x'},
104 + {"vdr",no_argument, NULL, 'x'},
105 {"analyze",required_argument, NULL, 'y'},
106 {"demux",no_argument, NULL, 'z'},
107 {0, 0, 0, 0}
108 @@ -2580,11 +2582,14 @@
109 rx.allow_jump = MIN_JUMP;
110 break;
111 case 'k':
112 - rx.keep_pts =1;
113 + rx.keep_pts = 1;
114 break;
115 case 'l':
116 min_jump = strtol(optarg,(char **)NULL, 0) *CLOCK_MS;
117 break;
118 + case 'n':
119 + rx.audio_only = 1;
120 + break;
121 case 'o':
122 filename = optarg;
123 break;
124 @@ -2726,19 +2731,21 @@
125 exit(0);
128 - snprintf(fname,256,"%s.mv2",filename);
129 - if ((rx.dmx_out[0] = open(fname,O_WRONLY|
130 - O_CREAT|O_TRUNC|
131 - O_LARGEFILE,
132 - S_IRUSR|S_IWUSR|
133 - S_IRGRP|S_IWGRP|
134 - S_IROTH|S_IWOTH))
135 - < 0){
136 - perror("Error opening output file");
137 - exit(1);
138 + if( ! rx.audio_only ) {
139 + snprintf(fname,256,"%s.mv2",filename);
140 + if ((rx.dmx_out[0] = open(fname,O_WRONLY|
141 + O_CREAT|O_TRUNC|
142 + O_LARGEFILE,
143 + S_IRUSR|S_IWUSR|
144 + S_IRGRP|S_IWGRP|
145 + S_IROTH|S_IWOTH))
146 + < 0){
147 + perror("Error opening output file");
148 + exit(1);
150 + fprintf(stderr,"Video output File is: %s\n",
151 + fname);
153 - fprintf(stderr,"Video output File is: %s\n",
154 - fname);
156 for (i=0; i < rx.apidn; i++){
157 snprintf(fname,256,"%s%d.mp2",filename
158 diff -ruN replex-0.1.6.8/replex.h replex-0.1.6.8a/replex.h
159 --- replex-0.1.6.8/replex.h 2007-06-19 11:30:08.000000000 +0200
160 +++ replex-0.1.6.8a/replex.h 2008-03-20 10:31:31.000000000 +0100
161 @@ -66,6 +66,7 @@
162 int fillzero;
163 int overflows;
164 int max_overflows;
165 + int audio_only;
167 uint64_t video_delay;
168 uint64_t audio_delay;
169 --- replex-0.1.6.8/element.c 2007-06-19 11:30:08.000000000 +0200
170 +++ replex-0.1.6.8a/element.c 2008-12-18 19:27:35.452042858 +0100
171 @@ -566,7 +566,7 @@
173 int c = 0;
174 int fr =0;
175 - uint8_t headr[4];
176 + uint8_t headr[7];
177 int sample_rate_index;
179 af->set=0;
180 @@ -632,7 +632,7 @@
181 int get_ac3_info(ringbuffer *rbuf, audio_frame_t *af, long off, int le, int verb)
183 int c=0;
184 - uint8_t headr[6];
185 + uint8_t headr[7];
186 uint8_t frame;
187 int half = 0;
188 int fr;