[xiph-commits] r8606 - trunk/oggdsf/src/lib/helper/libOOOggChef
ozone at motherfish-iii.xiph.org
ozone at motherfish-iii.xiph.org
Mon Jan 3 23:53:18 PST 2005
Author: ozone
Date: 2005-01-03 23:53:18 -0800 (Mon, 03 Jan 2005)
New Revision: 8606
Modified:
trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h
trunk/oggdsf/src/lib/helper/libOOOggChef/IRecomposer.h
trunk/oggdsf/src/lib/helper/libOOOggChef/stdafx.h
Log:
oggdsf:
* Portability fixes: avoid consts as template parameters where possible
Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp 2005-01-04 07:52:16 UTC (rev 8605)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp 2005-01-04 07:53:18 UTC (rev 8606)
@@ -70,7 +70,7 @@
is a vector of strings, which will be matched against the MIME type in the
AnxData header of the logical bitstream. */
void AnnodexRecomposer::recomposeStreamFrom(double inStartingTimeOffset,
- const vector<const string>* inWantedMIMETypes)
+ const vector<string>* inWantedMIMETypes)
{
mWantedMIMETypes = inWantedMIMETypes;
@@ -212,12 +212,15 @@
}
+#ifdef WIN32
+# define strncasecmp _strnicmp
+#endif /* will be undef'ed below */
string mimeType(OggPacket* inPacket)
{
const unsigned short CONTENT_TYPE_OFFSET = 28;
- if (_strnicmp((char *) inPacket->packetData() + CONTENT_TYPE_OFFSET,
- "Content-Type: ", 14) == 0)
+ if (strncasecmp((char *) inPacket->packetData() + CONTENT_TYPE_OFFSET,
+ "Content-Type: ", 14) == 0)
{
const unsigned short MIME_TYPE_OFFSET = 28 + 14;
const unsigned short MAX_MIME_TYPE_LENGTH = 256;
@@ -228,8 +231,11 @@
return NULL;
}
}
+#ifdef WIN32
+# undef strcasecmp
+#endif
-bool wantOnlyPacketBody(const vector<const string>* inWantedMIMETypes)
+bool wantOnlyPacketBody(const vector<string>* inWantedMIMETypes)
{
// TODO: This should check for packet bodies generally, not text/x-cmml
Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h 2005-01-04 07:52:16 UTC (rev 8605)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h 2005-01-04 07:53:18 UTC (rev 8606)
@@ -55,7 +55,7 @@
~AnnodexRecomposer(void);
/// Recompose a stream from a particular time offset and/or only selecting certain logical bitstreams (specified as MIME types)
- void recomposeStreamFrom(double inStartingTimeOffset, const vector<const string>* inWantedMIMETypes);
+ void recomposeStreamFrom(double inStartingTimeOffset, const vector<string>* inWantedMIMETypes);
bool acceptOggPage(OggPage* inOggPage);
AnnodexRecomposer(const AnnodexRecomposer&); // Don't copy me
@@ -93,5 +93,5 @@
eDemuxParserState mDemuxParserState;
vector<tSerial_HeadCountPair> mWantedStreamSerialNumbers;
- const vector<const string>* mWantedMIMETypes;
+ const vector<string>* mWantedMIMETypes;
};
Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/IRecomposer.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/IRecomposer.h 2005-01-04 07:52:16 UTC (rev 8605)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/IRecomposer.h 2005-01-04 07:53:18 UTC (rev 8606)
@@ -47,6 +47,6 @@
IRecomposer(void);
virtual ~IRecomposer(void);
- virtual void recomposeStreamFrom(double inStartingTimeOffset, const vector<const string>* inWantedMIMETypes) = 0;
+ virtual void recomposeStreamFrom(double inStartingTimeOffset, const vector<string>* inWantedMIMETypes) = 0;
};
Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/stdafx.h 2005-01-04 07:52:16 UTC (rev 8605)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/stdafx.h 2005-01-04 07:53:18 UTC (rev 8606)
@@ -8,7 +8,9 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
-#include <windows.h>
+#ifdef WIN32
+# include <windows.h>
+#endif
// TODO: reference additional headers your program requires here
#include <libOOOgg/libOOOgg.h>
More information about the commits
mailing list