Line 0
Link Here
|
|
|
1 |
--- player/src/mp4_file.cpp.orig 2006-12-01 00:19:30.000000000 +0100 |
2 |
+++ player/src/mp4_file.cpp 2012-12-06 18:08:29.688685040 +0100 |
3 |
@@ -55,7 +55,7 @@ |
4 |
MP4FileHandle fh; |
5 |
CMp4File *Mp4File1; |
6 |
|
7 |
- fh = MP4Read(name, MP4_DETAILS_ERROR); // | MP4_DETAILS_READ | MP4_DETAILS_SAMPLE); |
8 |
+ fh = MP4Read(name); |
9 |
if (!MP4_IS_VALID_FILE_HANDLE(fh)) { |
10 |
psptr->set_message("`%s\' is not an mp4 file", name); |
11 |
return -1; |
12 |
@@ -170,8 +170,8 @@ |
13 |
* in this context original format is encv |
14 |
* and compressor specifies which codec |
15 |
*/ |
16 |
- uint32_t verb = MP4GetVerbosity(m_mp4file); |
17 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
18 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
19 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
20 |
if (strcasecmp(vq[ix].original_fmt, "avc1") == 0) { |
21 |
vbyte = new CMp4H264VideoByteStream(this, vq[ix].track_id); |
22 |
} else if (strcasecmp(vq[ix].original_fmt, "encv") == 0) { |
23 |
@@ -205,7 +205,7 @@ |
24 |
} else { |
25 |
vbyte = new CMp4VideoByteStream(this, vq[ix].track_id); |
26 |
} |
27 |
- MP4SetVerbosity(m_mp4file, verb); |
28 |
+ MP4LogSetLevel(verb); |
29 |
|
30 |
if (vbyte == NULL) { |
31 |
delete mptr; |
32 |
@@ -216,9 +216,9 @@ |
33 |
if (ret != 0) { |
34 |
return (-1); |
35 |
} |
36 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
37 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
38 |
char *mp4info = MP4Info(m_mp4file, vq[ix].track_id); |
39 |
- MP4SetVerbosity(m_mp4file, verb); |
40 |
+ MP4LogSetLevel(verb); |
41 |
char *temp = mp4info; |
42 |
while (*temp != '\0') { |
43 |
if (isspace(*temp)) *temp = ' '; |
44 |
@@ -253,8 +253,8 @@ |
45 |
} |
46 |
|
47 |
/* check if ismacryp */ |
48 |
- uint32_t verb = MP4GetVerbosity(m_mp4file); |
49 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
50 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
51 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
52 |
if (MP4IsIsmaCrypMediaTrack(m_mp4file, aq[ix].track_id)) { |
53 |
MP4GetTrackIntegerProperty(m_mp4file, |
54 |
aq[ix].track_id, "mdia.minf.stbl.stsd.enca.sinf.schi.iSFM.IV-length", &IVLength); |
55 |
@@ -262,7 +262,7 @@ |
56 |
} else { |
57 |
abyte = new CMp4AudioByteStream(this, aq[ix].track_id); |
58 |
} |
59 |
- MP4SetVerbosity(m_mp4file, verb); |
60 |
+ MP4LogSetLevel(verb); |
61 |
|
62 |
audio_info_t *ainfo; |
63 |
ainfo = (audio_info_t *)malloc(sizeof(audio_info_t)); |
64 |
@@ -310,9 +310,9 @@ |
65 |
if (ret != 0) { |
66 |
return (-1); |
67 |
} |
68 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
69 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
70 |
char *mp4info = MP4Info(m_mp4file, aq[ix].track_id); |
71 |
- MP4SetVerbosity(m_mp4file, verb); |
72 |
+ MP4LogSetLevel(verb); |
73 |
char *temp = mp4info; |
74 |
while (*temp != '\0') { |
75 |
if (isspace(*temp)) *temp = ' '; |
76 |
@@ -339,7 +339,7 @@ |
77 |
//uint64_t IVLength; |
78 |
CPlayerMedia *mptr; |
79 |
codec_plugin_t *plugin; |
80 |
- uint32_t verb = MP4GetVerbosity(m_mp4file); |
81 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
82 |
for (ix = 0; ix < text_offset; ix++) { |
83 |
if (tq[ix].enabled != 0) { |
84 |
CMp4TextByteStream *tbyte; |
85 |
@@ -350,8 +350,8 @@ |
86 |
|
87 |
/* check if ismacryp */ |
88 |
#if 0 |
89 |
- uint32_t verb = MP4GetVerbosity(m_mp4file); |
90 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
91 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
92 |
+ MP4LogSetLevel(MP4_LOGL_NONE); |
93 |
if (MP4IsIsmaCrypMediaTrack(m_mp4file, aq[ix].track_id)) { |
94 |
IVLength = MP4GetTrackIntegerProperty(m_mp4file, |
95 |
aq[ix].track_id, "mdia.minf.stbl.stsd.enca.sinf.schi.iSFM.IV-length"); |
96 |
@@ -359,7 +359,7 @@ |
97 |
} else { |
98 |
abyte = new CMp4AudioByteStream(this, aq[ix].track_id); |
99 |
} |
100 |
- MP4SetVerbosity(m_mp4file, verb); |
101 |
+ MP4LogSetLevel(verb); |
102 |
#else |
103 |
tbyte = new CMp4TextByteStream(this, tq[ix].track_id, |
104 |
MP4GetHrefTrackBaseUrl(m_mp4file, |
105 |
@@ -394,9 +394,9 @@ |
106 |
if (ret != 0) { |
107 |
return (-1); |
108 |
} |
109 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
110 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
111 |
char *mp4info = MP4Info(m_mp4file, tq[ix].track_id); |
112 |
- MP4SetVerbosity(m_mp4file, verb); |
113 |
+ MP4LogSetLevel(verb); |
114 |
char *temp = mp4info; |
115 |
while (*temp != '\0') { |
116 |
if (isspace(*temp)) *temp = ' '; |
117 |
@@ -433,13 +433,13 @@ |
118 |
u_int32_t bufsize; |
119 |
char original_fmt[8]; |
120 |
|
121 |
- uint32_t verb = MP4GetVerbosity(m_mp4file); |
122 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
123 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
124 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
125 |
video_count = MP4GetNumberOfTracks(m_mp4file, MP4_VIDEO_TRACK_TYPE); |
126 |
audio_count = MP4GetNumberOfTracks(m_mp4file, MP4_AUDIO_TRACK_TYPE); |
127 |
text_count = MP4GetNumberOfTracks(m_mp4file, MP4_CNTL_TRACK_TYPE); |
128 |
mp4f_message(LOG_DEBUG, "cntl tracks %u", text_count); |
129 |
- MP4SetVerbosity(m_mp4file, verb); |
130 |
+ MP4LogSetLevel(verb); |
131 |
|
132 |
if (video_count == 0 && audio_count == 0 && text_count == 0) { |
133 |
psptr->set_message("No audio, video or control tracks in file"); |
134 |
@@ -492,9 +492,9 @@ |
135 |
uint8_t profileID = MP4GetVideoProfileLevel(m_mp4file, trackId); |
136 |
mp4f_message(LOG_DEBUG, "MP4 - got track %x profile ID %d", |
137 |
trackId, profileID); |
138 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
139 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
140 |
MP4GetTrackESConfiguration(m_mp4file, trackId, &foo, &bufsize); |
141 |
- MP4SetVerbosity(m_mp4file, verb); |
142 |
+ MP4LogSetLevel(verb); |
143 |
vq[video_offset].type = video_type; |
144 |
vq[video_offset].profile = profileID; |
145 |
vq[video_offset].fptr = NULL; |
146 |
@@ -609,13 +609,13 @@ |
147 |
uint8_t *userdata = NULL; |
148 |
u_int32_t userdata_size; |
149 |
aq[audio_offset].type = MP4GetTrackEsdsObjectTypeId(m_mp4file, trackId); |
150 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
151 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
152 |
aq[audio_offset].profile = MP4GetAudioProfileLevel(m_mp4file); |
153 |
MP4GetTrackESConfiguration(m_mp4file, |
154 |
trackId, |
155 |
&userdata, |
156 |
&userdata_size); |
157 |
- MP4SetVerbosity(m_mp4file, verb); |
158 |
+ MP4LogSetLevel(verb); |
159 |
aq[audio_offset].config = userdata; |
160 |
aq[audio_offset].config_len = userdata_size; |
161 |
} |
162 |
@@ -631,9 +631,9 @@ |
163 |
aq[audio_offset].fptr = NULL; |
164 |
aq[audio_offset].sampling_freq = |
165 |
MP4GetTrackTimeScale(m_mp4file, trackId); |
166 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
167 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
168 |
aq[audio_offset].chans = MP4GetTrackAudioChannels(m_mp4file, trackId); |
169 |
- MP4SetVerbosity(m_mp4file, verb); |
170 |
+ MP4LogSetLevel(verb); |
171 |
aq[audio_offset].enabled = 0; |
172 |
aq[audio_offset].reference = NULL; |
173 |
audio_offset++; |
174 |
@@ -711,14 +711,13 @@ |
175 |
if (audret < 0 || textret < 0) ret_value = -1; |
176 |
|
177 |
- char *name; |
178 |
- verb = MP4GetVerbosity(m_mp4file); |
179 |
- MP4SetVerbosity(m_mp4file, verb & ~(MP4_DETAILS_ERROR)); |
180 |
- if (MP4GetMetadataName(m_mp4file, &name) && |
181 |
- name != NULL) { |
182 |
- psptr->set_session_desc(0, name); |
183 |
- free(name); |
184 |
+ const MP4Tags *tags = MP4TagsAlloc(); |
185 |
+ verb = MP4LogGetLevel(); |
186 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
187 |
+ if (MP4TagsFetch(tags, m_mp4file) && tags->name != NULL) { |
188 |
+ psptr->set_session_desc(0, tags->name); |
189 |
} |
190 |
- MP4SetVerbosity(m_mp4file, verb); |
191 |
+ MP4TagsFree(tags); |
192 |
+ MP4LogSetLevel(verb); |
193 |
|
194 |
return (ret_value); |
195 |
} |
196 |
--- server/mp4creator/h264.cpp.orig 2006-10-24 00:26:43.000000000 +0200 |
197 |
+++ server/mp4creator/h264.cpp 2012-12-07 21:59:30.479928624 +0100 |
198 |
@@ -359,10 +359,9 @@ MP4TrackId H264Creator (MP4FileHandle mp |
199 |
} |
200 |
|
201 |
if (MP4GetNumberOfTracks(mp4File, MP4_VIDEO_TRACK_TYPE) == 1) { |
202 |
- uint32_t new_verb = Verbosity & ~(MP4_DETAILS_ERROR); |
203 |
- MP4SetVerbosity(mp4File, new_verb); |
204 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
205 |
MP4SetVideoProfileLevel(mp4File, 0x7f); |
206 |
- MP4SetVerbosity(mp4File, Verbosity); |
207 |
+ MP4LogSetLevel(Verbosity); |
208 |
} |
209 |
|
210 |
uint8_t *nal_buffer; |
211 |
@@ -431,7 +430,7 @@ MP4TrackId H264Creator (MP4FileHandle mp |
212 |
} |
213 |
} |
214 |
bool copy_nal_to_buffer = false; |
215 |
- if (Verbosity & MP4_DETAILS_SAMPLE) { |
216 |
+ if (Verbosity >= MP4_LOG_VERBOSE2) { |
217 |
printf("H264 type %x size %u\n", |
218 |
h264_dec.nal_unit_type, nal.buffer_on); |
219 |
} |
220 |
--- server/mp4creator/mp4creator.cpp.orig 2007-01-30 22:53:44.000000000 +0100 |
221 |
+++ server/mp4creator/mp4creator.cpp 2012-12-07 22:10:24.436581663 +0100 |
222 |
@@ -148,7 +148,7 @@ int main(int argc, char** argv) |
223 |
char* p3gppSupportedBrands[2] = {"3gp5", "3gp4"}; |
224 |
uint32_t newverbosity; |
225 |
|
226 |
- Verbosity = MP4_DETAILS_ERROR; |
227 |
+ Verbosity = MP4_LOG_ERROR; |
228 |
VideoFrameRate = 0; // determine from input file |
229 |
TimeScaleSpecified = false; |
230 |
Mp4TimeScale = 90000; |
231 |
@@ -385,21 +385,21 @@ int main(int argc, char** argv) |
232 |
createFlags |= MP4_CREATE_64BIT_TIME; |
233 |
break; |
234 |
case 'v': |
235 |
- Verbosity |= (MP4_DETAILS_READ | MP4_DETAILS_WRITE); |
236 |
+ Verbosity = MP4_LOG_INFO; |
237 |
if (optarg) { |
238 |
u_int32_t level; |
239 |
if (sscanf(optarg, "%u", &level) == 1) { |
240 |
if (level >= 2) { |
241 |
- Verbosity |= MP4_DETAILS_TABLE; |
242 |
+ Verbosity = MP4_LOG_VERBOSE1; |
243 |
} |
244 |
if (level >= 3) { |
245 |
- Verbosity |= MP4_DETAILS_SAMPLE; |
246 |
+ Verbosity = MP4_LOG_VERBOSE2; |
247 |
} |
248 |
if (level >= 4) { |
249 |
- Verbosity |= MP4_DETAILS_HINT; |
250 |
+ Verbosity = MP4_LOG_VERBOSE3; |
251 |
} |
252 |
if (level >= 5) { |
253 |
- Verbosity = MP4_DETAILS_ALL; |
254 |
+ Verbosity = MP4_LOG_VERBOSE4; |
255 |
} |
256 |
} |
257 |
} |
258 |
@@ -426,6 +426,7 @@ int main(int argc, char** argv) |
259 |
exit(EXIT_COMMAND_LINE); |
260 |
} |
261 |
|
262 |
+ MP4LogSetLevel(Verbosity); |
263 |
if ((argc - optind) == 1) { |
264 |
mp4FileName = argv[optind++]; |
265 |
} else { |
266 |
@@ -515,7 +516,6 @@ int main(int argc, char** argv) |
267 |
|
268 |
if ((!strcmp(extension, ".amr")) || (!strcmp(extension, ".263"))) { |
269 |
mp4File = MP4CreateEx(mp4FileName, |
270 |
- Verbosity, |
271 |
createFlags, |
272 |
1, // add ftyp atom |
273 |
0, // don't add iods |
274 |
@@ -524,7 +524,7 @@ int main(int argc, char** argv) |
275 |
p3gppSupportedBrands, |
276 |
sizeof(p3gppSupportedBrands) / sizeof(p3gppSupportedBrands[0])); |
277 |
} else { |
278 |
- mp4File = MP4Create(mp4FileName, Verbosity, |
279 |
+ mp4File = MP4Create(mp4FileName, |
280 |
createFlags); |
281 |
} |
282 |
if (mp4File) { |
283 |
@@ -546,7 +546,7 @@ int main(int argc, char** argv) |
284 |
fprintf(stderr, "Must specify 64 bits on new file only"); |
285 |
exit(EXIT_CREATE_FILE); |
286 |
} |
287 |
- mp4File = MP4Modify(mp4FileName, Verbosity); |
288 |
+ mp4File = MP4Modify(mp4FileName, 0); |
289 |
} |
290 |
|
291 |
if (!mp4File) { |
292 |
@@ -574,13 +574,12 @@ int main(int argc, char** argv) |
293 |
MP4GetTrackType(mp4File, *pTrackId); |
294 |
// look for objectTypeId (GetTrackEsdsObjectTypeId) |
295 |
uint64_t temp; |
296 |
- newverbosity = Verbosity & ~(MP4_DETAILS_ERROR); |
297 |
- MP4SetVerbosity(mp4File, newverbosity); |
298 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
299 |
bool ret = |
300 |
MP4GetTrackIntegerProperty(mp4File, *pTrackId, |
301 |
"mdia.minf.stbl.stsd.*.esds.decConfigDescr.objectTypeId", |
302 |
&temp); |
303 |
- MP4SetVerbosity(mp4File, Verbosity); |
304 |
+ MP4LogSetLevel(Verbosity); |
305 |
if (ret) { |
306 |
if (!strcmp(type, MP4_AUDIO_TRACK_TYPE)) { |
307 |
allMpeg4Streams &= |
308 |
@@ -624,20 +623,18 @@ int main(int argc, char** argv) |
309 |
"mdia.minf.stbl.stsd.*.esds.decConfigDescr.objectTypeId", |
310 |
&temp)) { |
311 |
if (!strcmp(type, MP4_AUDIO_TRACK_TYPE)) { |
312 |
- newverbosity = Verbosity & ~(MP4_DETAILS_ERROR); |
313 |
- MP4SetVerbosity(mp4File, newverbosity); |
314 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
315 |
allMpeg4Streams &= |
316 |
(MP4GetTrackEsdsObjectTypeId(mp4File, trackId) |
317 |
== MP4_MPEG4_AUDIO_TYPE); |
318 |
- MP4SetVerbosity(mp4File, Verbosity); |
319 |
+ MP4LogSetLevel(Verbosity); |
320 |
|
321 |
} else if (!strcmp(type, MP4_VIDEO_TRACK_TYPE)) { |
322 |
- newverbosity = Verbosity & ~(MP4_DETAILS_ERROR); |
323 |
- MP4SetVerbosity(mp4File, newverbosity); |
324 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
325 |
allMpeg4Streams &= |
326 |
(MP4GetTrackEsdsObjectTypeId(mp4File, trackId) |
327 |
== MP4_MPEG4_VIDEO_TYPE); |
328 |
- MP4SetVerbosity(mp4File, Verbosity); |
329 |
+ MP4LogSetLevel(Verbosity); |
330 |
} |
331 |
} |
332 |
} |
333 |
@@ -645,29 +642,30 @@ int main(int argc, char** argv) |
334 |
|
335 |
char *buffer; |
336 |
char *value; |
337 |
- newverbosity = Verbosity & ~(MP4_DETAILS_ERROR); |
338 |
- MP4SetVerbosity(mp4File, newverbosity); |
339 |
- bool retval = MP4GetMetadataTool(mp4File, &value); |
340 |
- MP4SetVerbosity(mp4File, Verbosity); |
341 |
- if (retval && value != NULL) { |
342 |
- if (strncasecmp("mp4creator", value, strlen("mp4creator")) != 0) { |
343 |
- buffer = (char *)malloc(strlen(value) + 80); |
344 |
- sprintf(buffer, "%s mp4creator %s", value, MPEG4IP_VERSION); |
345 |
- MP4SetMetadataTool(mp4File, buffer); |
346 |
+ const MP4Tags *tags = MP4TagsAlloc(); |
347 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
348 |
+ bool retval = MP4TagsFetch(tags, mp4File); |
349 |
+ MP4LogSetLevel(Verbosity); |
350 |
+ if (retval && tags->encodingTool != NULL) { |
351 |
+ if (strncasecmp("mp4creator", tags->encodingTool, strlen("mp4creator")) != 0) { |
352 |
+ buffer = (char *)malloc(strlen(tags->encodingTool) + 80); |
353 |
+ sprintf(buffer, "%s mp4creator %s", tags->encodingTool, MPEG4IP_VERSION); |
354 |
+ MP4TagsSetEncodingTool(tags, buffer); |
355 |
free(buffer); |
356 |
} |
357 |
} else { |
358 |
buffer = (char *)malloc(80); |
359 |
sprintf(buffer, "mp4creator %s", MPEG4IP_VERSION); |
360 |
- MP4SetMetadataTool(mp4File, buffer); |
361 |
+ MP4TagsSetEncodingTool(tags, buffer); |
362 |
} |
363 |
+ MP4TagsStore(tags, mp4File); |
364 |
+ MP4TagsFree(tags); |
365 |
bool is3GPP = Is3GPP(mp4File); |
366 |
|
367 |
MP4Close(mp4File); |
368 |
if (is3GPP || (force3GPCompliance)) { |
369 |
// If we created the file, CreateEX already takes care of this... |
370 |
MP4Make3GPCompliant(mp4FileName, |
371 |
- Verbosity, |
372 |
p3gppSupportedBrands[0], |
373 |
0x0001, |
374 |
p3gppSupportedBrands, |
375 |
@@ -682,7 +680,7 @@ int main(int argc, char** argv) |
376 |
exit(EXIT_CREATE_FILE); |
377 |
} |
378 |
|
379 |
- mp4File = MP4Read(mp4FileName, Verbosity); |
380 |
+ mp4File = MP4Read(mp4FileName); |
381 |
if (!mp4File) { |
382 |
// mp4 library should have printed a message |
383 |
exit(EXIT_CREATE_FILE); |
384 |
@@ -695,7 +693,7 @@ int main(int argc, char** argv) |
385 |
outputFileName = tempName; |
386 |
} |
387 |
|
388 |
- MP4FileHandle outputFile = MP4CreateEx(outputFileName, Verbosity, |
389 |
+ MP4FileHandle outputFile = MP4CreateEx(outputFileName, |
390 |
createFlags, true, true); |
391 |
MP4SetTimeScale(outputFile, Mp4TimeScale); |
392 |
u_int32_t numTracks = MP4GetNumberOfTracks(mp4File); |
393 |
@@ -799,7 +797,7 @@ int main(int argc, char** argv) |
394 |
exit(EXIT_CREATE_FILE); |
395 |
} |
396 |
|
397 |
- mp4File = MP4Read(mp4FileName, Verbosity); |
398 |
+ mp4File = MP4Read(mp4FileName); |
399 |
if (!mp4File) { |
400 |
// mp4 library should have printed a message |
401 |
exit(EXIT_CREATE_FILE); |
402 |
@@ -824,7 +822,7 @@ int main(int argc, char** argv) |
403 |
exit(EXIT_CREATE_FILE); |
404 |
} |
405 |
|
406 |
- mp4File = MP4Modify(mp4FileName, Verbosity); |
407 |
+ mp4File = MP4Modify(mp4FileName, 0); |
408 |
if (!mp4File) { |
409 |
// mp4 library should have printed a message |
410 |
exit(EXIT_CREATE_FILE); |
411 |
@@ -838,11 +836,11 @@ int main(int argc, char** argv) |
412 |
} |
413 |
|
414 |
if (doIsma) { |
415 |
- MP4MakeIsmaCompliant(mp4FileName, Verbosity); |
416 |
+ MP4MakeIsmaCompliant(mp4FileName, true); |
417 |
} |
418 |
|
419 |
if (doOptimize) { |
420 |
- if (!MP4Optimize(mp4FileName, NULL, Verbosity)) { |
421 |
+ if (!MP4Optimize(mp4FileName, NULL)) { |
422 |
// mp4 library should have printed a message |
423 |
exit(EXIT_OPTIMIZE_FILE); |
424 |
} |
425 |
--- server/mp4creator/mp4creator.h.orig 2014-07-27 15:16:12.338144192 +0400 |
426 |
+++ server/mp4creator/mp4creator.h 2014-07-27 15:39:16.134078312 +0400 |
427 |
@@ -55,7 +55,7 @@ |
428 |
#endif |
429 |
|
430 |
MP4CREATOR_GLOBAL char* ProgName; |
431 |
-MP4CREATOR_GLOBAL u_int32_t Verbosity; |
432 |
+MP4CREATOR_GLOBAL MP4LogLevel Verbosity; |
433 |
MP4CREATOR_GLOBAL double VideoFrameRate; |
434 |
MP4CREATOR_GLOBAL u_int32_t Mp4TimeScale; |
435 |
MP4CREATOR_GLOBAL bool TimeScaleSpecified; |
436 |
--- server/mp4live/file_mp4_recorder.cpp.orig 2007-01-30 22:53:45.000000000 +0100 |
437 |
+++ server/mp4live/file_mp4_recorder.cpp 2012-12-08 19:34:35.861642335 +0100 |
438 |
@@ -149,14 +149,11 @@ |
439 |
createFlags |= MP4_CREATE_64BIT_DATA; |
440 |
} |
441 |
debug_message("Creating huge file - %s", hugeFile ? "yes" : "no"); |
442 |
- u_int32_t verbosity = |
443 |
- MP4_DETAILS_ERROR /*DEBUG | MP4_DETAILS_WRITE_ALL */; |
444 |
|
445 |
bool create = false; |
446 |
switch (m_pConfig->GetIntegerValue(CONFIG_RECORD_MP4_FILE_STATUS)) { |
447 |
case FILE_MP4_APPEND: |
448 |
- m_mp4File = MP4Modify(filename, |
449 |
- verbosity); |
450 |
+ m_mp4File = MP4Modify(filename, 0); |
451 |
break; |
452 |
case FILE_MP4_CREATE_NEW: { |
453 |
struct stat stats; |
454 |
@@ -206,7 +203,6 @@ |
455 |
static char* p3gppSupportedBrands[2] = {"3gp5", "3gp4"}; |
456 |
|
457 |
m_mp4File = MP4CreateEx(m_mp4FileName, |
458 |
- verbosity, |
459 |
createFlags, |
460 |
1, |
461 |
0, |
462 |
@@ -216,7 +212,7 @@ |
463 |
NUM_ELEMENTS_IN_ARRAY(p3gppSupportedBrands)); |
464 |
} else { |
465 |
m_mp4File = MP4Create(m_mp4FileName, |
466 |
- verbosity, createFlags); |
467 |
+ createFlags); |
468 |
} |
469 |
} |
470 |
|
471 |
@@ -225,10 +221,16 @@ |
472 |
} |
473 |
MP4SetTimeScale(m_mp4File, m_movieTimeScale); |
474 |
|
475 |
+ { |
476 |
+ const MP4Tags *tags = MP4TagsAlloc(); |
477 |
+ MP4TagsFetch(tags, m_mp4File); |
478 |
char buffer[80]; |
479 |
sprintf(buffer, "mp4live version %s %s", MPEG4IP_VERSION, |
480 |
get_linux_video_type()); |
481 |
- MP4SetMetadataTool(m_mp4File, buffer); |
482 |
+ MP4TagsSetEncodingTool(tags, buffer); |
483 |
+ MP4TagsStore(tags, m_mp4File); |
484 |
+ MP4TagsFree(tags); |
485 |
+ } |
486 |
|
487 |
if (m_recordVideo) { |
488 |
m_videoFrameNumber = 1; |
489 |
@@ -1228,7 +1230,7 @@ |
490 |
// create hint tracks |
491 |
if (m_pConfig->GetBoolValue(CONFIG_RECORD_MP4_HINT_TRACKS)) { |
492 |
|
493 |
- m_mp4File = MP4Modify(m_mp4FileName, MP4_DETAILS_ERROR); |
494 |
+ m_mp4File = MP4Modify(m_mp4FileName, 0); |
495 |
|
496 |
if (m_pConfig->GetBoolValue(CONFIG_RECORD_MP4_OPTIMIZE)) { |
497 |
optimize = true; |
498 |
@@ -1276,7 +1278,6 @@ |
499 |
if (m_makeIod) { |
500 |
MP4MakeIsmaCompliant( |
501 |
m_mp4FileName, |
502 |
- 0, |
503 |
useIsmaTag); |
504 |
} |
505 |
} |
506 |
--- server/mp4live/sdp_file.cpp.orig 2006-06-08 21:01:58.000000000 +0200 |
507 |
+++ server/mp4live/sdp_file.cpp 2012-12-08 20:02:46.621607096 +0100 |
508 |
@@ -400,12 +400,7 @@ |
509 |
pStream->GetAudioProfile() == NULL ? 0 : |
510 |
pStream->GetAudioProfile()->GetIntegerValue(CFG_AUDIO_BIT_RATE), |
511 |
pAudioConfig, |
512 |
- audioConfigLength, |
513 |
-#ifdef DEBUG_IOD |
514 |
- pGlobal->GetBoolValue(CONFIG_APP_DEBUG) ? |
515 |
- MP4_DETAILS_ISMA : |
516 |
-#endif |
517 |
- 0 |
518 |
+ audioConfigLength |
519 |
); |
520 |
|
521 |
if (iod) { |
522 |
--- util/mpeg4vol/main.cpp.orig 2005-11-28 23:07:02.000000000 +0100 |
523 |
+++ util/mpeg4vol/main.cpp 2012-12-08 20:44:48.468221194 +0100 |
524 |
@@ -480,15 +480,15 @@ |
525 |
fprintf(stderr, "No decode of audio from mpeg4 files\n"); |
526 |
return -1; |
527 |
} |
528 |
- mp4File = MP4Read(*argv, MP4_DETAILS_ERROR); |
529 |
+ mp4File = MP4Read(*argv); |
530 |
if (MP4_IS_VALID_FILE_HANDLE(mp4File)) { |
531 |
MP4TrackId tid; |
532 |
uint32_t ix = 0; |
533 |
do { |
534 |
- uint32_t verb = MP4GetVerbosity(mp4File); |
535 |
- MP4SetVerbosity(mp4File, verb & ~(MP4_DETAILS_ERROR)); |
536 |
+ MP4LogLevel verb = MP4LogGetLevel(); |
537 |
+ MP4LogSetLevel(MP4_LOG_NONE); |
538 |
tid = MP4FindTrackId(mp4File, ix, MP4_VIDEO_TRACK_TYPE); |
539 |
- MP4SetVerbosity(mp4File, verb); |
540 |
+ MP4LogSetLevel(verb); |
541 |
if (MP4_IS_VALID_TRACK_ID(tid)) { |
542 |
uint8_t type = MP4GetTrackEsdsObjectTypeId(mp4File, tid); |
543 |
if (type == MP4_MPEG4_VIDEO_TYPE) { |