View | Details | Raw Unified | Return to bug 212785 | Differences between
and this patch

Collapse All | Expand All

(-)audio/mixxx/Makefile (+2 lines)
Lines 25-30 Link Here
25
25
26
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
26
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
27
27
28
LINKFLAGS+=	${PTHREAD_LIBS}
29
28
USES=		scons iconv
30
USES=		scons iconv
29
USE_QT4=	corelib gui network opengl script sql svg xml \
31
USE_QT4=	corelib gui network opengl script sql svg xml \
30
		linguisttools_build moc_build qmake_build rcc_build uic_build
32
		linguisttools_build moc_build qmake_build rcc_build uic_build
(-)audio/mixxx/files/patch-plugins-soundsourcem4a-m4a-mp4.c (+14 lines)
Line 0 Link Here
1
--- plugins/soundsourcem4a/m4a/mp4.c.orig	2013-12-03 00:46:38.232657584 +0400
2
+++ plugins/soundsourcem4a/m4a/mp4.c	2013-12-03 00:48:00.918703017 +0400
3
@@ -114,7 +114,11 @@
4
 	faacDecSetConfiguration(priv->decoder, neaac_cfg);
5
 
6
 	/* open mpeg-4 file */
7
+#if MP4V2_PROJECT_version_hex <= 0x00010901
8
 	priv->mp4.handle = MP4Read(ip_data->filename, 0);
9
+#else
10
+	priv->mp4.handle = MP4Read(ip_data->filename);
11
+#endif
12
 	if (!priv->mp4.handle) {
13
 		d_print("MP4Read failed\n");
14
 		goto out;
(-)audio/mixxx/files/patch-src_defs.h (+8 lines)
Lines 1-5 Link Here
1
--- src/defs.h.orig	2013-05-08 23:20:26 UTC
1
--- src/defs.h.orig	2013-05-08 23:20:26 UTC
2
+++ src/defs.h
2
+++ src/defs.h
3
@@ -22,6 +22,7 @@
4
 #include <math.h>
5
 #include <iostream>
6
 #include <stdlib.h>
7
+#include <inttypes.h>
8
 
9
 typedef short int SAMPLE;       // Data type used in output buffer. S16_LE works on SB/ALSA.
10
 //const int SAMPLE_SIZE = 2;      // Number of bytes used to store 1 sample
3
@@ -87,6 +87,8 @@ inline double zap_denormal(double x)
11
@@ -87,6 +87,8 @@ inline double zap_denormal(double x)
4
 #define math_min(a,b)            (((a) < (b)) ? (a) : (b))
12
 #define math_min(a,b)            (((a) < (b)) ? (a) : (b))
5
 #endif
13
 #endif
(-)audio/mixxx/files/patch-vamp-plugins__dsp__DownBeat.h (+11 lines)
Line 0 Link Here
1
--- vamp-plugins/dsp/DownBeat.h.orig	2014-07-26 16:42:05.701371878 +0400
2
+++ vamp-plugins/dsp/DownBeat.h	2014-07-26 16:42:44.701723319 +0400
3
@@ -18,7 +18,7 @@
4
 
5
 #include <vector>
6
 
7
-#ifdef __LINUX__
8
+#if (defined __LINUX__) || (defined __FreeBSD__)
9
 #include <stddef.h>  //resolves size_t compile error on Ubuntu 11.10
10
 #endif
11
 
(-)audio/mixxx/files/patch-vamp-plugins__dsp__TempoTrackV2.h (+11 lines)
Line 0 Link Here
1
--- vamp-plugins/dsp/TempoTrackV2.h.orig	2014-07-26 17:10:27.407249790 +0400
2
+++ vamp-plugins/dsp/TempoTrackV2.h	2014-07-26 17:10:54.944766709 +0400
3
@@ -18,7 +18,7 @@
4
 #define TEMPOTRACKV2_H
5
 
6
 #include <vector>
7
-#ifdef __LINUX__
8
+#if (defined __LINUX__) || (defined __FreeBSD__)
9
 #include <stddef.h>  //resolves size_t compile error on Ubuntu 11.10
10
 #endif
11
 
(-)audio/mous/Makefile (-1 / +5 lines)
Lines 76-82 Link Here
76
MACDECODER_CMAKE_OFF=	-DWithPluginMacDecoder=0
76
MACDECODER_CMAKE_OFF=	-DWithPluginMacDecoder=0
77
77
78
NCURSES_DESC=		Ncurses frontend
78
NCURSES_DESC=		Ncurses frontend
79
NCURSES_USES=		ncurses
79
NCURSES_USES=		ncurses iconv
80
NCURSES_CMAKE_ON=	-DWithFrontendNcurses=1
80
NCURSES_CMAKE_ON=	-DWithFrontendNcurses=1
81
NCURSES_CMAKE_OFF=	-DWithFrontendNcurses=0
81
NCURSES_CMAKE_OFF=	-DWithFrontendNcurses=0
82
82
Lines 86-91 Link Here
86
QT4_DESC=		QT4 frontend
86
QT4_DESC=		QT4 frontend
87
QT4_USE=		QT4=corelib,gui,linguisttools_build
87
QT4_USE=		QT4=corelib,gui,linguisttools_build
88
QT4_USE+=		QT4=qmake_build,moc_build,rcc_build,uic_build
88
QT4_USE+=		QT4=qmake_build,moc_build,rcc_build,uic_build
89
QT4_USES=		iconv
89
QT4_CMAKE_ON=		-DWithFrontendQt=1
90
QT4_CMAKE_ON=		-DWithFrontendQt=1
90
QT4_CMAKE_OFF=		-DWithFrontendQt=0
91
QT4_CMAKE_OFF=		-DWithFrontendQt=0
91
92
Lines 94-99 Link Here
94
SDK_CMAKE_OFF=		-DWithHeadFiles=0
95
SDK_CMAKE_OFF=		-DWithHeadFiles=0
95
96
96
TAGLIB_DESC=		TagLib plugin (recommended)
97
TAGLIB_DESC=		TagLib plugin (recommended)
98
TAGLIB_USES=		iconv
97
TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
99
TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
98
TAGLIB_CMAKE_ON=	-DWithPluginTagLibParser=1
100
TAGLIB_CMAKE_ON=	-DWithPluginTagLibParser=1
99
TAGLIB_CMAKE_OFF=	-DWithPluginTagLibParser=0
101
TAGLIB_CMAKE_OFF=	-DWithPluginTagLibParser=0
Lines 116-121 Link Here
116
118
117
post-patch:
119
post-patch:
118
	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \
120
	@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \
121
		-e '/target_link_libraries/s/-liconv/${ICONV_LIB}/' \
122
		-e '/EXE_MOUS_NCURSES_LIBS/s/-lncursesw/& -ltinfow/' \
119
		-e 's|/usr/local|${LOCALBASE}|g' \
123
		-e 's|/usr/local|${LOCALBASE}|g' \
120
		${WRKSRC}/CMakeLists.txt
124
		${WRKSRC}/CMakeLists.txt
121
125
(-)audio/mous/files/patch-plugins-FaacEncoder-FaacEncoder.cpp (+19 lines)
Line 0 Link Here
1
--- plugins/FaacEncoder/FaacEncoder.cpp.orig	2012-06-28 18:58:11.000000000 +0400
2
+++ plugins/FaacEncoder/FaacEncoder.cpp	2014-07-26 11:48:16.708663099 +0400
3
@@ -326,16 +326,11 @@
4
     strcpy(version_string + 5, faac_id_string);
5
     version_string[version_len-1] = '\0';
6
 
7
-    MP4SetMetadataTool(m_Mp4File, version_string);
8
-
9
-    /*
10
     const MP4Tags* tag = MP4TagsAlloc();
11
     MP4TagsFetch(tag, m_Mp4File);
12
     MP4TagsSetEncodingTool(tag, version_string);
13
-    MP4TagsSetArtist(tag, "hello");
14
     MP4TagsStore(tag, m_Mp4File);
15
     MP4TagsFree(tag);
16
-    */
17
 
18
     delete[] version_string;
19
 }
(-)audio/mous/pkg-plist (-1 / +1 lines)
Lines 67-70 Link Here
67
%%WAVENCODER%%lib/mous/libWavEncoder.so
67
%%WAVENCODER%%lib/mous/libWavEncoder.so
68
%%WMA%%lib/mous/libWmaDecoder.so
68
%%WMA%%lib/mous/libWmaDecoder.so
69
%%DATADIR%%/pinyin/unipy.map
69
%%DATADIR%%/pinyin/unipy.map
70
%%QT4%%share/mous/qt/mous-qt_zh_CN.qm
70
%%QT4%%%%DATADIR%%/qt/mous-qt_zh_CN.qm
(-)audio/faac/Makefile (-2 lines)
Lines 29-35 Link Here
29
29
30
post-patch:
30
post-patch:
31
	@${ECHO_CMD} "" >> ${WRKSRC}/libfaac/psych.h
31
	@${ECHO_CMD} "" >> ${WRKSRC}/libfaac/psych.h
32
	@${REINPLACE_CMD} -e 's|<mp4\.h>|<mp4v2/mp4v2.h>|g' \
33
		${WRKSRC}/frontend/main.c
34
32
35
.include <bsd.port.mk>
33
.include <bsd.port.mk>
(-)audio/faac/files/patch-configure.in (-3 / +6 lines)
Lines 9-22 Link Here
9
 
9
 
10
 AM_CONFIG_HEADER(config.h)
10
 AM_CONFIG_HEADER(config.h)
11
 
11
 
