[xiph-commits] r8806 - in trunk/oggdsf/src/lib:
core/directshow/dsfAnxMux helper/libAnxHelper
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Sat Jan 29 10:26:57 PST 2005
Author: illiminable
Date: 2005-01-29 10:26:48 -0800 (Sat, 29 Jan 2005)
New Revision: 8806
Modified:
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h
trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.cpp
trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.h
Log:
* More annodex 3 code
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-29 09:57:37 UTC (rev 8805)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-29 18:26:48 UTC (rev 8806)
@@ -38,11 +38,12 @@
: OggMuxInputPin(inOwningFilter, inFilterLock, inHR, inMuxStream)
, mAnxDataPacket(NULL)
, mFishBonePacket(NULL)
- , mExtraPacket(NULL)
+ //, mExtraPacket(NULL)
, mAnxVersionMajor(inAnxVersionMajor)
, mAnxVersionMinor(inAnxVersionMinor)
{
debugLog.open("g:\\logs\\anxmuxinputpin.log", ios_base::out);
+ mExtraPackets.clear();
}
AnxMuxInputPin::~AnxMuxInputPin(void)
@@ -67,8 +68,10 @@
return S_OK;
} else if ((mAnxVersionMajor == 3) && (mAnxVersionMinor == 0) && (mFishBonePacket != NULL)) {
//Force in a CMML Packet BOS
- if (mExtraPacket != NULL) {
- mPaginator.acceptStampedOggPacket(mExtraPacket);
+ if (mExtraPackets.size() != 0) {
+ for (size_t i = 0; i < mExtraPackets.size(); i++) {
+ mPaginator.acceptStampedOggPacket(mExtraPackets[i]);
+ }
}
return S_OK;
} else {
@@ -171,7 +174,8 @@
//ANX3::: 1 for anx 2, 2 for anx 3.
if ((mAnxVersionMajor == 3) && (mAnxVersionMinor == 0)) {
- locNumHeaders = 2;
+ //ZZZZZ:::: sould be 3
+ locNumHeaders = 3;
} else {
locNumHeaders = 1;
}
@@ -199,9 +203,11 @@
} else if ((mAnxVersionMajor == 3) && (mAnxVersionMinor == 0)) {
mFishBonePacket = FishSkeleton::makeFishBone_3_0(locGranRateNum, locGranRateDenom, 0, locNumHeaders, mPaginator.parameters()->mSerialNo, locGranuleShift, locPreroll, AnxPacketMaker::makeMessageHeaders(locCodecID));
if (locCodecID == StreamHeaders::CMML) {
- mExtraPacket = FishSkeleton::makeCMMLBOS();
+ mExtraPackets.push_back(FishSkeleton::makeCMMLBOS());
+ mExtraPackets.push_back(FishSkeleton::makeCMML_XML_Thing());
} else {
- mExtraPacket = NULL;
+ mExtraPackets.clear();
+ //mExtraPacket = NULL;
}
}
return S_OK;
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h 2005-01-29 09:57:37 UTC (rev 8805)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.h 2005-01-29 18:26:48 UTC (rev 8806)
@@ -60,7 +60,7 @@
StampedOggPacket* mAnxDataPacket;
StampedOggPacket* mFishBonePacket;
- StampedOggPacket* mExtraPacket;
+ vector<StampedOggPacket*> mExtraPackets;
unsigned long mAnxVersionMajor;
unsigned long mAnxVersionMinor;
Modified: trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.cpp 2005-01-29 09:57:37 UTC (rev 8805)
+++ trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.cpp 2005-01-29 18:26:48 UTC (rev 8806)
@@ -177,6 +177,16 @@
StampedOggPacket* locPacket = new StampedOggPacket(locPackBuff, CMML_BOS_SIZE, false, false, 0, 0, StampedOggPacket::OGG_BOTH);
return locPacket;
}
+
+StampedOggPacket* FishSkeleton::makeCMML_XML_Thing() {
+ string locXMLString = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<!DOCTYPE cmml SYSTEM \"cmml.dtd\">\n<?cmml xmlns=\"http://www.annodex.net/cmml\"?>";
+
+
+ unsigned char* locPackBuff = new unsigned char[locXMLString.size()];
+ memcpy((void*)locPackBuff, (const void*)locXMLString.c_str(), locXMLString.size());
+ StampedOggPacket* locPacket = new StampedOggPacket(locPackBuff, locXMLString.size(), false, false, 0, 0, StampedOggPacket::OGG_BOTH);
+ return locPacket;
+}
OggPage* FishSkeleton::makeFishHeadBOS_3_0 ( unsigned long inSerialNo
, unsigned short inVersionMajor
, unsigned short inVersionMinor
Modified: trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.h 2005-01-29 09:57:37 UTC (rev 8805)
+++ trunk/oggdsf/src/lib/helper/libAnxHelper/FishSkeleton.h 2005-01-29 18:26:48 UTC (rev 8806)
@@ -76,6 +76,7 @@
static OggPage* makeFishEOS (unsigned long inSerialNo);
static OggPage* makeFishBone_3_0_Page (StampedOggPacket* inFishBonePacket, unsigned long inFishStreamSerial);
static StampedOggPacket* makeCMMLBOS();
+ static StampedOggPacket* makeCMML_XML_Thing();
static bool setChecksum(OggPage* inOggPage);
};
More information about the commits
mailing list