ref: 367d20be44225752b3974addd9789a821f88b692
parent: b5b68e541c7164b5be892b3f56d2d2b2a2f511a2
author: menno <menno>
date: Sun Jan 12 05:18:37 EST 2003
Fixed linux compilation
--- a/common/mp4v2/Makefile.am
+++ b/common/mp4v2/Makefile.am
@@ -5,109 +5,110 @@
lib_LTLIBRARIES = libmp4v2.la
libmp4v2_la_SOURCES = \
- atom_co64.cpp \
- atom_cprt.cpp \
- atom_ctts.cpp \
- atom_dimm.cpp \
- atom_dinf.cpp \
- atom_dmax.cpp \
- atom_dmed.cpp \
- atom_dref.cpp \
- atom_drep.cpp \
- atom_edts.cpp \
- atom_elst.cpp \
- atom_esds.cpp \
- atom_free.cpp \
- atom_ftyp.cpp \
- atom_hdlr.cpp \
- atom_hinf.cpp \
- atom_hmhd.cpp \
- atom_hnti.cpp \
- atom_iods.cpp \
- atom_maxr.cpp \
- atom_mdat.cpp \
- atom_mdhd.cpp \
- atom_mdia.cpp \
- atom_mfhd.cpp \
- atom_minf.cpp \
- atom_moof.cpp \
- atom_moov.cpp \
- atom_mp4a.cpp \
- atom_mp4s.cpp \
- atom_mp4v.cpp \
- atom_mvex.cpp \
- atom_mvhd.cpp \
- atom_nmhd.cpp \
- atom_nump.cpp \
- atom_payt.cpp \
- atom_pmax.cpp \
- atom_root.cpp \
- atom_rtp.cpp \
- atom_sdp.cpp \
- atoms.h \
- atom_smhd.cpp \
- atom_snro.cpp \
- atom_stbl.cpp \
- atom_stco.cpp \
- atom_stdp.cpp \
- atom_stsc.cpp \
- atom_stsd.cpp \
- atom_stsh.cpp \
- atom_stss.cpp \
- atom_stsz.cpp \
- atom_stts.cpp \
- atom_tfhd.cpp \
- atom_tims.cpp \
- atom_tkhd.cpp \
- atom_tmax.cpp \
- atom_tmin.cpp \
- atom_tpyl.cpp \
- atom_traf.cpp \
- atom_trak.cpp \
- atom_tref.cpp \
- atom_treftype.cpp \
- atom_trex.cpp \
- atom_trpy.cpp \
- atom_trun.cpp \
- atom_tsro.cpp \
- atom_udta.cpp \
- atom_url.cpp \
- atom_urn.cpp \
- atom_vmhd.cpp \
- descriptors.cpp \
- descriptors.h \
- isma.cpp \
- mp4array.h \
- mp4atom.cpp \
- mp4atom.h \
- mp4common.h \
- mp4container.cpp \
- mp4container.h \
- mp4.h \
- mp4.cpp \
- mp4descriptor.cpp \
- mp4descriptor.h \
- mp4file.cpp \
- mp4file.h \
- mp4file_io.cpp \
- mp4info.cpp \
- mp4property.cpp \
- mp4property.h \
- mp4track.cpp \
- mp4track.h \
- mp4util.cpp \
- mp4util.h \
- ocidescriptors.cpp \
- ocidescriptors.h \
- odcommands.cpp \
- odcommands.h \
- qosqualifiers.cpp \
- qosqualifiers.h \
- rtphint.cpp \
- rtphint.h
+ atom_co64.cpp \
+ atom_cprt.cpp \
+ atom_ctts.cpp \
+ atom_dimm.cpp \
+ atom_dinf.cpp \
+ atom_dmax.cpp \
+ atom_dmed.cpp \
+ atom_dref.cpp \
+ atom_drep.cpp \
+ atom_edts.cpp \
+ atom_elst.cpp \
+ atom_esds.cpp \
+ atom_free.cpp \
+ atom_ftyp.cpp \
+ atom_hdlr.cpp \
+ atom_hinf.cpp \
+ atom_hmhd.cpp \
+ atom_hnti.cpp \
+ atom_iods.cpp \
+ atom_maxr.cpp \
+ atom_mdat.cpp \
+ atom_mdhd.cpp \
+ atom_mdia.cpp \
+ atom_mfhd.cpp \
+ atom_minf.cpp \
+ atom_moof.cpp \
+ atom_moov.cpp \
+ atom_mp4a.cpp \
+ atom_mp4s.cpp \
+ atom_mp4v.cpp \
+ atom_mvex.cpp \
+ atom_mvhd.cpp \
+ atom_nmhd.cpp \
+ atom_nump.cpp \
+ atom_payt.cpp \
+ atom_pmax.cpp \
+ atom_root.cpp \
+ atom_rtp.cpp \
+ atom_sdp.cpp \
+ atoms.h \
+ atom_smhd.cpp \
+ atom_snro.cpp \
+ atom_stbl.cpp \
+ atom_stco.cpp \
+ atom_stdp.cpp \
+ atom_stsc.cpp \
+ atom_stsd.cpp \
+ atom_stsh.cpp \
+ atom_stss.cpp \
+ atom_stsz.cpp \
+ atom_stts.cpp \
+ atom_tag4.cpp \
+ atom_tfhd.cpp \
+ atom_tims.cpp \
+ atom_tkhd.cpp \
+ atom_tmax.cpp \
+ atom_tmin.cpp \
+ atom_tpyl.cpp \
+ atom_traf.cpp \
+ atom_trak.cpp \
+ atom_tref.cpp \
+ atom_treftype.cpp \
+ atom_trex.cpp \
+ atom_trpy.cpp \
+ atom_trun.cpp \
+ atom_tsro.cpp \
+ atom_udta.cpp \
+ atom_url.cpp \
+ atom_urn.cpp \
+ atom_vmhd.cpp \
+ descriptors.cpp \
+ descriptors.h \
+ isma.cpp \
+ mp4array.h \
+ mp4atom.cpp \
+ mp4atom.h \
+ mp4common.h \
+ mp4container.cpp \
+ mp4container.h \
+ mp4.h \
+ mp4.cpp \
+ mp4descriptor.cpp \
+ mp4descriptor.h \
+ mp4file.cpp \
+ mp4file.h \
+ mp4file_io.cpp \
+ mp4info.cpp \
+ mp4property.cpp \
+ mp4property.h \
+ mp4track.cpp \
+ mp4track.h \
+ mp4util.cpp \
+ mp4util.h \
+ ocidescriptors.cpp \
+ ocidescriptors.h \
+ odcommands.cpp \
+ odcommands.h \
+ qosqualifiers.cpp \
+ qosqualifiers.h \
+ rtphint.cpp \
+ rtphint.h
EXTRA_DIST = API_CHANGES \
- INTERNALS \
- libmp4v260.dsp \
- libmp4v2_st60.dsp \
- TODO
+ INTERNALS \
+ libmp4v260.dsp \
+ libmp4v2_st60.dsp \
+ TODO
--- a/common/mp4v2/libmp4v2_cb.vcproj
+++ b/common/mp4v2/libmp4v2_cb.vcproj
@@ -34,7 +34,7 @@
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"
- AdditionalOptions="<?ICLPrjArgs?> /Qvc7 /Qlocation,link,"E:\Program Files\Microsoft Visual Studio .NET\Vc7\Bin" /c /I ".\\" /nologo /W3 /O2 /Ob1 /Oy /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /GF /FD /EHsc /MT /GS /Gy /YX"StdAfx.h" /Fp".\CB_Release/libmp4v2_cb.pch" /Fo".\CB_Release/" /Fd".\CB_Release/" /Gd <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseNonIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>">
+ AdditionalOptions="">
<IntelOptions
Optimization="2"
InlineFuncExpansion="1"
@@ -52,7 +52,7 @@
Name="VCLibrarianTool"
OutputFile=".\CB_Release\libmp4v2_cb.lib"
SuppressStartupBanner="TRUE"
- AdditionalOptions="<?ICLPrjArgs?> /OUT:".\CB_Release\libmp4v2_cb.lib" /NOLOGO <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseNonIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>">
+ AdditionalOptions="">
<IntelOptions
AllOptions="/OUT:".\CB_Release\libmp4v2_cb.lib" /NOLOGO"
MSOriginalAdditionalOptions=""/>
@@ -72,7 +72,7 @@
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<IntelOptions
- CompilerName="1"/>
+ CompilerName="0"/>
</Configuration>
<Configuration
Name="Debug|Win32"
@@ -97,13 +97,13 @@
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"
- AdditionalOptions="<?ICLPrjArgs?> /Qvc7 /Qlocation,link,"E:\Program Files\Microsoft Visual Studio .NET\Vc7\Bin" /c /I ".\\" /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\CB_Debug/libmp4v2_cb.pch" /Fo".\CB_Debug/" /Fd".\CB_Debug/" /Gd <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>">
+ AdditionalOptions="">
<IntelOptions
Optimization="0"
MinimalRebuild="1"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
- AllOptions="/c /I ".\\" /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\CB_Debug/libmp4v2_cb.pch" /Fo".\CB_Debug/" /Fd".\CB_Debug/" /Gd"
+ AllOptions="/c /I ".\\" /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\CB_Debug/libmp4v2_cb.pch" /Fo".\CB_Debug/" /Fd".\CB_Debug/" /Gd <?ICLPrjArgs?> /Qvc7 /Qlocation,link,"E:\Program Files\Microsoft Visual Studio .NET\Vc7\Bin" /c /I ".\\" /ZI /nologo /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_FILE_CALLBACKS" /Gm /EHsc /RTC1 /MDd /YX"StdAfx.h" /Fp".\CB_Debug/libmp4v2_cb.pch" /Fo".\CB_Debug/" /Fd".\CB_Debug/" /Gd <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>"
MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
@@ -112,9 +112,9 @@
Name="VCLibrarianTool"
OutputFile=".\CB_Debug\libmp4v2_cb.lib"
SuppressStartupBanner="TRUE"
- AdditionalOptions="<?ICLPrjArgs?> /OUT:".\CB_Debug\libmp4v2_cb.lib" /NOLOGO <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>">
+ AdditionalOptions="">
<IntelOptions
- AllOptions="/OUT:".\CB_Debug\libmp4v2_cb.lib" /NOLOGO"
+ AllOptions="/OUT:".\CB_Debug\libmp4v2_cb.lib" /NOLOGO <?ICLPrjArgs?> /OUT:".\CB_Debug\libmp4v2_cb.lib" /NOLOGO <?/ICLPrjArgs?> <?IVCSpawnPrjArgs?> #$UseIntelTool #$BinPath:"E:\Program Files\Intel\Compiler70\IA32\Bin;E:\Program Files\Common Files\Intel\Shared Files\IA32\Bin;E:\Program Files\Microsoft Visual Studio .NET\Common7\IDE" #$LibPath:"E:\Program Files\Intel\Compiler70\IA32\Lib;E:\Program Files\Common Files\Intel\Shared Files\IA32\Lib" #$IncPath:"E:\Program Files\Intel\Compiler70\IA32\Include" <?/IVCSpawnPrjArgs?>"
MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
--- a/common/mp4v2/mp4.cpp
+++ b/common/mp4v2/mp4.cpp
@@ -51,7 +51,7 @@
}
#ifdef USE_FILE_CALLBACKS
-extern "C" MP4FileHandle MP4ReadCb(const char* fileName, u_int32_t verbosity,
+extern "C" MP4FileHandle MP4ReadCb(u_int32_t verbosity,
MP4OpenCallback MP4fopen,
MP4CloseCallback MP4fclose,
MP4ReadCallback MP4fread,
@@ -76,7 +76,7 @@
pFile->m_MP4fgetpos = MP4fgetpos;
pFile->m_MP4filesize = MP4filesize;
- pFile->Read(fileName);
+ pFile->Read("");
return (MP4FileHandle)pFile;
}
catch (MP4Error* e) {
@@ -87,8 +87,8 @@
}
}
-extern "C" MP4FileHandle MP4ModifyCb(const char* fileName,
- u_int32_t verbosity, bool useExtensibleFormat,
+extern "C" MP4FileHandle MP4ModifyCb(int32_t verbosity,
+ bool useExtensibleFormat,
MP4OpenCallback MP4fopen, MP4CloseCallback MP4fclose,
MP4ReadCallback MP4fread, MP4WriteCallback MP4fwrite,
MP4SetposCallback MP4fsetpos, MP4GetposCallback MP4fgetpos,
@@ -109,7 +109,7 @@
pFile->m_MP4filesize = MP4filesize;
// LATER useExtensibleFormat, moov first, then mvex's
- pFile->Modify(fileName);
+ pFile->Modify("");
return (MP4FileHandle)pFile;
}
catch (MP4Error* e) {
@@ -2518,20 +2518,6 @@
}
/* tagging functions */
-
-extern "C" void MP4TagCreate(MP4FileHandle hFile, MP4TrackId trackId)
-{
- if (MP4_IS_VALID_FILE_HANDLE(hFile)) {
- try {
- ((MP4File*)hFile)->TagCreate(trackId);
- return;
- }
- catch (MP4Error* e) {
- PRINT_ERROR(e);
- delete e;
- }
- }
-}
extern "C" bool MP4TagDelete(MP4FileHandle hFile, MP4TrackId trackId)
{
--- a/common/mp4v2/mp4.h
+++ b/common/mp4v2/mp4.h
@@ -236,7 +236,7 @@
const char* fileName,
u_int32_t verbosity DEFAULT(0));
-MP4FileHandle MP4ReadCb(const char* fileName, u_int32_t verbosity,
+MP4FileHandle MP4ReadCb(u_int32_t verbosity,
MP4OpenCallback MP4fopen,
MP4CloseCallback MP4fclose,
MP4ReadCallback MP4fread,
@@ -246,8 +246,8 @@
MP4FilesizeCallback MP4filesize,
void *userData);
-MP4FileHandle MP4ModifyCb(const char* fileName,
- u_int32_t verbosity, bool useExtensibleFormat,
+MP4FileHandle MP4ModifyCb(int32_t verbosity,
+ bool useExtensibleFormat,
MP4OpenCallback MP4fopen, MP4CloseCallback MP4fclose,
MP4ReadCallback MP4fread, MP4WriteCallback MP4fwrite,
MP4SetposCallback MP4fsetpos, MP4GetposCallback MP4fgetpos,
@@ -907,7 +907,6 @@
const u_int8_t* pData,
u_int32_t dataSize);
-void MP4TagCreate(MP4FileHandle hFile, MP4TrackId trackId);
bool MP4TagDelete(MP4FileHandle hFile, MP4TrackId trackId);
bool MP4TagAddEntry(MP4FileHandle hFile, MP4TrackId trackId,
const char *name, const char *value);
--- a/common/mp4v2/mp4file.cpp
+++ b/common/mp4v2/mp4file.cpp
@@ -2336,6 +2336,7 @@
pUdtaAtom = m_pRootAtom->FindAtom(MakeTrackName(trackId, "udta"));
pTagAtom = m_pRootAtom->FindAtom(MakeTrackName(trackId, "udta.TAG4"));
}
+ /* there is no tag */
if (!pUdtaAtom || !pTagAtom)
return false;
@@ -2359,7 +2360,13 @@
else
pTagAtom = m_pRootAtom->FindAtom(MakeTrackName(trackId, "udta.TAG4"));
if (!pTagAtom)
- return false;
+ {
+ TagCreate(trackId);
+ if (trackId == NULL)
+ pTagAtom = m_pRootAtom->FindAtom("moov.udta.TAG4");
+ else
+ pTagAtom = m_pRootAtom->FindAtom(MakeTrackName(trackId, "udta.TAG4"));
+ }
pTagAtom->FindProperty("TAG4.entryCount",
(MP4Property**)&pCountProperty);
@@ -2382,7 +2389,7 @@
return true;
}
-#if 0
+#if 0 // not working
void MP4File::TagDeleteEntry(MP4TrackId trackId, u_int32_t index)
{
MP4TableProperty *pEntryProperty = NULL;
--- a/configure.in
+++ b/configure.in
@@ -33,7 +33,7 @@
[$1;],
libfaad_ok=yes, libfaad_ok=no)
if test $libfaad_ok = yes; then
- AC_DEFINE($3)
+ AC_DEFINE($3, 1, [Define if needed])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])