12
@@ -28,14 +28,17 @@ AC_CHECK_DECL(strcasecmp, MY_DEFINE(HAVE
12
@@ -28,14 +28,18 @@
13
 AC_CHECK_LIB(gnugetopt, getopt_long)
13
 AC_CHECK_LIB(gnugetopt, getopt_long)
14
 
14
 
15
 AM_CONDITIONAL(WITH_MP4V2, false)
15
 AM_CONDITIONAL(WITH_MP4V2, false)
16
+AM_CONDITIONAL(WITH_EXT_MP4V2, false)
16
+AM_CONDITIONAL(WITH_EXT_MP4V2, false)
17
 
17
 
18
 AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
18
-AC_CHECK_DECLS([MP4Create, MP4MetadataDelete],
19
                AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
19
-               AC_CHECK_LIB(mp4v2, MP4MetadataDelete, external_mp4v2=yes,
20
+AC_CHECK_DECLS([MP4Create],
21
+               AC_CHECK_LIB(mp4v2, MP4Create, external_mp4v2=yes,
20
                             external_mp4v2=no, -lstdc++),
22
                             external_mp4v2=no, -lstdc++),
21
-               external_mp4v2=no, [#include <mp4.h>])
23
-               external_mp4v2=no, [#include <mp4.h>])
22
+               external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
24
+               external_mp4v2=no, [#include <mp4v2/mp4v2.h>])
Lines 25-30 Link Here
25
   AC_MSG_NOTICE([*** Building with external mp4v2 ***])
27
   AC_MSG_NOTICE([*** Building with external mp4v2 ***])
26
+  AM_CONDITIONAL(WITH_EXT_MP4V2, true)
28
+  AM_CONDITIONAL(WITH_EXT_MP4V2, true)
27
+  MY_DEFINE(HAVE_LIBMP4V2)
29
+  MY_DEFINE(HAVE_LIBMP4V2)
30
+  AC_CHECK_DECLS([MP4TagsAlloc], [], [], [#include <mp4v2/mp4v2.h>])
28
 else
31
 else
29
   if test x$WITHMP4V2 = xyes; then
32
   if test x$WITHMP4V2 = xyes; then
30
      AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
33
      AC_MSG_NOTICE([*** Building with internal mp4v2 ***])
(-)audio/faac/files/patch-frontend-main.c (+126 lines)
Line 0 Link Here
1
http://bugs.gentoo.org/397575
2
http://sourceforge.net/tracker/?func=detail&aid=3476707&group_id=704&atid=100704
3
4
--- frontend/main.c
5
+++ frontend/main.c
6
@@ -30,7 +30,7 @@
7
 #endif
8
 
9
 #ifdef HAVE_LIBMP4V2
10
-# include <mp4.h>
11
+# include <mp4v2/mp4v2.h>
12
 #endif
13
 
14
 #define DEFAULT_TNS     0
15
@@ -870,8 +870,12 @@
16
     if (!faacEncSetConfiguration(hEncoder, myFormat)) {
17
         fprintf(stderr, "Unsupported output format!\n");
18
 #ifdef HAVE_LIBMP4V2
19
+#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */
20
+        if (container == MP4_CONTAINER) MP4Close(MP4hFile, 0);
21
+#else
22
         if (container == MP4_CONTAINER) MP4Close(MP4hFile);
23
 #endif
24
+#endif
25
         return 1;
26
     }
27
 
28
@@ -882,12 +886,10 @@
29
         unsigned long ASCLength = 0;
30
     char *version_string;
31
 
32
-#ifdef MP4_CREATE_EXTENSIBLE_FORMAT
33
-    /* hack to compile against libmp4v2 >= 1.0RC3
34
-     * why is there no version identifier in mp4.h? */
35
+#ifdef MP4_DETAILS_ERROR /* r453 fix */
36
         MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0);
37
 #else
38
-    MP4hFile = MP4Create(aacFileName, MP4_DETAILS_ERROR, 0, 0);
39
+        MP4hFile = MP4Create(aacFileName, 0);
40
 #endif
41
         if (!MP4_IS_VALID_FILE_HANDLE(MP4hFile)) {
42
             fprintf(stderr, "Couldn't create output file %s\n", aacFileName);
43
@@ -902,12 +904,22 @@
44
     free(ASC);
45
 
46
     /* set metadata */
47
+#if HAVE_DECL_MP4TAGSALLOC
48
+    const MP4Tags* tags;
49
+    tags = MP4TagsAlloc();
50
+    MP4TagsFetch( tags, MP4hFile );
51
+#endif
52
     version_string = malloc(strlen(faac_id_string) + 6);
53
     strcpy(version_string, "FAAC ");
54
     strcpy(version_string + 5, faac_id_string);
55
+#if !HAVE_DECL_MP4TAGSALLOC
56
     MP4SetMetadataTool(MP4hFile, version_string);
57
+#else
58
+    MP4TagsSetEncodingTool(tags, version_string);
59
+#endif
60
     free(version_string);
61
 
62
+#if !HAVE_DECL_MP4TAGSALLOC
63
     if (artist) MP4SetMetadataArtist(MP4hFile, artist);
64
     if (writer) MP4SetMetadataWriter(MP4hFile, writer);
65
     if (title) MP4SetMetadataName(MP4hFile, title);
66
@@ -920,8 +932,40 @@
67
     if (comment) MP4SetMetadataComment(MP4hFile, comment);
68
         if (artSize) {
69
         MP4SetMetadataCoverArt(MP4hFile, art, artSize);
70
+#else
71
+    if (artist) MP4TagsSetArtist(tags, artist);
72
+    if (writer) MP4TagsSetComposer(tags, writer);
73
+    if (title) MP4TagsSetName(tags, title);
74
+    if (album) MP4TagsSetAlbum(tags, album);
75
+    if (trackno > 0) {
76
+        MP4TagTrack tt;
77
+        tt.index = trackno;
78
+        tt.total = ntracks;
79
+        MP4TagsSetTrack(tags, &tt);
80
+    }
81
+    if (discno > 0) {
82
+        MP4TagDisk td;
83
+        td.index = discno;
84
+        td.total = ndiscs;
85
+        MP4TagsSetDisk(tags, &td);
86
+    }
87
+    if (compilation) MP4TagsSetCompilation(tags, compilation);
88
+    if (year) MP4TagsSetReleaseDate(tags, year);
89
+    if (genre) MP4TagsSetGenre(tags, genre);
90
+    if (comment) MP4TagsSetComments(tags, comment);
91
+    if (artSize) {
92
+        MP4TagArtwork mp4art;
93
+        mp4art.data = art;
94
+        mp4art.size = artSize;
95
+        mp4art.type = MP4_ART_UNDEFINED; // delegate typing to libmp4v2
96
+        MP4TagsAddArtwork( tags, &mp4art );
97
+#endif
98
         free(art);
99
     }
100
+#if HAVE_DECL_MP4TAGSALLOC
101
+    MP4TagsStore( tags, MP4hFile );
102
+    MP4TagsFree( tags );
103
+#endif
104
     }
105
     else
106
     {
107
@@ -1138,11 +1182,19 @@
108
         /* clean up */
109
         if (container == MP4_CONTAINER)
110
         {
111
+#ifdef MP4_CLOSE_DO_NOT_COMPUTE_BITRATE /* r479 fix */
112
+            MP4Close(MP4hFile, 0);
113
+#else
114
             MP4Close(MP4hFile);
115
+#endif
116
             if (optimizeFlag == 1)
117
             {
118
                 fprintf(stderr, "\n\nMP4 format optimization... ");
119
+#ifdef MP4_DETAILS_ERROR /* r453 fix */
120
                 MP4Optimize(aacFileName, NULL, 0);
121
+#else
122
+                MP4Optimize(aacFileName, NULL);
123
+#endif
124
                 fprintf(stderr, "Done!");
125
             }
126
         } else
(-)multimedia/mp4v2/Makefile (-3 / +2 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	mp4v2
4
PORTNAME=	mp4v2
5
PORTVERSION=	1.9.1
5
PORTVERSION=	2.0.0
6
PORTREVISION=	2
7
CATEGORIES=	multimedia
6
CATEGORIES=	multimedia
8
MASTER_SITES=	LOCAL/riggs/mp4v2
7
MASTER_SITES=	GENTOO
9
8
10
MAINTAINER=	multimedia@FreeBSD.org
9
MAINTAINER=	multimedia@FreeBSD.org
11
COMMENT=	Library and tools to read, create, and modify mp4 files
10
COMMENT=	Library and tools to read, create, and modify mp4 files
(-)multimedia/mp4v2/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (mp4v2-1.9.1.tar.bz2) = 5c381caeab2326fc48cfda0fe202bdb8ba0ae624d9c97ad7680a2b07e2c2e3b4
1
SHA256 (mp4v2-2.0.0.tar.bz2) = 0319b9a60b667cf10ee0ec7505eb7bdc0a2e21ca7a93db96ec5bd758e3428338
2
SIZE (mp4v2-1.9.1.tar.bz2) = 432943
2
SIZE (mp4v2-2.0.0.tar.bz2) = 495672
(-)multimedia/mp4v2/files/patch-GNUmakefile.in (-11 lines)
Lines 1-11 Link Here
1
--- ./GNUmakefile.in.orig	2010-07-12 21:25:25.000000000 +0100
2
+++ ./GNUmakefile.in	2010-07-12 21:26:04.000000000 +0100
3
@@ -443,7 +443,7 @@
4
 lib_LTLIBRARIES = libmp4v2.la
5
 
6
 ###############################################################################
7
-libmp4v2_la_LDFLAGS = -version-number $(PROJECT_version_major):$(PROJECT_version_minor):$(PROJECT_version_point) $(X_libmp4v2_la_LDFLAGS)
8
+libmp4v2_la_LDFLAGS = -version-info 10:1:9
9
 libmp4v2_la_SOURCES = src/3gp.cpp src/atom_ac3.cpp src/atom_amr.cpp \
10
 	src/atom_avc1.cpp src/atom_avcC.cpp src/atom_chpl.cpp \
11
 	src/atom_colr.cpp src/atom_d263.cpp src/atom_dac3.cpp \
(-)multimedia/mp4v2/files/patch-include__mp4v2__itmf_tags.h (-11 lines)
Lines 1-11 Link Here
1
--- ./include/mp4v2/itmf_tags.h.orig	2010-07-14 16:35:27.000000000 +0100
2
+++ ./include/mp4v2/itmf_tags.h	2010-07-14 16:35:35.000000000 +0100
3
@@ -122,7 +122,7 @@
4
  *  @return structure with all tags missing.
5
  */
6
 MP4V2_EXPORT
7
-const MP4Tags* MP4TagsAlloc();
8
+const MP4Tags* MP4TagsAlloc(void);
9
 
10
 /** Fetch data from mp4 file and populate structure.
11
  *
(-)multimedia/mp4v2/files/patch-src-itmf-type.cpp (+11 lines)
Line 0 Link Here
1
--- src/itmf/type.cpp.orig	2012-05-20 22:11:53 UTC
2
+++ src/itmf/type.cpp
3
@@ -284,7 +284,7 @@ namespace {
4
         { BT_BMP,  "\x42\x4d" },
5
         { BT_GIF,  "GIF87a" },
6
         { BT_GIF,  "GIF89a" },
7
-        { BT_JPEG, "\xff\xd8\xff\xe0" },
8
+        { BT_JPEG, "\xff\xd8\xff" },
9
         { BT_PNG,  "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a" },
10
         { BT_UNDEFINED } // must be last
11
     };
(-)multimedia/mp4v2/files/patch-src-mp4.cpp (+15 lines)
Line 0 Link Here
1
--- src/mp4.cpp.orig	2012-05-20 22:11:53 UTC
2
+++ src/mp4.cpp
3
@@ -2402,8 +2402,11 @@ MP4FileHandle MP4ReadProvider( const cha
4
         if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
5
             MP4File *pFile = (MP4File *)hFile;
6
             try {
7
-                return pFile->GetTrackIntegerProperty(trackId,
8
+                uint32_t bitrate =  pFile->GetTrackIntegerProperty(trackId,
9
                                                       "mdia.minf.stbl.stsd.*.esds.decConfigDescr.avgBitrate");
10
+                if( bitrate != 0 ) {
11
+                    return bitrate;
12
+                }
13
             }
14
             catch( Exception* x ) {
15
                 //mp4v2::impl::log.errorf(*x);  we don't really need to print this.
(-)multimedia/mp4v2/files/patch-src-mp4file_io.cpp (+20 lines)
Line 0 Link Here
1
--- src/mp4file_io.cpp.orig	2012-05-20 22:11:53 UTC
2
+++ src/mp4file_io.cpp
3
@@ -387,7 +387,7 @@ char* MP4File::ReadCountedString(uint8_t
4
         charLength = ReadUInt8();
5
     }
6
     
7
-    if (fixedLength && (charLength > fixedLength)) {
8
+    if (fixedLength && (charLength > fixedLength - 1)) {
9
         /*
10
          * The counted length of this string is greater than the
11
          * maxiumum fixed length, so truncate the string to the
12
@@ -397,7 +397,7 @@ char* MP4File::ReadCountedString(uint8_t
13
          * a non counted string has been used in the place of a
14
          * counted string).
15
          */  
16
-        WARNING(charLength > fixedLength);
17
+        WARNING(charLength > fixedLength - 1);
18
         charLength = fixedLength - 1U;
19
     }
20
 
(-)multimedia/mp4v2/files/patch-src-mp4info.cpp (+29 lines)
Line 0 Link Here
1
--- src/mp4info.cpp.orig	2012-05-20 22:11:53 UTC
2
+++ src/mp4info.cpp
3
@@ -109,7 +109,7 @@ static char* PrintAudioInfo(
4
     const char* typeName = "Unknown";
5
     bool foundType = false;
6
     uint8_t type = 0;
7
-    const char *media_data_name;
8
+    const char *media_data_name = NULL;
9
 
10
     media_data_name = MP4GetTrackMediaDataName(mp4File, trackId);
11
 
12
@@ -306,7 +306,7 @@ static char* PrintVideoInfo(
13
     bool foundTypeName = false;
14
     const char* typeName = "Unknown";
15
 
16
-    const char *media_data_name;
17
+    const char *media_data_name = NULL;
18
     char originalFormat[8];
19
     char  oformatbuffer[32];
20
     originalFormat[0] = 0;
21
@@ -315,7 +315,7 @@ static char* PrintVideoInfo(
22
 
23
     media_data_name = MP4GetTrackMediaDataName(mp4File, trackId);
24
     // encv 264b
25
-    if (strcasecmp(media_data_name, "encv") == 0) {
26
+    if (media_data_name != NULL && strcasecmp(media_data_name, "encv") == 0) {
27
         if (MP4GetTrackMediaDataOriginalFormat(mp4File,
28
                                                trackId,
29
                                                originalFormat,
(-)multimedia/mp4v2/files/patch-src-mp4util.cpp (+39 lines)
Line 0 Link Here
1
--- src/mp4util.cpp.orig	2012-05-20 22:11:53 UTC
2
+++ src/mp4util.cpp
3
@@ -195,6 +195,9 @@ static bool convertBase64 (const char da
4
     return true;
5
 }
6
 
7
+}} // namespace mp4v2::impl
8
+
9
+extern "C"
10
 uint8_t *Base64ToBinary (const char *pData, uint32_t decodeSize, uint32_t *pDataSize)
11
 {
12
     uint8_t *ret;
13
@@ -208,7 +211,7 @@ uint8_t *Base64ToBinary (const char *pDa
14
     }
15
     size = (decodeSize * 3) / 4;
16
     groups = decodeSize / 4;
17
-    ret = (uint8_t *)MP4Calloc(size);
18
+    ret = (uint8_t *)mp4v2::impl::MP4Calloc(size);
19
     if (ret == NULL) return NULL;
20
     for (ix = 0; ix < groups; ix++) {
21
         uint8_t value[4];
22
@@ -220,7 +223,7 @@ uint8_t *Base64ToBinary (const char *pDa
23
                 }
24
                 size--;
25
                 value[jx] = 0;
26
-            } else if (convertBase64(pData[jx], &value[jx]) == false) {
27
+            } else if (mp4v2::impl::convertBase64(pData[jx], &value[jx]) == false) {
28
                 free(ret);
29
                 return NULL;
30
             }
31
@@ -234,6 +237,8 @@ uint8_t *Base64ToBinary (const char *pDa
32
     return ret;
33
 }
34
 
35
+namespace mp4v2 { namespace impl {
36
+
37
 // log2 of value, rounded up
38
 static uint8_t ilog2(uint64_t value)
39
 {
(-)multimedia/mp4v2/files/patch-src__bmff__typebmff.cpp (-35 lines)
Lines 1-35 Link Here
1
--- ./src/bmff/typebmff.cpp.orig	2009-07-14 03:07:10.000000000 +0400
2
+++ ./src/bmff/typebmff.cpp	2012-01-15 22:14:12.057757646 +0400
3
@@ -23,19 +23,12 @@
4
 
5
 #include "impl.h"
6
 
7
-// VStudio idiocy prevents defining template instanced static data
8
-// in a namespace. Workaround it by defining in global scope.
9
-// Other platforms will continue to put things in the proper namespace.
10
-#if defined( _MSC_VER )
11
-using namespace mp4v2::impl::bmff;
12
-#else
13
-namespace mp4v2 { namespace impl { namespace bmff {
14
-#endif
15
+namespace mp4v2 { namespace impl {
16
 
17
 ///////////////////////////////////////////////////////////////////////////////
18
 
19
 template <>
20
-const EnumLanguageCode::Entry EnumLanguageCode::data[] = {
21
+const bmff::EnumLanguageCode::Entry bmff::EnumLanguageCode::data[] = {
22
     { mp4v2::impl::bmff::ILC_AAR,  "aar",  "Afar" },
23
     { mp4v2::impl::bmff::ILC_ABK,  "abk",  "Abkhazian" },
24
     { mp4v2::impl::bmff::ILC_ACE,  "ace",  "Achinese" },
25
@@ -526,9 +519,7 @@
26
 
27
 ///////////////////////////////////////////////////////////////////////////////
28
 
29
-#if defined( _MSC_VER )
30
-namespace mp4v2 { namespace impl { namespace bmff {
31
-#endif
32
+namespace bmff {
33
 
34
 ///////////////////////////////////////////////////////////////////////////////
35
 
(-)multimedia/mp4v2/files/patch-src__itmf__type.cpp (-80 lines)
Lines 1-80 Link Here
1
--- ./src/itmf/type.cpp.orig	2009-07-14 03:07:08.000000000 +0400
2
+++ ./src/itmf/type.cpp	2012-01-15 22:14:12.054748862 +0400
3
@@ -24,19 +24,12 @@
4
 
5
 #include "impl.h"
6
 
7
-// VStudio idiocy prevents defining template instanced static data
8
-// in a namespace. Workaround it by defining in global scope.
9
-// Other platforms will continue to put things in the proper namespace.
10
-#if defined( _MSC_VER )
11
-using namespace mp4v2::impl::itmf;
12
-#else
13
-namespace mp4v2 { namespace impl { namespace itmf {
14
-#endif
15
+namespace mp4v2 { namespace impl {
16
 
17
 ///////////////////////////////////////////////////////////////////////////////
18
 
19
 template <>
20
-const EnumBasicType::Entry EnumBasicType::data[] = {
21
+const itmf::EnumBasicType::Entry itmf::EnumBasicType::data[] = {
22
     { mp4v2::impl::itmf::BT_IMPLICIT,  "implicit",  "implicit" },
23
     { mp4v2::impl::itmf::BT_UTF8,      "utf8",      "UTF-8" },
24
     { mp4v2::impl::itmf::BT_UTF16,     "utf16",     "UTF-16" },
25
@@ -64,7 +57,7 @@
26
 ///////////////////////////////////////////////////////////////////////////////
27
 
28
 template <>
29
-const EnumGenreType::Entry EnumGenreType::data[] = {
30
+const itmf::EnumGenreType::Entry itmf::EnumGenreType::data[] = {
31
     { mp4v2::impl::itmf::GENRE_BLUES,             "blues",             "Blues" },
32
     { mp4v2::impl::itmf::GENRE_CLASSIC_ROCK,      "classicrock",       "Classic Rock" },
33
     { mp4v2::impl::itmf::GENRE_COUNTRY,           "country",           "Country" },
34
@@ -200,7 +193,7 @@
35
 ///////////////////////////////////////////////////////////////////////////////
36
 
37
 template <>
38
-const EnumStikType::Entry EnumStikType::data[] = {
39
+const itmf::EnumStikType::Entry itmf::EnumStikType::data[] = {
40
     { mp4v2::impl::itmf::STIK_OLD_MOVIE,    "oldmovie",    "Movie" },
41
     { mp4v2::impl::itmf::STIK_NORMAL,       "normal",      "Normal" },
42
     { mp4v2::impl::itmf::STIK_AUDIOBOOK,    "audiobook",   "Audio Book" },
43
@@ -216,7 +209,7 @@
44
 ///////////////////////////////////////////////////////////////////////////////
45
 
46
 template <>
47
-const EnumAccountType::Entry EnumAccountType::data[] = {
48
+const itmf::EnumAccountType::Entry itmf::EnumAccountType::data[] = {
49
     { mp4v2::impl::itmf::AT_ITUNES,  "itunes",   "iTunes" },
50
     { mp4v2::impl::itmf::AT_AOL,     "aol",      "AOL" },
51
 
52
@@ -226,7 +219,7 @@
53
 ///////////////////////////////////////////////////////////////////////////////
54
 
55
 template <>
56
-const EnumCountryCode::Entry EnumCountryCode::data[] = {
57
+const itmf::EnumCountryCode::Entry itmf::EnumCountryCode::data[] = {
58
     { mp4v2::impl::itmf::CC_USA,  "usa",   "United States" },
59
     { mp4v2::impl::itmf::CC_USA,  "fra",   "France" },
60
     { mp4v2::impl::itmf::CC_DEU,  "ger",   "Germany" },
61
@@ -256,7 +249,7 @@
62
 ///////////////////////////////////////////////////////////////////////////////
63
 
64
 template <>
65
-const EnumContentRating::Entry EnumContentRating::data[] = {
66
+const itmf::EnumContentRating::Entry itmf::EnumContentRating::data[] = {
67
     { mp4v2::impl::itmf::CR_NONE,      "none",       "None" },
68
     { mp4v2::impl::itmf::CR_CLEAN,     "clean",      "Clean" },
69
     { mp4v2::impl::itmf::CR_EXPLICIT,  "explicit",   "Explicit" },
70
@@ -266,9 +259,7 @@
71
 
72
 ///////////////////////////////////////////////////////////////////////////////
73
 
74
-#if defined( _MSC_VER )
75
-namespace mp4v2 { namespace impl { namespace itmf {
76
-#endif
77
+namespace itmf {
78
 
79
 ///////////////////////////////////////////////////////////////////////////////
80
 
(-)multimedia/mp4v2/files/patch-util-mp4chaps.cpp (+10 lines)
Line 0 Link Here
1
--- util/mp4chaps.cpp.orig	2012-05-20 22:11:55 UTC
2
+++ util/mp4chaps.cpp
3
@@ -856,6 +856,7 @@ ChapterUtility::readChapterFile( const s
4
     if( in.read( inBuf, fileSize, nin ) )
5
     {
6
         in.close();
7
+        free(inBuf);
8
         return herrf( "reading chapter file '%s' failed: %s\n", filename.c_str(), sys::getLastErrorStr() );
9
     }
10
     in.close();
(-)multimedia/mp4v2/files/patch-util-mp4tags.cpp (+10 lines)
Line 0 Link Here
1
--- util/mp4tags.cpp.orig	2012-05-20 22:11:55 UTC
2
+++ util/mp4tags.cpp
3
@@ -539,6 +539,7 @@ extern "C" int
4
                         else {
5
                             fprintf( stderr, "Art file %s not found\n", tags[i] );
6
                         }
7
+                        break;
8
                     }
9
                     case OPT_ALBUM_ARTIST:
10
                         MP4TagsSetAlbumArtist( mdata, tags[i] );
(-)multimedia/mp4v2/pkg-plist (-4 / +3 lines)
Lines 7-13 Link Here
7
bin/mp4tags
7
bin/mp4tags
8
bin/mp4track
8
bin/mp4track
9
bin/mp4trackdump
9
bin/mp4trackdump
10
include/mp4v2/project.h
11
include/mp4v2/chapter.h
10
include/mp4v2/chapter.h
12
include/mp4v2/file.h
11
include/mp4v2/file.h
13
include/mp4v2/file_prop.h
12
include/mp4v2/file_prop.h
Lines 15-23 Link Here
15
include/mp4v2/isma.h
14
include/mp4v2/isma.h
16
include/mp4v2/itmf_generic.h
15
include/mp4v2/itmf_generic.h
17
include/mp4v2/itmf_tags.h
16
include/mp4v2/itmf_tags.h
18
include/mp4v2/meta.h
19
include/mp4v2/mp4v2.h
17
include/mp4v2/mp4v2.h
20
include/mp4v2/platform.h
18
include/mp4v2/platform.h
19
include/mp4v2/project.h
21
include/mp4v2/sample.h
20
include/mp4v2/sample.h
22
include/mp4v2/streaming.h
21
include/mp4v2/streaming.h
23
include/mp4v2/track.h
22
include/mp4v2/track.h
Lines 24-31 Link Here
24
include/mp4v2/track_prop.h
23
include/mp4v2/track_prop.h
25
lib/libmp4v2.a
24
lib/libmp4v2.a
26
lib/libmp4v2.so
25
lib/libmp4v2.so
27
lib/libmp4v2.so.1
26
lib/libmp4v2.so.2
28
lib/libmp4v2.so.1.9.1
27
lib/libmp4v2.so.2.0.0
29
man/man1/mp4art.1.gz
28
man/man1/mp4art.1.gz
30
man/man1/mp4file.1.gz
29
man/man1/mp4file.1.gz
31
man/man1/mp4subtitle.1.gz
30
man/man1/mp4subtitle.1.gz
(-)multimedia/mpeg4ip/Makefile (-18 / +18 lines)
Lines 12-18 Link Here
12
MAINTAINER=	multimedia@FreeBSD.org
12
MAINTAINER=	multimedia@FreeBSD.org
13
COMMENT=	Standards-based system to encode, stream, and play MPEG-4 audio/video
13
COMMENT=	Standards-based system to encode, stream, and play MPEG-4 audio/video
14
14
15
BUILD_DEPENDS=	mp4v2>=1.9.1:multimedia/mp4v2 \
15
BUILD_DEPENDS=	mp4v2>=2.0.0:multimedia/mp4v2 \
16
		${LOCALBASE}/include/linux/videodev.h:multimedia/v4l_compat
16
		${LOCALBASE}/include/linux/videodev.h:multimedia/v4l_compat
17
LIB_DEPENDS=	libfaac.so:audio/faac \
17
LIB_DEPENDS=	libfaac.so:audio/faac \
18
		libfaad.so:audio/faad \
18
		libfaad.so:audio/faad \
Lines 20-28 Link Here
20
		libid3tag.so:audio/libid3tag \
20
		libid3tag.so:audio/libid3tag \
21
		liba52.so:audio/liba52 \
21
		liba52.so:audio/liba52 \
22
		libmpeg2.so:multimedia/libmpeg2 \
22
		libmpeg2.so:multimedia/libmpeg2 \
23
		libavcodec0.so:multimedia/ffmpeg0 \
23
		libavcodec.so:multimedia/ffmpeg \
24
		libx264.so:multimedia/libx264
24
		libx264.so:multimedia/libx264
25
RUN_DEPENDS=	mp4v2>=1.9.1:multimedia/mp4v2
25
RUN_DEPENDS=	mp4v2>=2.0.0:multimedia/mp4v2
26
26
27
USE_GNOME=	gtk20
27
USE_GNOME=	gtk20
28
USE_SDL=	sdl
28
USE_SDL=	sdl
Lines 30-44 Link Here
30
GNU_CONFIGURE=	yes
30
GNU_CONFIGURE=	yes
31
USE_LDCONFIG=	yes
31
USE_LDCONFIG=	yes
32
CFLAGS+=	-Wno-return-type
32
CFLAGS+=	-Wno-return-type
33
CPPFLAGS+=	-I${LOCALBASE}/include/SDL -I${LOCALBASE}/include/ffmpeg0 -I${LOCALBASE}/include
33
CPPFLAGS+=	-I${LOCALBASE}/include/SDL -I${LOCALBASE}/include -D__STDC_CONSTANT_MACROS
34
LIBS+=		-L${LOCALBASE}/lib/ffmpeg0 -L${LOCALBASE}/lib
34
LIBS+=		-L${LOCALBASE}/lib
35
CONFIGURE_ARGS=	--enable-ffmpeg=${LOCALBASE} \
35
CONFIGURE_ARGS=	--enable-ffmpeg=${LOCALBASE} \
36
		--enable-mp4live \
36
		--enable-mp4live \
37
		--disable-static
37
		--disable-static
38
38
39
OPTIONS_DEFINE=		ESOUND IPV6 NAS OPTIMIZED_CFLAGS XVID DOCS
39
OPTIONS_DEFINE=		ESOUND IPV6 NAS OPTIMIZED_CFLAGS XVID DOCS SRTP
40
OPTIONS_DEFAULT=	XVID
40
OPTIONS_DEFAULT=	XVID
41
41
42
SRTP_DESC=	Secure RTP support
43
OPTIONS_SUB=	yes
44
42
DOC_FILES=	${PORTDOCS}
45
DOC_FILES=	${PORTDOCS}
43
PORTDOCS=	MAINREADME.html MP4LIVE_INTERNALS.html MPEG4IP_Guide.pdf \
46
PORTDOCS=	MAINREADME.html MP4LIVE_INTERNALS.html MPEG4IP_Guide.pdf \
44
		MP4LIVE_README.html PLAYER_INTERNALS.html PLAYER_README.html \
47
		MP4LIVE_README.html PLAYER_INTERNALS.html PLAYER_README.html \
Lines 45-50 Link Here
45
		ReadingList.txt encoding.htm m4rm.html \
48
		ReadingList.txt encoding.htm m4rm.html \
46
		mp4player.jpg mrm.html pi.html prm.html
49
		mp4player.jpg mrm.html pi.html prm.html
47
50
51
SRTP_BUILD_DEPENDS=	${LOCALBASE}/include/srtp/srtp.h:net/libsrtp
52
SRTP_CONFIGURE_ENABLE=	srtp
53
SRTP_CFLAGS=		-DHAVE_UINT64_T
54
48
.include <bsd.port.options.mk>
55
.include <bsd.port.options.mk>
49
56
50
###
57
###
Lines 83-92 Link Here
83
# xvid
90
# xvid
84
.if ${PORT_OPTIONS:MXVID}
91
.if ${PORT_OPTIONS:MXVID}
85
LIB_DEPENDS+=	libxvidcore.so:multimedia/xvid
92
LIB_DEPENDS+=	libxvidcore.so:multimedia/xvid
86
87
PLIST_SUB+=	XVID=""
88
.else
89
PLIST_SUB+=	XVID="@comment "
90
.endif
93
.endif
91
94
92
#post-patch:
95
#post-patch:
Lines 100-110 Link Here
100
		's|$$(top_builddir)/lib/mp4v2/libmp4v2.la||; \
103
		's|$$(top_builddir)/lib/mp4v2/libmp4v2.la||; \
101
		s|$$(top_srcdir)/lib/mp4v2/libmp4v2.la||; \
104
		s|$$(top_srcdir)/lib/mp4v2/libmp4v2.la||; \
102
		s|@LIBS@|@LIBS@ -lmp4v2|; \
105
		s|@LIBS@|@LIBS@ -lmp4v2|; \
103
		s|nasm|yasm|'
106
		s|nasm|yasm|; s|-Werror||';
104
	@${REINPLACE_CMD} -e 's|-Werror||' \
105
		${WRKSRC}/common/video/iso-mpeg4/src/Makefile.in
106
	@${REINPLACE_CMD} -e 's|mp4venc_template.par||' \
107
	@${REINPLACE_CMD} -e 's|mp4venc_template.par||' \
107
		${WRKSRC}/server/util/mp4encode/Makefile.in
108
		${WRKSRC}/server/util/mp4encode/Makefile.in
109
	@${REINPLACE_CMD} -e 's|<mp4.h>|"mpeg4ip.h"|' \
110
		${WRKSRC}/lib/mp4av/mp4av.h
108
	@${FIND} ${WRKSRC} -type f -name "*.[ch]" -or -name "*.cpp" | ${XARGS} -n 10 \
111
	@${FIND} ${WRKSRC} -type f -name "*.[ch]" -or -name "*.cpp" | ${XARGS} -n 10 \
109
		${REINPLACE_CMD} -e \
112
		${REINPLACE_CMD} -e \
110
		's|<stdint.h>|<inttypes.h>|; \
113
		's|<stdint.h>|<inttypes.h>|; \
Lines 111-116 Link Here
111
		s|<malloc.h>|<stdlib.h>|; \
114
		s|<malloc.h>|<stdlib.h>|; \
112
		s|<avcodec.h>|<libavcodec/avcodec.h>|; \
115
		s|<avcodec.h>|<libavcodec/avcodec.h>|; \
113
		s|<swscale.h>|<libswscale/swscale.h>|; \
116
		s|<swscale.h>|<libswscale/swscale.h>|; \
117
		s|["<]\(mp4v2/\)*mp4.h[">]|<mp4v2/mp4v2.h>|; \
114
		s|<strstream.h>|<iostream>|'
118
		s|<strstream.h>|<iostream>|'
115
# replacing distfile's libs with ports' versions
119
# replacing distfile's libs with ports' versions
116
# SDL related fixes
120
# SDL related fixes
Lines 126-141 Link Here
126
		-e 's|api.mpt||' \
130
		-e 's|api.mpt||' \
127
		-e 's|^(install-man.*)install-manm|\1|' \
131
		-e 's|^(install-man.*)install-manm|\1|' \
128
		${WRKSRC}/doc/mp4v2/Makefile.in
132
		${WRKSRC}/doc/mp4v2/Makefile.in
129
	@${REINPLACE_CMD} -e 's|$${enable_ffmpeg}/lib/libavcodec.a|-lavcodec0 -lavutil0 -lswscale0|g' \
130
		${WRKSRC}/configure
131
	@${REINPLACE_CMD} -e 's|pSameples|pSamples|' \
133
	@${REINPLACE_CMD} -e 's|pSameples|pSamples|' \
132
		${WRKSRC}/server/mp4live/audio_l16.cpp
134
		${WRKSRC}/server/mp4live/audio_l16.cpp
133
135
134
# replace bundled mp4v2 with placeholder
136
# remove bundled mp4v2
135
post-configure:
137
post-configure:
136
	@${RM} -rf ${WRKSRC}/lib/mp4v2
138
	@${RM} -rf ${WRKSRC}/lib/mp4v2
137
	@${MKDIR} ${WRKSRC}/lib/mp4v2
138
	@echo '#include "mpeg4ip.h"' > ${WRKSRC}/lib/mp4v2/mp4.h
139
139
140
post-install:
140
post-install:
141
	@${MKDIR} ${STAGEDIR}${DATADIR}
141
	@${MKDIR} ${STAGEDIR}${DATADIR}
(-)multimedia/mpeg4ip/files/patch-common_video_iso-mpeg4_src_type_basic.cpp (-7 / +3 lines)
Lines 1-15 Link Here
1
--- common/video/iso-mpeg4/src/type_basic.cpp.orig	2007-09-23 17:04:08.000000000 -0400
1
--- common/video/iso-mpeg4/src/type_basic.cpp.orig	2007-09-23 17:04:08.000000000 -0400
2
+++ common/video/iso-mpeg4/src/type_basic.cpp	2007-09-23 17:04:39.000000000 -0400
2
+++ common/video/iso-mpeg4/src/type_basic.cpp	2007-09-23 17:04:39.000000000 -0400
3
@@ -317,10 +317,12 @@
3
@@ -317,7 +317,7 @@
4
 	iHalfY = m_vctTrueHalfPel.y - iMVY * 2;
4
 	iHalfY = m_vctTrueHalfPel.y - iMVY * 2;
5
 }
5
 }
6
 
6
 
7
+/*
7
-Void CMotionVector::setToZero (Void)
8
 Void CMotionVector::setToZero (Void)
8
+Void CMotionVector::setToZero ()
9
 {
9
 {
10
 	memset (this, 0, sizeof (*this));
10
 	memset (this, 0, sizeof (*this));
11
 }
11
 }
12
+*/
13
 
14
 // RRV insertion
15
 Void CMotionVector::scaleup ()
(-)multimedia/mpeg4ip/files/patch-configure (-2 / +29 lines)
Lines 31-41 Link Here
31
 echo "$as_me: have enable ffmpeg $enable_ffmpeg" >&6;}
31
 echo "$as_me: have enable ffmpeg $enable_ffmpeg" >&6;}
32
-     FFMPEG_INC=-I${enable_ffmpeg}/libavcodec
32
-     FFMPEG_INC=-I${enable_ffmpeg}/libavcodec
33
-     FFMPEG_LIB="${enable_ffmpeg}/libavcodec/libavcodec.a -lz"
33
-     FFMPEG_LIB="${enable_ffmpeg}/libavcodec/libavcodec.a -lz"
34
+     FFMPEG_INC=-I${enable_ffmpeg}/include/ffmpeg0
34
+     FFMPEG_INC=-I${enable_ffmpeg}/include
35
+     FFMPEG_LIB="${enable_ffmpeg}/lib/libavcodec.a -lz"
35
+     FFMPEG_LIB="-L${enable_ffmpeg}/lib -lavcodec -lavutil -lswscale -lz"
36
      saveCFLAGS="$CFLAGS"
36
      saveCFLAGS="$CFLAGS"
37
      CFLAGS="$CFLAGS $FFMPEG_INC"
37
      CFLAGS="$CFLAGS $FFMPEG_INC"
38
      { echo "$as_me:$LINENO: checking for AVRational" >&5
38
      { echo "$as_me:$LINENO: checking for AVRational" >&5
39
@@ -26443,7 +26443,7 @@ _ACEOF
40
 cat confdefs.h >>conftest.$ac_ext
41
 cat >>conftest.$ac_ext <<_ACEOF
42
 /* end confdefs.h.  */
43
-#include <avcodec.h>
44
+#include <libavcodec/avcodec.h>
45
 
46
 typedef AVRational ac__type_new_;
47
 int
48
@@ -26506,7 +26506,7 @@ _ACEOF
49
 cat confdefs.h >>conftest.$ac_ext
50
 cat >>conftest.$ac_ext <<_ACEOF
51
 /* end confdefs.h.  */
52
-#include <avcodec.h>
53
+#include <libavcodec/avcodec.h>
54
 
55
 int
56
 main ()
57
@@ -26546,7 +26546,7 @@ _ACEOF
58
 cat confdefs.h >>conftest.$ac_ext
59
 cat >>conftest.$ac_ext <<_ACEOF
60
 /* end confdefs.h.  */
61
-#include <avcodec.h>
62
+#include <libavcodec/avcodec.h>
63
 
64
 int
65
 main ()
39
@@ -26613,7 +26610,7 @@
66
@@ -26613,7 +26610,7 @@
40
 cat confdefs.h >>conftest.$ac_ext
67
 cat confdefs.h >>conftest.$ac_ext
41
 cat >>conftest.$ac_ext <<_ACEOF
68
 cat >>conftest.$ac_ext <<_ACEOF
(-)multimedia/mpeg4ip/files/patch-ffmpeg2 (+270 lines)
Line 0 Link Here
1
build mpeg4ip with ffmpeg2
2
https://github.com/pld-linux/mpeg4ip/blob/master/mpeg4ip-ffmpeg.patch
3
https://github.com/pld-linux/mpeg4ip/blob/master/mpeg4ip-ffmpeg2.patch
4
5
--- player/plugin/audio/ffmpeg/ffmpeg.h.orig	2013-08-29 18:08:50.230893682 +0200
6
+++ player/plugin/audio/ffmpeg/ffmpeg.h	2013-08-29 18:15:09.531993597 +0200
7
@@ -32,6 +32,10 @@
8
 #endif
9
 }
10
 
11
+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
12
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
13
+#endif
14
+
15
 DECLARE_CONFIG(CONFIG_USE_FFMPEG_AUDIO);
16
 
17
 #define m_vft c.v.audio_vft
18
@@ -39,7 +39,7 @@
19
 
20
 typedef struct ffmpeg_codec_t {
21
   codec_data_t c;
22
-  enum CodecID m_codecId;
23
+  enum AVCodecID m_codecId;
24
   AVCodec *m_codec;
25
   AVCodecContext *m_c;
26
   bool m_audio_initialized;
27
--- player/plugin/audio/ffmpeg/ffmpeg.cpp.orig	2011-07-26 18:37:06.785253535 +0200
28
+++ player/plugin/audio/ffmpeg/ffmpeg.cpp	2011-07-26 18:43:29.810426398 +0200
29
@@ -44,7 +44,7 @@
30
 #endif
31
 #endif
32
 
33
-static enum CodecID ffmpeg_find_codec (const char *stream_type,
34
+static enum AVCodecID ffmpeg_find_codec (const char *stream_type,
35
 				       const char *compressor, 
36
 				       int type, 
37
 				       int profile, 
38
@@ -135,7 +135,6 @@
39
 
40
   ffmpeg->m_vft = vft;
41
   ffmpeg->m_ifptr = ifptr;
42
-  avcodec_init();
43
   avcodec_register_all();
44
 
45
   ffmpeg->m_codecId = ffmpeg_find_codec(stream_type, compressor, type, 
46
@@ -142,7 +142,7 @@
47
 
48
   // must have a codecID - we checked it earlier
49
   ffmpeg->m_codec = avcodec_find_decoder(ffmpeg->m_codecId);
50
-  ffmpeg->m_c = avcodec_alloc_context();
51
+  ffmpeg->m_c = avcodec_alloc_context3(ffmpeg->m_codec);
52
 
53
   if (ainfo != NULL) {
54
     ffmpeg->m_c->channels = ainfo->chans;
55
@@ -170,7 +170,7 @@
56
     ffmpeg->m_c->extradata_size = ud_size;
57
   }
58
   ffmpeg_interface_lock();
59
-  if (avcodec_open(ffmpeg->m_c, ffmpeg->m_codec) < 0) {
60
+  if (avcodec_open2(ffmpeg->m_c, ffmpeg->m_codec, NULL) < 0) {
61
     ffmpeg_interface_unlock();
62
     ffmpeg_message(LOG_CRIT, "ffmpeg", "failed to open codec");
63
     return NULL;
64
@@ -220,14 +220,13 @@
65
   uint32_t freq_ts = pts->audio_freq_timestamp;
66
 
67
   do {
68
-#if HAVE_DECL_AVCODEC_DECODE_AUDIO2 != 1
69
-    used = avcodec_decode_audio(ffmpeg->m_c, (short *)ffmpeg->m_outbuf,
70
-				&outsize, buffer, left);
71
-#else
72
-    outsize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
73
-    used = avcodec_decode_audio2(ffmpeg->m_c, (int16_t *)ffmpeg->m_outbuf,
74
-				 &outsize, buffer, left);
75
-#endif
76
+	AVPacket pkt;
77
+	av_init_packet(&pkt);
78
+	pkt.data = buffer; 
79
+	pkt.size = left; 
80
+	used = avcodec_decode_audio3(ffmpeg->m_c, (int16_t *)ffmpeg->m_outbuf,
81
+			&outsize, &pkt);
82
+
83
     if (used < 0) {
84
       ffmpeg_message(LOG_DEBUG, "ffmpeg", "failed to decode at "U64, 
85
 		     ts);
86
@@ -286,9 +286,8 @@
87
 			     uint32_t userdata_size,
88
 			      CConfigSet *pConfig)
89
 {
90
-  enum CodecID fcodec;
91
+  enum AVCodecID fcodec;
92
   AVCodec *c;
93
-  avcodec_init();
94
   avcodec_register_all();
95
 
96
   fcodec = ffmpeg_find_codec(stream_type, compressor, type, profile, 
97
--- player/plugin/video/ffmpeg/ffmpeg.h.orig	2007-07-02 22:26:03.000000000 +0200
98
+++ player/plugin/video/ffmpeg/ffmpeg.h	2008-10-10 22:16:05.176622742 +0200
99
@@ -42,7 +42,7 @@
100
 
101
 typedef struct ffmpeg_codec_t {
102
   codec_data_t c;
103
-  enum CodecID m_codecId;
104
+  enum AVCodecID m_codecId;
105
   AVCodec *m_codec;
106
   AVCodecContext *m_c;
107
   AVFrame *m_picture;
108
--- player/plugin/video/ffmpeg/ffmpeg.cpp.orig	2007-07-02 22:26:03.000000000 +0200
109
+++ player/plugin/video/ffmpeg/ffmpeg.cpp	2008-10-10 23:01:19.519476374 +0200
110
@@ -40,7 +40,7 @@
111
 
112
 //#define DEBUG_FFMPEG_FRAME 1
113
 //#define DEBUG_FFMPEG_PTS 1
114
-static enum CodecID ffmpeg_find_codec (const char *stream_type,
115
+static enum AVCodecID ffmpeg_find_codec (const char *stream_type,
116
 				       const char *compressor, 
117
 				       int type, 
118
 				       int profile, 
119
@@ -186,7 +186,6 @@
120
 
121
   ffmpeg->m_vft = vft;
122
   ffmpeg->m_ifptr = ifptr;
123
-  avcodec_init();
124
   avcodec_register_all();
125
   av_log_set_level(AV_LOG_QUIET);
126
 
127
@@ -194,7 +194,7 @@
128
 
129
   // must have a codecID - we checked it earlier
130
   ffmpeg->m_codec = avcodec_find_decoder(ffmpeg->m_codecId);
131
-  ffmpeg->m_c = avcodec_alloc_context();
132
+  ffmpeg->m_c = avcodec_alloc_context3(ffmpeg->m_codec);
133
   ffmpeg->m_picture = avcodec_alloc_frame();
134
   bool open_codec = true;
135
   bool run_userdata = false;
136
@@ -281,7 +281,7 @@
137
   }
138
   if (open_codec) {
139
     ffmpeg_interface_lock();
140
-    if (avcodec_open(ffmpeg->m_c, ffmpeg->m_codec) < 0) {
141
+    if (avcodec_open2(ffmpeg->m_c, ffmpeg->m_codec, NULL) < 0) {
142
       ffmpeg_interface_unlock();
143
       ffmpeg_message(LOG_CRIT, "ffmpeg", "failed to open codec");
144
       return NULL;
145
@@ -295,11 +295,13 @@
146
       uint32_t offset = 0;
147
       do {
148
 	int got_picture;
149
-	offset += avcodec_decode_video(ffmpeg->m_c, 
150
-				       ffmpeg->m_picture,
151
-				       &got_picture,
152
-				       (uint8_t *)userdata + offset, 
153
-				       ud_size - offset);
154
+	AVPacket pkt;
155
+	av_init_packet(&pkt);
156
+	pkt.data = (uint8_t *)userdata + offset;
157
+	pkt.size = ud_size - offset;
158
+	offset += avcodec_decode_video2(ffmpeg->m_c,
159
+			ffmpeg->m_picture,
160
+			&got_picture, &pkt);
161
       } while (offset < ud_size);
162
     }
163
 	
164
@@ -418,7 +418,7 @@
165
     }
166
     if (open_codec) {
167
       ffmpeg_interface_lock();
168
-      if (avcodec_open(ffmpeg->m_c, ffmpeg->m_codec) < 0) {
169
+      if (avcodec_open2(ffmpeg->m_c, ffmpeg->m_codec, NULL) < 0) {
170
 	ffmpeg_interface_unlock();
171
 	ffmpeg_message(LOG_CRIT, "ffmpeg", "failed to open codec");
172
 	return buflen;
173
@@ -442,11 +444,13 @@
174
   int ret;
175
   do {
176
     int local_got_picture;
177
-    ret = avcodec_decode_video(ffmpeg->m_c, 
178
-			       ffmpeg->m_picture,
179
-			       &local_got_picture,
180
-			       buffer + bytes_used, 
181
-			       buflen - bytes_used);
182
+	AVPacket pkt;
183
+	av_init_packet(&pkt);
184
+	pkt.data = buffer + bytes_used; 
185
+	pkt.size = buflen - bytes_used;
186
+	ret = avcodec_decode_video2(ffmpeg->m_c,
187
+			ffmpeg->m_picture,
188
+			&local_got_picture, &pkt);
189
     bytes_used += ret;
190
     //ffmpeg_message(LOG_CRIT, "ffmpeg", "used %d %d", ret, local_got_picture);
191
     got_picture |= local_got_picture;
192
@@ -632,9 +632,8 @@
193
 			     uint32_t userdata_size,
194
 			      CConfigSet *pConfig)
195
 {
196
-  enum CodecID fcodec;
197
+  enum AVCodecID fcodec;
198
   AVCodec *c;
199
-  avcodec_init();
200
   avcodec_register_all();
201
   av_log_set_level(AV_LOG_QUIET);
202
   fcodec = ffmpeg_find_codec(stream_type, compressor, type, profile, 
203
--- server/mp4live/audio_ffmpeg.cpp.orig	2006-09-29 21:55:42.000000000 +0200
204
+++ server/mp4live/audio_ffmpeg.cpp	2011-07-26 22:13:07.825014397 +0200
205
@@ -442,7 +442,6 @@
206
 {
207
   const char *encoding = Profile()->GetStringValue(CFG_AUDIO_ENCODING);
208
 
209
-  avcodec_init();
210
   avcodec_register_all();
211
 
212
   if (strcasecmp(encoding,AUDIO_ENCODING_MP3) == 0) {
213
@@ -471,10 +471,10 @@
214
     error_message("Couldn't find audio codec");
215
     return false;
216
   }
217
-  m_avctx = avcodec_alloc_context();
218
+  m_avctx = avcodec_alloc_context3(m_codec);
219
   m_frame = avcodec_alloc_frame();
220
 
221
-  m_avctx->codec_type = CODEC_TYPE_AUDIO;
222
+  m_avctx->codec_type = AVMEDIA_TYPE_AUDIO;
223
   switch (m_media_frame) {
224
   case MP3AUDIOFRAME:
225
     m_avctx->codec_id = CODEC_ID_MP2;
226
@@ -510,7 +510,7 @@
227
   m_avctx->channels = Profile()->GetIntegerValue(CFG_AUDIO_CHANNELS);
228
 
229
   ffmpeg_interface_lock();
230
-  if (avcodec_open(m_avctx, m_codec) < 0) {
231
+  if (avcodec_open2(m_avctx, m_codec, NULL) < 0) {
232
     ffmpeg_interface_unlock();
233
     error_message("Couldn't open ffmpeg codec");
234
     return false;
235
@@ -647,7 +646,6 @@
236
   AddAudioEncoderTable(&ffmpeg_alaw_audio_encoder_table);
237
   AddAudioEncoderTable(&ffmpeg_ulaw_audio_encoder_table);
238
 #ifdef MAY_HAVE_AMR_CODEC
239
-  avcodec_init();
240
   avcodec_register_all();
241
   bool have_amr_nb = avcodec_find_encoder(CODEC_ID_AMR_NB) != NULL;
242
   bool have_amr_wb = avcodec_find_encoder(CODEC_ID_AMR_WB) != NULL;
243
--- server/mp4live/video_ffmpeg.cpp.orig	2007-01-30 22:53:45.000000000 +0100
244
+++ server/mp4live/video_ffmpeg.cpp	2011-07-26 22:17:55.917224166 +0200
245
@@ -72,7 +72,6 @@
246
 
247
 bool CFfmpegVideoEncoder::Init (void)
248
 {
249
-  avcodec_init();
250
   avcodec_register_all();
251
 
252
   if (m_push != NULL) {
253
@@ -113,7 +113,7 @@
254
     return false;
255
   }
256
   
257
-  m_avctx = avcodec_alloc_context();
258
+  m_avctx = avcodec_alloc_context3(m_codec);
259
   m_picture = avcodec_alloc_frame();
260
   m_avctx->width = Profile()->m_videoWidth;
261
   m_avctx->height = Profile()->m_videoHeight;
262
@@ -190,7 +190,7 @@
263
   }
264
   m_count = 0;
265
   ffmpeg_interface_lock();
266
-  if (avcodec_open(m_avctx, m_codec) < 0) {
267
+  if (avcodec_open2(m_avctx, m_codec, NULL) < 0) {
268
     ffmpeg_interface_unlock();
269
     error_message("Couldn't open codec");
270
     return false;
(-)multimedia/mpeg4ip/files/patch-include__mpeg4ip.h (-16 lines)
Lines 9-30 Link Here
9
 #ifdef _WIN32
9
 #ifdef _WIN32
10
 #include "mpeg4ip_win32.h"
10
 #include "mpeg4ip_win32.h"
11
 #include "mpeg4ip_version.h"
11
 #include "mpeg4ip_version.h"
12
@@ -178,6 +180,7 @@
13
 #define LLU  U64
14
 
15
 #include <stdarg.h>
16
+/* from mp4v2/mp4v2.h
17
 typedef void (*error_msg_func_t)(int loglevel,
18
 				 const char *lib,
19
 				 const char *fmt,
20
@@ -186,6 +189,7 @@
21
 				   const char *lib,
22
 				   const char *fmt,
23
 				   ...);
24
+*/
25
 #ifndef HAVE_IN_PORT_T
26
 typedef uint16_t in_port_t;
27
 #endif
28
@@ -271,6 +275,7 @@
12
@@ -271,6 +275,7 @@
29
 
13
 
30
 #ifndef __cplusplus
14
 #ifndef __cplusplus
(-)multimedia/mpeg4ip/files/patch-lib-ismacryp-ismacryplib.c (+56 lines)
Line 0 Link Here
1
--- lib/ismacryp/ismacryplib.c~	2007-02-07 18:34:15.000000000 +0100
2
+++ lib/ismacryp/ismacryplib.c	2011-07-26 12:22:12.428126498 +0200
3
@@ -345,7 +345,7 @@
4
   }
5
 
6
   // Init cipher.
7
-  rc=aes_icm_context_init(sp->cp->state, sp->kk.aes_overlay);
8
+  rc=aes_icm_context_init(sp->cp->state, sp->kk.aes_overlay, AES_TOT_LEN);
9
   if ( rc != err_status_ok ) {
10
       fprintf(stdout," - init cipher for session %d FAILED  rc = %d\n", session,
11
                                      rc );
12
@@ -888,7 +888,7 @@
13
    if ( sp->sample_count == 1 ) {
14
        memset(nonce,0,AES_KEY_LEN);
15
        //rc=aes_icm_set_segment(sp->cp->state, 0); // defunct function.
16
-       rc=aes_icm_set_iv(sp->cp->state, nonce);
17
+       rc=aes_icm_set_iv(sp->cp->state, nonce, direction_encrypt);
18
    }
19
 
20
    // length will not be updated in calling function (obviously) awv.
21
@@ -939,7 +939,7 @@
22
   if ( sp->sample_count == 1 ) {
23
       memset(nonce,0,AES_KEY_LEN);
24
       //rc=aes_icm_set_segment(sp->cp->state, 0); // defunct function.
25
-      rc=aes_icm_set_iv(sp->cp->state, nonce);
26
+      rc=aes_icm_set_iv(sp->cp->state, nonce, direction_encrypt);
27
   }
28
 
29
   // length will not be updated in calling function (obviously) awv.
30
@@ -1015,7 +1015,7 @@
31
   if ( sp->sample_count == 1 ) {
32
       memset(nonce,0,AES_KEY_LEN);
33
       //rc=aes_icm_set_segment(sp->cp->state, 0); // defunct function.
34
-      rc=aes_icm_set_iv(sp->cp->state, nonce);
35
+      rc=aes_icm_set_iv(sp->cp->state, nonce, direction_encrypt);
36
   }
37
 #endif
38
 
39
@@ -1076,7 +1076,7 @@
40
        memset(nonce,0,AES_KEY_LEN);
41
        *((uint32_t *)(&nonce[12])) = htonl(counter);
42
 #ifdef HAVE_SRTP
43
-       rc=aes_icm_set_iv(sp->cp->state, nonce);
44
+       rc=aes_icm_set_iv(sp->cp->state, nonce, direction_encrypt);
45
        rc=aes_icm_encrypt_ismacryp(sp->cp->state, fakedata, &remainder, 1);
46
 #endif
47
 
48
@@ -1088,7 +1088,7 @@
49
   memset(nonce,0,AES_KEY_LEN);
50
   *((uint32_t *)(&nonce[12])) = htonl(counter);
51
 #ifdef HAVE_SRTP
52
-  rc=aes_icm_set_iv(sp->cp->state, nonce);
53
+  rc=aes_icm_set_iv(sp->cp->state, nonce, direction_encrypt);
54
   // set the number of bytes the previous key should decrypt 
55
   ((aes_icm_ctx_t *)(sp->cp->state))->bytes_in_buffer = remainder;
56
 #endif
(-)multimedia/mpeg4ip/files/patch-mp4v2 (+543 lines)
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) {
(-)multimedia/mpeg4ip/files/patch-player-lib-rtsp-rtsp_thread.c (+11 lines)
Line 0 Link Here
1
--- player/lib/rtsp/rtsp_thread.c.orig	2006-10-24 00:26:40.000000000 +0200
2
+++ player/lib/rtsp/rtsp_thread.c	2012-12-07 17:51:18.793572347 +0100
3
@@ -378,7 +378,7 @@
4
 
5
   
6
   continue_thread = 0;
7
-  memset(&state, sizeof(state), 0);
8
+  memset(&state, 0, sizeof(state));
9
   state.rtp_ptr = NULL;
10
   state.state = RTP_DATA_UNKNOWN;
11
   rtsp_thread_init_thread_info(info);
(-)multimedia/mpeg4ip/files/patch-server_mp4live_video_ffmpeg.cpp (-2 / +4 lines)
Lines 23-32 Link Here
23
 #else
23
 #else
24
     AVRational asp = 
24
     AVRational asp = 
25
       {Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH),
25
       {Profile()->GetIntegerValue(CFG_VIDEO_MPEG4_PAR_WIDTH),
26
@@ -224,8 +221,8 @@
26
@@ -223,9 +220,9 @@
27
       m_count = 0;
27
     }
28
     }
28
   }
29
   }
29
   if (wantKeyFrame) m_picture->pict_type = FF_I_TYPE; //m_picture->key_frame = 1;
30
-  if (wantKeyFrame) m_picture->pict_type = FF_I_TYPE; //m_picture->key_frame = 1;
31
+  if (wantKeyFrame) m_picture->pict_type = AV_PICTURE_TYPE_I; //m_picture->key_frame = 1;
30
   else //m_picture->key_frame = 0;
32
   else //m_picture->key_frame = 0;
31
-    m_picture->pict_type = 0;
33
-    m_picture->pict_type = 0;
32
+    m_picture->pict_type = AV_PICTURE_TYPE_NONE;
34
+    m_picture->pict_type = AV_PICTURE_TYPE_NONE;
(-)net/libsrtp/files/patch-configure (+14 lines)
Line 0 Link Here
1
include ISMAcryp functions even when using openssl for AES; needed by mpeg4ip
2
https://github.com/pld-linux/srtp/blob/master/srtp-ismacryp.patch
3
4
--- configure.orig	2015-08-09 15:11:03.730635000 +0300
5
+++ configure	2015-08-09 15:12:33.559396000 +0300
6
@@ -5085,7 +5085,7 @@ fi
7
 
8
 $as_echo "#define OPENSSL 1" >>confdefs.h
9
 
10
-   AES_ICM_OBJS="crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o"
11
+   AES_ICM_OBJS="crypto/cipher/aes_icm_ossl.o crypto/cipher/aes_gcm_ossl.o crypto/cipher/aes_icm.o crypto/cipher/aes.o"
12
    RNG_OBJS=rand_source_ossl.o
13
    HMAC_OBJS=crypto/hash/hmac_ossl.o
14
    USE_OPENSSL=1
(-)net/libsrtp/files/patch-crypto_cipher_aes_icm.c (+44 lines)
Line 0 Link Here
1
include ISMAcryp functions even when using openssl for AES; needed by mpeg4ip
2
https://github.com/pld-linux/srtp/blob/master/srtp-ismacryp.patch
3
4
--- crypto/cipher/aes_icm.c.orig	2015-03-11 15:02:12.000000000 +0100
5
+++ crypto/cipher/aes_icm.c	2015-08-06 21:28:11.477858986 +0200
6
@@ -53,10 +53,14 @@
7
 #include "alloc.h"
8
 
9
 
10
+#ifdef OPENSSL
11
+extern debug_module_t mod_aes_icm;
12
+#else
13
 debug_module_t mod_aes_icm = {
14
   0,                 /* debugging is off by default */
15
   "aes icm"          /* printable module name       */
16
 };
17
+#endif
18
 
19
 /*
20
  * integer counter mode works as follows:
21
@@ -482,14 +482,17 @@
22
   return aes_icm_encrypt(c, buffer, &len);
23
 }
24
 
25
+#ifndef OPENSSL
26
 uint16_t
27
 aes_icm_bytes_encrypted(aes_icm_ctx_t *c) {
28
     return htons(c->counter.v16[7]);
29
 }
30
+#endif
31
 
32
 char 
33
 aes_icm_description[] = "aes integer counter mode";
34
 
35
+#ifndef OPENSSL
36
 uint8_t aes_icm_test_case_0_key[30] = {
37
   0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
38
   0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c,
39
@@ -589,4 +594,5 @@
40
   (debug_module_t *)            &mod_aes_icm,
41
   (cipher_type_id_t)             AES_ICM
42
 };
43
+#endif
44
 
(-)textproc/libextractor/Makefile (-3 / +6 lines)
Lines 14-20 Link Here
14
14
15
LIB_DEPENDS=	libltdl.so:devel/libltdl
15
LIB_DEPENDS=	libltdl.so:devel/libltdl
16
16
17
USES=		iconv gettext libtool makeinfo pathfix pkgconfig python
17
USES=		iconv libtool makeinfo pathfix pkgconfig python
18
USE_GNOME=	gtk20
18
USE_GNOME=	gtk20
19
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
20
CONFIGURE_ARGS=	--with-gtk-version=2 \
20
CONFIGURE_ARGS=	--with-gtk-version=2 \
Lines 30-38 Link Here
30
INFO=		libextractor
30
INFO=		libextractor
31
31
32
OPTIONS_DEFINE=		EXIV2 FFMPEG FLAC GIF GSF GSTREAMER MPEG2 MP4 \
32
OPTIONS_DEFINE=		EXIV2 FFMPEG FLAC GIF GSF GSTREAMER MPEG2 MP4 \
33
			RPM SMF TIDY VORBIS
33
			RPM SMF TIDY VORBIS NLS
34
OPTIONS_DEFAULT=	EXIV2 FFMPEG FLAC GIF GSF GSTREAMER MPEG2 MP4 \
34
OPTIONS_DEFAULT=	EXIV2 FFMPEG FLAC GIF GSF GSTREAMER MPEG2 MP4 \
35
			RPM SMF TIDY VORBIS
35
			RPM SMF TIDY VORBIS NLS
36
OPTIONS_SUB=		yes
36
OPTIONS_SUB=		yes
37
37
38
EXIV2_LIB_DEPENDS=	libexiv2.so:graphics/exiv2
38
EXIV2_LIB_DEPENDS=	libexiv2.so:graphics/exiv2
Lines 52-57 Link Here
52
MPEG2_LIB_DEPENDS=	libmpeg2.so:multimedia/libmpeg2
52
MPEG2_LIB_DEPENDS=	libmpeg2.so:multimedia/libmpeg2
53
MPEG2_CONFIGURE_ENV_OFF=	ac_cv_lib_mpeg2_mpeg2_init=no
53
MPEG2_CONFIGURE_ENV_OFF=	ac_cv_lib_mpeg2_mpeg2_init=no
54
MP4_LIB_DEPENDS=	libmp4v2.so:multimedia/mp4v2
54
MP4_LIB_DEPENDS=	libmp4v2.so:multimedia/mp4v2
55
MP4_CONFIGURE_ON=	--enable-experimental
55
MP4_CONFIGURE_ENV_OFF=	ac_cv_lib_mp4v2_MP4ReadProvider=no
56
MP4_CONFIGURE_ENV_OFF=	ac_cv_lib_mp4v2_MP4ReadProvider=no
56
RPM_DESC=		RPM support
57
RPM_DESC=		RPM support
57
RPM_LIB_DEPENDS=	librpm.so:archivers/rpm4
58
RPM_LIB_DEPENDS=	librpm.so:archivers/rpm4
Lines 65-70 Link Here
65
TIDY_CONFIGURE_ENV_OFF=	TIDY_H=""
66
TIDY_CONFIGURE_ENV_OFF=	TIDY_H=""
66
VORBIS_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis
67
VORBIS_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis
67
VORBIS_CONFIGURE_ENV_OFF=	ac_cv_lib_vorbisfile_ov_open_callbacks=no
68
VORBIS_CONFIGURE_ENV_OFF=	ac_cv_lib_vorbisfile_ov_open_callbacks=no
69
NLS_CONFIGURE_ENABLE=	nls
70
NLS_USES=		gettext
68
71
69
post-patch:
72
post-patch:
70
	@${REINPLACE_CMD} -e \
73
	@${REINPLACE_CMD} -e \
(-)textproc/libextractor/pkg-plist (-11 / +13 lines)
Lines 34-39 Link Here
34
%%SMF%%lib/libextractor/libextractor_midi.so
34
%%SMF%%lib/libextractor/libextractor_midi.so
35
lib/libextractor/libextractor_mime.a
35
lib/libextractor/libextractor_mime.a
36
lib/libextractor/libextractor_mime.so
36
lib/libextractor/libextractor_mime.so
37
%%MP4%%lib/libextractor/libextractor_mp4.a
38
%%MP4%%lib/libextractor/libextractor_mp4.so
37
%%MPEG2%%lib/libextractor/libextractor_mpeg.a
39
%%MPEG2%%lib/libextractor/libextractor_mpeg.a
38
%%MPEG2%%lib/libextractor/libextractor_mpeg.so
40
%%MPEG2%%lib/libextractor/libextractor_mpeg.so
39
lib/libextractor/libextractor_nsf.a
41
lib/libextractor/libextractor_nsf.a
Lines 75-88 Link Here
75
libdata/pkgconfig/libextractor.pc
77
libdata/pkgconfig/libextractor.pc
76
man/man1/extract.1.gz
78
man/man1/extract.1.gz
77
man/man3/libextractor.3.gz
79
man/man3/libextractor.3.gz
78
share/locale/de/LC_MESSAGES/libextractor.mo
80
%%NLS%%share/locale/de/LC_MESSAGES/libextractor.mo
79
share/locale/fr/LC_MESSAGES/libextractor.mo
81
%%NLS%%share/locale/fr/LC_MESSAGES/libextractor.mo
80
share/locale/ga/LC_MESSAGES/libextractor.mo
82
%%NLS%%share/locale/ga/LC_MESSAGES/libextractor.mo
81
share/locale/it/LC_MESSAGES/libextractor.mo
83
%%NLS%%share/locale/it/LC_MESSAGES/libextractor.mo
82
share/locale/nl/LC_MESSAGES/libextractor.mo
84
%%NLS%%share/locale/nl/LC_MESSAGES/libextractor.mo
83
share/locale/pl/LC_MESSAGES/libextractor.mo
85
%%NLS%%share/locale/pl/LC_MESSAGES/libextractor.mo
84
share/locale/ro/LC_MESSAGES/libextractor.mo
86
%%NLS%%share/locale/ro/LC_MESSAGES/libextractor.mo
85
share/locale/rw/LC_MESSAGES/libextractor.mo
87
%%NLS%%share/locale/rw/LC_MESSAGES/libextractor.mo
86
share/locale/sv/LC_MESSAGES/libextractor.mo
88
%%NLS%%share/locale/sv/LC_MESSAGES/libextractor.mo
87
share/locale/uk/LC_MESSAGES/libextractor.mo
89
%%NLS%%share/locale/uk/LC_MESSAGES/libextractor.mo
88
share/locale/vi/LC_MESSAGES/libextractor.mo
90
%%NLS%%share/locale/vi/LC_MESSAGES/libextractor.mo

Return to bug 212785