ref: 5cfbfd4668dc51caf0f707266ce5bdfb71267731
parent: b5f271f8c73a2c4df3a5cebf4f90131ecb5e68fc
author: menno <menno>
date: Mon Jan 21 18:19:54 EST 2002
Small changes for linux
--- a/common/mp4v2/Makefile.am
+++ b/common/mp4v2/Makefile.am
@@ -1,6 +1,6 @@
-SUBDIRS = . test util
-
INCLUDES = -I$(top_srcdir)/include
+
+include_HEADERS = mp4.h mpeg4ip.h systems.h
AM_CXXFLAGS = -Wall
--- /dev/null
+++ b/common/mp4v2/bootstrap
@@ -1,0 +1,6 @@
+aclocal -I .
+autoheader
+libtoolize --automake
+automake --add-missing
+autoconf
+./configure
--- /dev/null
+++ b/common/mp4v2/configure.in
@@ -1,0 +1,14 @@
+AC_INIT()
+AM_INIT_AUTOMAKE(mpeg4ip,0.9.2.8)
+
+AC_PROG_CC
+AC_PROG_CXX
+
+AM_PROG_LIBTOOL
+
+AM_CONFIG_HEADER(config.h)
+
+AC_CHECK_HEADERS(stdint.h)
+AC_CHECK_HEADERS(inttypes.h)
+
+AC_OUTPUT(Makefile)
--- a/common/mp4v2/systems.h
+++ b/common/mp4v2/systems.h
@@ -20,13 +20,15 @@
* Bill May [email protected]
*/
-#ifdef WIN32
+#ifdef _WIN32
#define HAVE_IN_PORT_T
#define HAVE_SOCKLEN_T
#include "win32_ver.h"
#else
+#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#endif
#ifndef __SYSTEMS_H__
#define __SYSTEMS_H__
@@ -33,7 +35,7 @@
-#ifdef WIN32
+#ifdef _WIN32
#define _WIN32_WINNT 0x0400
#include <windows.h>
--- a/frontend/audio.c
+++ b/frontend/audio.c
@@ -16,10 +16,12 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: audio.c,v 1.1 2002/01/15 12:58:38 menno Exp $
+** $Id: audio.c,v 1.2 2002/01/21 23:19:54 menno Exp $
**/
+#ifdef _WIN32
#include <io.h>
+#endif
#include <fcntl.h>
#include <sndfile.h>
#include <faad.h>
@@ -55,10 +57,12 @@
}
aufile->sfinfo.channels = channels;
aufile->sfinfo.samples = 0;
+#ifdef _WIN32
if(infile[0] == '-')
{
setmode(fileno(stdout), O_BINARY);
}
+#endif
aufile->sndfile = sf_open_write(infile, &aufile->sfinfo);
if (aufile->sndfile == NULL)
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -16,14 +16,14 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
-** $Id: main.c,v 1.8 2002/01/19 09:39:00 menno Exp $
+** $Id: main.c,v 1.9 2002/01/21 23:19:54 menno Exp $
**/
#ifdef _WIN32
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
#else
- #include <time.h>
+#include <time.h>
#endif
#include <stdio.h>
@@ -248,7 +248,6 @@
aufile = open_audio_file(sndfile, samplerate, frameInfo.channels,
outputFormat, fileType);
} else {
- setmode(fileno(stdout), O_BINARY);
aufile = open_audio_file("-", samplerate, frameInfo.channels,
outputFormat, fileType);
}
@@ -419,7 +418,9 @@
aufile = open_audio_file(sndfile, samplerate, frameInfo.channels,
outputFormat, fileType);
} else {
+#ifdef _WIN32
setmode(fileno(stdout), O_BINARY);
+#endif
aufile = open_audio_file("-", samplerate, frameInfo.channels,
outputFormat, fileType);
}
@@ -455,6 +456,21 @@
return frameInfo.error;
}
+int str_no_case_comp(char const *str1, char const *str2, unsigned long len)
+{
+ signed int c1 = 0, c2 = 0;
+
+ while (len--) {
+ c1 = tolower(*str1++);
+ c2 = tolower(*str2++);
+
+ if (c1 == 0 || c1 != c2)
+ break;
+ }
+
+ return c1 - c2;
+}
+
int main(int argc, char *argv[])
{
int result;
@@ -598,7 +614,7 @@
}
fnp = (char *)strrchr(aacFileName, '.');
- if (!stricmp(fnp, ".MP4"))
+ if (!str_no_case_comp(fnp, ".MP4", 4))
mp4file = 1;
if (mp4file)