pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/multimedia/mp4v2



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Dec 20 13:07:58 UTC 2020

Modified Files:
        pkgsrc/multimedia/mp4v2: Makefile distinfo
Added Files:
        pkgsrc/multimedia/mp4v2/patches: patch-include_mp4v2_file.h
            patch-src_mp4.cpp patch-src_mp4atom.cpp

Log Message:
mp4v2: Revert amazing upstream commit that breaks all C users of libmp4v2

Bump PKGREVISION


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/multimedia/mp4v2/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/multimedia/mp4v2/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/multimedia/mp4v2/patches/patch-include_mp4v2_file.h \
    pkgsrc/multimedia/mp4v2/patches/patch-src_mp4.cpp \
    pkgsrc/multimedia/mp4v2/patches/patch-src_mp4atom.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/multimedia/mp4v2/Makefile
diff -u pkgsrc/multimedia/mp4v2/Makefile:1.7 pkgsrc/multimedia/mp4v2/Makefile:1.8
--- pkgsrc/multimedia/mp4v2/Makefile:1.7        Thu Dec 17 09:14:00 2020
+++ pkgsrc/multimedia/mp4v2/Makefile    Sun Dec 20 13:07:58 2020
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2020/12/17 09:14:00 triaxx Exp $
+# $NetBSD: Makefile,v 1.8 2020/12/20 13:07:58 nia Exp $
 
 DISTNAME=      mp4v2-4.1.5
+PKGREVISION=   1
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=TechSmith/}
 GITHUB_TAG=    Release-ThirdParty-MP4v2-${PKGVERSION_NOREV}

Index: pkgsrc/multimedia/mp4v2/distinfo
diff -u pkgsrc/multimedia/mp4v2/distinfo:1.5 pkgsrc/multimedia/mp4v2/distinfo:1.6
--- pkgsrc/multimedia/mp4v2/distinfo:1.5        Thu Dec 17 09:14:00 2020
+++ pkgsrc/multimedia/mp4v2/distinfo    Sun Dec 20 13:07:58 2020
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.5 2020/12/17 09:14:00 triaxx Exp $
+$NetBSD: distinfo,v 1.6 2020/12/20 13:07:58 nia Exp $
 
 SHA1 (mp4v2-4.1.5.tar.gz) = a57fb90b4d14b240f90431ba06c450283e0f9d28
 RMD160 (mp4v2-4.1.5.tar.gz) = 58b1b4de372499505447e6854cfe1214881bf813
 SHA512 (mp4v2-4.1.5.tar.gz) = 593071e3e2d48a7bc704d4b32b28de300363d797236cf8904b3c403758fa08fcd9c0a1ebafc462f69d3964493515eeb391e23d5e27366e06c8d65f68c936b65a
 Size (mp4v2-4.1.5.tar.gz) = 2681905 bytes
+SHA1 (patch-include_mp4v2_file.h) = bfb8ed37208a1e04c2cb2ca4a8409e4b2b274065
+SHA1 (patch-src_mp4.cpp) = 53435290d3f3fd9ecc552357f674c54f5c6ec98d
+SHA1 (patch-src_mp4atom.cpp) = 78a6dce747a8c5cc73f231fa9b81d116b51cf4bb
 SHA1 (patch-src_rtphint.cpp) = 7ccbacb6873a410b6e8b0d376a2ae7ada1c022d5

Added files:

