Skip Menu |

This queue is for tickets about the MP4-File CPAN distribution.

Report information
The Basics
Id: 87545
Status: open
Priority: 0/
Queue: MP4-File

People
Owner: Nobody in particular
Requestors: stephenenelson [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.08
Fixed in: (no value)



Subject: Fails to build with mp4v2 2.0.0~dfsg0-1
Attempting to build on Ubuntu with mp4v2-dev version 2.0.0 installed gives me: File.xs: In function ‘XS_MP4__File_DESTROY’: File.xs:67:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs: In function ‘XS_MP4__File_Close’: File.xs:77:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs: In function ‘XS_MP4__File_Read’: File.xs:90:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: Full log attached.
Subject: out.txt
File.xs: In function ‘XS_MP4__File_DESTROY’: File.xs:67:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs: In function ‘XS_MP4__File_Close’: File.xs:77:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs: In function ‘XS_MP4__File_Read’: File.xs:90:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs:93:5: error: too many arguments to function ‘MP4Read’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:331:15: note: declared here File.xs: In function ‘XS_MP4__File_Modify’: File.xs:109:7: error: too few arguments to function ‘MP4Close’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:56:6: note: declared here File.xs:112:5: error: too many arguments to function ‘MP4Modify’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:261:15: note: declared here File.xs: In function ‘XS_MP4__File_Optimize’: File.xs:157:5: error: too many arguments to function ‘MP4Optimize’ In file included from /usr/include/mp4v2/mp4v2.h:58:0, from File.xs:25: /usr/include/mp4v2/file.h:307:6: note: declared here File.xs: In function ‘XS_MP4__File_DeleteMetadataName’: File.xs:257:7: error: ‘MP4DeleteMetadataName’ undeclared (first use in this function) File.xs:257:7: note: each undeclared identifier is reported only once for each function it appears in File.xs:258:7: error: ‘MP4DeleteMetadataArtist’ undeclared (first use in this function) File.xs:259:7: error: ‘MP4DeleteMetadataWriter’ undeclared (first use in this function) File.xs:260:7: error: ‘MP4DeleteMetadataComment’ undeclared (first use in this function) File.xs:261:7: error: ‘MP4DeleteMetadataTool’ undeclared (first use in this function) File.xs:262:7: error: ‘MP4DeleteMetadataYear’ undeclared (first use in this function) File.xs:263:7: error: ‘MP4DeleteMetadataAlbum’ undeclared (first use in this function) File.xs:264:7: error: ‘MP4DeleteMetadataGenre’ undeclared (first use in this function) File.xs:265:7: error: ‘MP4DeleteMetadataGrouping’ undeclared (first use in this function) File.xs:266:7: error: ‘MP4DeleteMetadataCoverArt’ undeclared (first use in this function) File.xs:267:7: error: ‘MP4DeleteMetadataTrack’ undeclared (first use in this function) File.xs:268:7: error: ‘MP4DeleteMetadataDisk’ undeclared (first use in this function) File.xs:269:7: error: ‘MP4DeleteMetadataTempo’ undeclared (first use in this function) File.xs:270:7: error: ‘MP4DeleteMetadataCompilation’ undeclared (first use in this function) File.xs: In function ‘XS_MP4__File_GetMetadataName’: File.xs:293:7: error: ‘MP4GetMetadataName’ undeclared (first use in this function) File.xs:293:7: error: initializer element is not constant File.xs:293:7: error: (near initialization for ‘fp[0]’) File.xs:294:7: error: ‘MP4GetMetadataArtist’ undeclared (first use in this function) File.xs:294:7: error: initializer element is not constant File.xs:294:7: error: (near initialization for ‘fp[1]’) File.xs:295:7: error: ‘MP4GetMetadataWriter’ undeclared (first use in this function) File.xs:295:7: error: initializer element is not constant File.xs:295:7: error: (near initialization for ‘fp[2]’) File.xs:296:7: error: ‘MP4GetMetadataComment’ undeclared (first use in this function) File.xs:296:7: error: initializer element is not constant File.xs:296:7: error: (near initialization for ‘fp[3]’) File.xs:297:7: error: ‘MP4GetMetadataTool’ undeclared (first use in this function) File.xs:297:7: error: initializer element is not constant File.xs:297:7: error: (near initialization for ‘fp[4]’) File.xs:298:7: error: ‘MP4GetMetadataYear’ undeclared (first use in this function) File.xs:298:7: error: initializer element is not constant File.xs:298:7: error: (near initialization for ‘fp[5]’) File.xs:299:7: error: ‘MP4GetMetadataAlbum’ undeclared (first use in this function) File.xs:299:7: error: initializer element is not constant File.xs:299:7: error: (near initialization for ‘fp[6]’) File.xs:300:7: error: ‘MP4GetMetadataGenre’ undeclared (first use in this function) File.xs:300:7: error: initializer element is not constant File.xs:300:7: error: (near initialization for ‘fp[7]’) File.xs:301:7: error: ‘MP4GetMetadataGrouping’ undeclared (first use in this function) File.xs:302:5: error: initializer element is not constant File.xs:302:5: error: (near initialization for ‘fp[8]’) File.xs: In function ‘XS_MP4__File_SetMetadataName’: File.xs:332:7: error: ‘MP4SetMetadataName’ undeclared (first use in this function) File.xs:332:7: error: initializer element is not constant File.xs:332:7: error: (near initialization for ‘fp[0]’) File.xs:333:7: error: ‘MP4SetMetadataArtist’ undeclared (first use in this function) File.xs:333:7: error: initializer element is not constant File.xs:333:7: error: (near initialization for ‘fp[1]’) File.xs:334:7: error: ‘MP4SetMetadataWriter’ undeclared (first use in this function) File.xs:334:7: error: initializer element is not constant File.xs:334:7: error: (near initialization for ‘fp[2]’) File.xs:335:7: error: ‘MP4SetMetadataComment’ undeclared (first use in this function) File.xs:335:7: error: initializer element is not constant File.xs:335:7: error: (near initialization for ‘fp[3]’) File.xs:336:7: error: ‘MP4SetMetadataTool’ undeclared (first use in this function) File.xs:336:7: error: initializer element is not constant File.xs:336:7: error: (near initialization for ‘fp[4]’) File.xs:337:7: error: ‘MP4SetMetadataYear’ undeclared (first use in this function) File.xs:337:7: error: initializer element is not constant File.xs:337:7: error: (near initialization for ‘fp[5]’) File.xs:338:7: error: ‘MP4SetMetadataAlbum’ undeclared (first use in this function) File.xs:338:7: error: initializer element is not constant File.xs:338:7: error: (near initialization for ‘fp[6]’) File.xs:339:7: error: ‘MP4SetMetadataGenre’ undeclared (first use in this function) File.xs:339:7: error: initializer element is not constant File.xs:339:7: error: (near initialization for ‘fp[7]’) File.xs:340:7: error: ‘MP4SetMetadataGrouping’ undeclared (first use in this function) File.xs:341:5: error: initializer element is not constant File.xs:341:5: error: (near initialization for ‘fp[8]’) File.xs: In function ‘XS_MP4__File_GetMetadataTrack’: File.xs:404:7: error: ‘MP4GetMetadataTrack’ undeclared (first use in this function) File.xs:404:7: error: initializer element is not constant File.xs:404:7: error: (near initialization for ‘fp[0]’) File.xs:405:7: error: ‘MP4GetMetadataDisk’ undeclared (first use in this function) File.xs:406:5: error: initializer element is not constant File.xs:406:5: error: (near initialization for ‘fp[1]’) File.xs: In function ‘XS_MP4__File_SetMetadataTrack’: File.xs:430:7: error: ‘MP4SetMetadataTrack’ undeclared (first use in this function) File.xs:430:7: error: initializer element is not constant File.xs:430:7: error: (near initialization for ‘fp[0]’) File.xs:431:7: error: ‘MP4SetMetadataDisk’ undeclared (first use in this function) File.xs:432:5: error: initializer element is not constant File.xs:432:5: error: (near initialization for ‘fp[1]’) make: *** [File.o] Error 1
Hi, This is a PoC patch for supporting libmp4v2 2.0.0. Do you have any plans to support libmp4v2 2.0.0? libmp4v2 version 2 is not API compatible with version 1, so you may want to stop supporting version 1. What do you think? Thanks, On 2013-8月-02 金 03:47:04, STEPHEN wrote: Show quoted text
> Attempting to build on Ubuntu with mp4v2-dev version 2.0.0 installed > gives me: > > File.xs: In function ‘XS_MP4__File_DESTROY’: > File.xs:67:7: error: too few arguments to function ‘MP4Close’ > In file included from /usr/include/mp4v2/mp4v2.h:58:0, > from File.xs:25: > /usr/include/mp4v2/file.h:56:6: note: declared here > File.xs: In function ‘XS_MP4__File_Close’: > File.xs:77:7: error: too few arguments to function ‘MP4Close’ > In file included from /usr/include/mp4v2/mp4v2.h:58:0, > from File.xs:25: > /usr/include/mp4v2/file.h:56:6: note: declared here > File.xs: In function ‘XS_MP4__File_Read’: > File.xs:90:7: error: too few arguments to function ‘MP4Close’ > In file included from /usr/include/mp4v2/mp4v2.h:58:0, > from File.xs:25: > > Full log attached.
Subject: MP4-File.patch
diff --git a/File.xs b/File.xs index 1d2ff64..1a07f6d 100644 --- a/File.xs +++ b/File.xs @@ -64,7 +64,7 @@ MP4FILE::DESTROY() PPCODE: if (MP4_IS_VALID_FILE_HANDLE(THIS->fh)) { - MP4Close(THIS->fh); + MP4Close(THIS->fh, 0); } Safefree(THIS); @@ -74,7 +74,7 @@ MP4FILE::Close() PPCODE: if (MP4_IS_VALID_FILE_HANDLE(THIS->fh)) { - MP4Close(THIS->fh); + MP4Close(THIS->fh, 0); THIS->fh = MP4_INVALID_FILE_HANDLE; } XSRETURN_YES; @@ -87,10 +87,10 @@ MP4FILE::Read(fileName, verbosity = 0) CODE: if (MP4_IS_VALID_FILE_HANDLE(THIS->fh)) { - MP4Close(THIS->fh); + MP4Close(THIS->fh, 0); } - THIS->fh = MP4Read(fileName, verbosity); + THIS->fh = MP4Read(fileName); RETVAL = (bool) MP4_IS_VALID_FILE_HANDLE(THIS->fh); @@ -106,10 +106,10 @@ MP4FILE::Modify(fileName, verbosity = 0, flags = 0) CODE: if (MP4_IS_VALID_FILE_HANDLE(THIS->fh)) { - MP4Close(THIS->fh); + MP4Close(THIS->fh, 0); } - THIS->fh = MP4Modify(fileName, verbosity, flags); + THIS->fh = MP4Modify(fileName, flags); RETVAL = (bool) MP4_IS_VALID_FILE_HANDLE(THIS->fh); @@ -154,26 +154,11 @@ Optimize(classname, fileName, newFileName = NULL, verbosity = 0) u_int32_t verbosity; CODE: - RETVAL = MP4Optimize(fileName, newFileName, verbosity); + RETVAL = MP4Optimize(fileName, newFileName); OUTPUT: RETVAL -u_int32_t -MP4FILE::GetVerbosity() - CODE: - RETVAL = MP4GetVerbosity(THIS->fh); - - OUTPUT: - RETVAL - -void -MP4FILE::SetVerbosity(verbosity) - u_int32_t verbosity; - - PPCODE: - MP4SetVerbosity(THIS->fh, verbosity); - MP4TrackId MP4FILE::FindTrackId(index, type = NULL, subType = 0) u_int16_t index; @@ -227,266 +212,6 @@ MP4FILE::GetTrackTimeScale(trackId) OUTPUT: RETVAL -bool -MP4FILE::MetadataDelete() - CODE: - RETVAL = MP4MetadataDelete(THIS->fh); - - OUTPUT: - RETVAL - -bool -MP4FILE::DeleteMetadataName() - ALIAS: - DeleteMetadataArtist = 1 - DeleteMetadataWriter = 2 - DeleteMetadataComment = 3 - DeleteMetadataTool = 4 - DeleteMetadataYear = 5 - DeleteMetadataAlbum = 6 - DeleteMetadataGenre = 7 - DeleteMetadataGrouping = 8 - DeleteMetadataCoverArt = 9 - DeleteMetadataTrack = 10 - DeleteMetadataDisk = 11 - DeleteMetadataTempo = 12 - DeleteMetadataCompilation = 13 - - PREINIT: - static bool (*fp[])(MP4FileHandle) = { - MP4DeleteMetadataName, - MP4DeleteMetadataArtist, - MP4DeleteMetadataWriter, - MP4DeleteMetadataComment, - MP4DeleteMetadataTool, - MP4DeleteMetadataYear, - MP4DeleteMetadataAlbum, - MP4DeleteMetadataGenre, - MP4DeleteMetadataGrouping, - MP4DeleteMetadataCoverArt, - MP4DeleteMetadataTrack, - MP4DeleteMetadataDisk, - MP4DeleteMetadataTempo, - MP4DeleteMetadataCompilation - }; - - CODE: - RETVAL = fp[ix](THIS->fh); - - OUTPUT: - RETVAL - -void -MP4FILE::GetMetadataName() - ALIAS: - GetMetadataArtist = 1 - GetMetadataWriter = 2 - GetMetadataComment = 3 - GetMetadataTool = 4 - GetMetadataYear = 5 - GetMetadataAlbum = 6 - GetMetadataGenre = 7 - GetMetadataGrouping = 8 - - PREINIT: - static bool (*fp[])(MP4FileHandle, char **) = { - MP4GetMetadataName, - MP4GetMetadataArtist, - MP4GetMetadataWriter, - MP4GetMetadataComment, - MP4GetMetadataTool, - MP4GetMetadataYear, - MP4GetMetadataAlbum, - MP4GetMetadataGenre, - MP4GetMetadataGrouping - }; - char *value; - - PPCODE: - if (fp[ix](THIS->fh, &value) && value != NULL) - { - ST(0) = newSVpv(value, 0); - SvUTF8_on(ST(0)); - free(value); - XSRETURN(1); - } - - XSRETURN_UNDEF; - -bool -MP4FILE::SetMetadataName(value) - SV *value - - ALIAS: - SetMetadataArtist = 1 - SetMetadataWriter = 2 - SetMetadataComment = 3 - SetMetadataTool = 4 - SetMetadataYear = 5 - SetMetadataAlbum = 6 - SetMetadataGenre = 7 - SetMetadataGrouping = 8 - - PREINIT: - static bool (*fp[])(MP4FileHandle, const char *) = { - MP4SetMetadataName, - MP4SetMetadataArtist, - MP4SetMetadataWriter, - MP4SetMetadataComment, - MP4SetMetadataTool, - MP4SetMetadataYear, - MP4SetMetadataAlbum, - MP4SetMetadataGenre, - MP4SetMetadataGrouping - }; - - CODE: - RETVAL = fp[ix](THIS->fh, SvPVutf8_nolen(value)); - - OUTPUT: - RETVAL - -UV -MP4FILE::GetMetadataCoverArtCount() - CODE: - RETVAL = MP4GetMetadataCoverArtCount(THIS->fh); - - OUTPUT: - RETVAL - -void -MP4FILE::GetMetadataCoverArt(index = 0) - u_int32_t index - - PREINIT: - u_int8_t *data; - u_int32_t length; - - PPCODE: - if (MP4GetMetadataCoverArt(THIS->fh, &data, &length _v19ARG(index))) - { - if (data != NULL) - { - ST(0) = newSVpvn((const char *) data, length); - free(data); - } - else - { - ST(0) = newSVpvn("", 0); - } - - XSRETURN(1); - } - - XSRETURN_UNDEF; - -bool -MP4FILE::SetMetadataCoverArt(cover) - SV *cover - - PREINIT: - STRLEN length; - u_int8_t *data = (u_int8_t *) SvPV(cover, length); - - CODE: - RETVAL = MP4SetMetadataCoverArt(THIS->fh, data, length); - - OUTPUT: - RETVAL - -void -MP4FILE::GetMetadataTrack() - ALIAS: - GetMetadataDisk = 1 - - PREINIT: - static bool (*fp[])(MP4FileHandle, u_int16_t *, u_int16_t *) = { - MP4GetMetadataTrack, - MP4GetMetadataDisk - }; - u_int16_t curr, total; - - PPCODE: - if (fp[ix](THIS->fh, &curr, &total)) - { - EXTEND(SP, 2); - ST(0) = newSVuv(curr); - ST(1) = newSVuv(total); - XSRETURN(2); - } - - XSRETURN_EMPTY; - -bool -MP4FILE::SetMetadataTrack(curr, total) - u_int16_t curr - u_int16_t total - - ALIAS: - SetMetadataDisk = 1 - - PREINIT: - static bool (*fp[])(MP4FileHandle, u_int16_t, u_int16_t) = { - MP4SetMetadataTrack, - MP4SetMetadataDisk - }; - - CODE: - RETVAL = fp[ix](THIS->fh, curr, total); - - OUTPUT: - RETVAL - -void -MP4FILE::GetMetadataTempo() - PREINIT: - u_int16_t tempo; - - PPCODE: - if (MP4GetMetadataTempo(THIS->fh, &tempo)) - { - XSRETURN_UV(tempo); - } - - XSRETURN_UNDEF; - -bool -MP4FILE::SetMetadataTempo(tempo) - u_int16_t tempo - - CODE: - RETVAL = MP4SetMetadataTempo(THIS->fh, tempo); - - OUTPUT: - RETVAL - -void -MP4FILE::GetMetadataCompilation() - PREINIT: - u_int8_t cpl; - - PPCODE: - if (MP4GetMetadataCompilation(THIS->fh, &cpl)) - { - if (cpl) - XSRETURN_YES; - else - XSRETURN_NO; - } - - XSRETURN_UNDEF; - -bool -MP4FILE::SetMetadataCompilation(cpl) - bool cpl - - CODE: - RETVAL = MP4SetMetadataCompilation(THIS->fh, cpl); - - OUTPUT: - RETVAL - - BOOT: { HV *ourstash = gv_stashpv("MP4::File", TRUE);