Index: pkgsrc/multimedia/mp4v2/patches/patch-include_mp4v2_file.h
diff -u /dev/null pkgsrc/multimedia/mp4v2/patches/patch-include_mp4v2_file.h:1.1
--- /dev/null   Sun Dec 20 13:07:58 2020
+++ pkgsrc/multimedia/mp4v2/patches/patch-include_mp4v2_file.h  Sun Dec 20 13:07:58 2020
@@ -0,0 +1,38 @@
+$NetBSD: patch-include_mp4v2_file.h,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- include/mp4v2/file.h.orig  2020-12-07 23:16:32.000000000 +0000
++++ include/mp4v2/file.h
+@@ -328,12 +328,9 @@ bool MP4Optimize(
+  *      the library.
+  *      On error, #MP4_INVALID_FILE_HANDLE.
+  */
+-typedef bool( *ShouldParseAtomCallback )( uint32_t );
+-
+ MP4V2_EXPORT
+ MP4FileHandle MP4Read(
+-    const char* fileName,
+-    ShouldParseAtomCallback cb = nullptr );
++    const char* fileName );
+ 
+ /** Read an existing mp4 file.
+  *
+@@ -361,6 +358,13 @@ MP4FileHandle MP4ReadProvider(
+     const char*            fileName,
+     const MP4FileProvider* fileProvider DEFAULT(NULL) );
+ 
++typedef bool( *ShouldParseAtomCallback )( uint32_t );
++MP4V2_EXPORT
++void MP4SetShouldParseAtomCallback(
++   MP4FileHandle hFile,
++   ShouldParseAtomCallback f
++);
++
+ /** @} ***********************************************************************/
+ 
+ #endif /* MP4V2_FILE_H */
Index: pkgsrc/multimedia/mp4v2/patches/patch-src_mp4.cpp
diff -u /dev/null pkgsrc/multimedia/mp4v2/patches/patch-src_mp4.cpp:1.1
--- /dev/null   Sun Dec 20 13:07:58 2020
+++ pkgsrc/multimedia/mp4v2/patches/patch-src_mp4.cpp   Sun Dec 20 13:07:58 2020
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_mp4.cpp,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- src/mp4.cpp.orig   2020-12-07 23:16:32.000000000 +0000
++++ src/mp4.cpp
+@@ -87,7 +87,7 @@ const char* MP4GetFilename( MP4FileHandl
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-MP4FileHandle MP4Read( const char* fileName, ShouldParseAtomCallback cb/*=nullptr*/ )
++MP4FileHandle MP4Read( const char* fileName )
+ {
+     if (!fileName)
+         return MP4_INVALID_FILE_HANDLE;
+@@ -100,9 +100,6 @@ MP4FileHandle MP4Read( const char* fileN
+     {
+         ASSERT(pFile);
+ 
+-        if ( cb != nullptr )
+-           pFile->SetShouldParseAtomCallback( cb );
+-
+         pFile->Read( fileName, NULL );
+         return (MP4FileHandle)pFile;
+     }
+@@ -149,6 +146,30 @@ MP4FileHandle MP4ReadProvider( const cha
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
++void MP4SetShouldParseAtomCallback( MP4FileHandle hFile, ShouldParseAtomCallback cb )
++{
++   if (!MP4_IS_VALID_FILE_HANDLE(hFile))
++      return;
++   try
++   {
++      ASSERT(hFile);
++      MP4File& file = *static_cast<MP4File*>(hFile);
++      file.SetShouldParseAtomCallback( cb );
++   }
++   catch( Exception* x ) {
++      mp4v2::impl::log.errorf(*x);
++      delete x;
++   }
++   catch( ... ) {
++      mp4v2::impl::log.errorf("%s: unknown exception accessing MP4File "
++                               "filename", __FUNCTION__ );
++   }
++
++//   g_parseCallback = cb;
++}
++
++///////////////////////////////////////////////////////////////////////////////
++
+     MP4FileHandle MP4Create (const char* fileName,
+                              uint32_t  flags)
+     {
Index: pkgsrc/multimedia/mp4v2/patches/patch-src_mp4atom.cpp
diff -u /dev/null pkgsrc/multimedia/mp4v2/patches/patch-src_mp4atom.cpp:1.1
--- /dev/null   Sun Dec 20 13:07:58 2020
+++ pkgsrc/multimedia/mp4v2/patches/patch-src_mp4atom.cpp       Sun Dec 20 13:07:58 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_mp4atom.cpp,v 1.1 2020/12/20 13:07:58 nia Exp $
+
+Fix building C applications.
+
+Reverts the following commit:
+https://github.com/TechSmith/mp4v2/commit/263719465a1c1fbe6d240b8d154da71003ce3230
+https://github.com/TechSmith/mp4v2/issues/47
+
+--- src/mp4atom.cpp.orig       2020-12-07 23:16:32.000000000 +0000
++++ src/mp4atom.cpp
+@@ -237,7 +237,7 @@ void MP4Atom::Read()
+ 
+     // skip parsing of certain atoms
+     ShouldParseAtomCallback cb = m_File.GetShouldParseAtomCallback();
+-    if ( cb == nullptr || cb( ATOMID(m_type) ) )
++    if ( cb == nullptr || ( cb != nullptr && cb( ATOMID(m_type) ) ) )
+     {
+        ReadProperties();
+ 



Home | Main Index | Thread Index | Old Index