[xiph-commits] r8637 - in trunk/oggdsf: build/oggcodecs
sln/oggdsf_all src/lib/core/ogg/libOOOgg
src/lib/core/ogg/libOOOggSeek src/tools/AnxCutter
src/tools/OOOggPacketise
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Thu Jan 6 00:18:16 PST 2005
Author: illiminable
Date: 2005-01-06 00:18:15 -0800 (Thu, 06 Jan 2005)
New Revision: 8637
Modified:
trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp
trunk/oggdsf/src/tools/AnxCutter/AnxCutter.cpp
trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.cpp
trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.h
trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketise.cpp
Log:
* Tidy some stuff up
* Add the packetiser tool back into the main solution.
Modified: trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
===================================================================
--- trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj 2005-01-06 08:18:15 UTC (rev 8637)
@@ -28,6 +28,12 @@
"Entry"
{
"MsmKey" = "8:_08F41A479D744DC3928D5928DFE72E6F"
+ "OwnerKey" = "8:_E6B7C1CA6BF74C998B68B4C3379FB830"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_08F41A479D744DC3928D5928DFE72E6F"
"OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
"MsmSig" = "8:_UNDEFINED"
}
@@ -513,6 +519,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_E6B7C1CA6BF74C998B68B4C3379FB830"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_E95ADEAD396A4EDC9DA91E553455B90B"
"OwnerKey" = "8:_02E7D9728C8944F1BD021329177F5140"
"MsmSig" = "8:_UNDEFINED"
@@ -520,6 +532,12 @@
"Entry"
{
"MsmKey" = "8:_E95ADEAD396A4EDC9DA91E553455B90B"
+ "OwnerKey" = "8:_E6B7C1CA6BF74C998B68B4C3379FB830"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_E95ADEAD396A4EDC9DA91E553455B90B"
"OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
"MsmSig" = "8:_UNDEFINED"
}
@@ -1115,7 +1133,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oggcodecs"
"ProductCode" = "8:{D65F0073-A820-4085-B997-A061171595A7}"
- "PackageCode" = "8:{FF11F55E-2DA3-46C8-92E9-2FA3DDA90C7D}"
+ "PackageCode" = "8:{89D97255-B269-4080-A244-C8926444E905}"
"UpgradeCode" = "8:{1A644FEB-7597-4FAB-AADE-C2C7C64C5984}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
@@ -4305,6 +4323,34 @@
{
}
}
+ "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_E6B7C1CA6BF74C998B68B4C3379FB830"
+ {
+ "SourcePath" = "8:..\\..\\src\\tools\\OOOggPacketise\\Release\\OOOggPacketise.exe"
+ "TargetName" = "8:"
+ "Tag" = "8:"
+ "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
+ "IsolateTo" = "8:"
+ "ProjectOutputGroupRegister" = "3:1"
+ "OutputConfiguration" = "8:"
+ "OutputGroupCanonicalName" = "8:Built"
+ "OutputProjectGuid" = "8:{463B5ED7-C6A3-4343-BA67-B324580BEC70}"
+ "ShowKeyOutput" = "11:TRUE"
+ "ExcludeFilters"
+ {
+ }
+ }
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_EB09F87C612C40BCA34AC87060CFEFF1"
{
"SourcePath" = "8:..\\..\\src\\tools\\OOOggCommentDump\\Release\\OOOggCommentDump.exe"
Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2005-01-06 08:18:15 UTC (rev 8637)
@@ -1145,6 +1145,11 @@
{AD38DCC6-B431-4B32-8569-74F3376EF2DA} = {AD38DCC6-B431-4B32-8569-74F3376EF2DA}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OOOggPacketise", "..\..\src\tools\OOOggPacketise\OOOggPacketise.vcproj", "{463B5ED7-C6A3-4343-BA67-B324580BEC70}"
+ ProjectSection(ProjectDependencies) = postProject
+ {223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -2554,6 +2559,26 @@
{150940C1-A4EF-474D-8703-DF7100ABDA52}.Release_SSE.Build.0 = Release|Win32
{150940C1-A4EF-474D-8703-DF7100ABDA52}.Release_SSE2.ActiveCfg = Release|Win32
{150940C1-A4EF-474D-8703-DF7100ABDA52}.Release_SSE2.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug.ActiveCfg = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug.Build.0 = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug Unicode.ActiveCfg = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug Unicode.Build.0 = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug__cdecl.ActiveCfg = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Debug__cdecl.Build.0 = Debug|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.MakeFile.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.MakeFile.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release Unicode.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release Unicode.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release__cdecl.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release__cdecl.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_NoDotNET.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_SSE.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_SSE.Build.0 = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_SSE2.ActiveCfg = Release|Win32
+ {463B5ED7-C6A3-4343-BA67-B324580BEC70}.Release_SSE2.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionItems) = postSolution
EndGlobalSection
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.h 2005-01-06 08:18:15 UTC (rev 8637)
@@ -99,8 +99,10 @@
eFeedResult feed(const unsigned char* inData, unsigned long inNumBytes);
void clearData();
- //Buffer state
+ /// Returns the number of bytes available for processing in the buffer.
unsigned long numBytesAvail();
+
+ /// Returns the current demux state.
eState state();
protected:
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp 2005-01-06 08:18:15 UTC (rev 8637)
@@ -57,11 +57,7 @@
}
-//LOOG_INT64 OggSeekTable::getRealStartPos() {
-//
-// return mRealStartPos;
-//
-//}
+
/** Returns a tSeekPair whose first element is the
actual closest possible time that can be seeked to (which will always be either before or at
the requested seek position). The second element is the number of bytes into the stream where
Modified: trunk/oggdsf/src/tools/AnxCutter/AnxCutter.cpp
===================================================================
--- trunk/oggdsf/src/tools/AnxCutter/AnxCutter.cpp 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/tools/AnxCutter/AnxCutter.cpp 2005-01-06 08:18:15 UTC (rev 8637)
@@ -217,7 +217,7 @@
// Seek to the user's requested start time
LOOG_UINT64 locStartTime = StringHelper::stringToNum(argv[3]);
OggSeekTable::tSeekPair locSeekResult = locSeekTable->getStartPos(locStartTime);
- cout << "Seek result for " << locStartTime << " nanoseconds: " << locSeekResult.first << " at " << locSeekResult.second << " bytes" << endl;
+ cout << "Seek result for " << locStartTime << " * 100 nanoseconds: " << locSeekResult.first << " at " << locSeekResult.second << " bytes" << endl;
// Stream-copy everything from the requested timepoint onward to the output file
inputFile.open(argv[1], ios_base::in | ios_base::binary);
Modified: trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.cpp 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.cpp 2005-01-06 08:18:15 UTC (rev 8637)
@@ -10,7 +10,7 @@
}
bool OOOggPacketDumper::acceptStampedOggPacket(StampedOggPacket* inPacket) {
- cout << "------ Packet : Gran Pos = "<<inPacket->endTime()<<", Size = "<< inPacket->packetSize() << " bytes -------";
+ cout << "------ Packet : Gran Pos = "<<inPacket->startTime()<<" - "<<inPacket->endTime()<<", Size = "<< inPacket->packetSize() << " bytes -------";
if (inPacket->isContinuation()) {
cout<<" ** CONT **"; ///These should be here if you use the packetiser
Modified: trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.h
===================================================================
--- trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.h 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketDumper.h 2005-01-06 08:18:15 UTC (rev 8637)
@@ -1,6 +1,6 @@
#pragma once
-#include "libOOOgg.h"
-#include "IStampedOggPacketSink.h"
+#include <libOOOgg/libOOOgg.h>
+#include <libOOOgg/IStampedOggPacketSink.h>
class OOOggPacketDumper
: public IStampedOggPacketSink
{
Modified: trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketise.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketise.cpp 2005-01-06 01:52:49 UTC (rev 8636)
+++ trunk/oggdsf/src/tools/OOOggPacketise/OOOggPacketise.cpp 2005-01-06 08:18:15 UTC (rev 8637)
@@ -33,55 +33,85 @@
//
#include "stdafx.h"
-#include <libOOOgg.h>
-#include <dllstuff.h>
-#include "OggPacketiser.h"
+#include <libOOOgg/libOOOgg.h>
+#include <libOOOgg/dllstuff.h>
+#include <libOOOgg/OggPacketiser.h>
#include "OOOggPacketDumper.h"
#include <iostream>
-
+#include <map>
#include <fstream>
//This will be called by the callback
-unsigned long streamNo;
+//OggPacketiser* testPacketiser = new OggPacketiser(&testPacketDumper);
-bool pageCB(OggPage* inOggPage) {
- //if (inOggPage->header()->isBOS()) {
- // streamNo++;
- //}
+typedef map<unsigned long, OggPacketiser*> tStreamMap;
-
+tStreamMap streamMap;
+OOOggPacketDumper testPacketDumper;
-
+
+bool pageCB(OggPage* inOggPage, void *inUserData /* ignored */) {
+
+ tStreamMap::iterator locIt = streamMap.find(inOggPage->header()->StreamSerialNo());
+
+ if (locIt == streamMap.end()) {
+ //Not found
+ OggPacketiser* locPacketiser = new OggPacketiser(&testPacketDumper);
+
+ streamMap.insert(tStreamMap::value_type(inOggPage->header()->StreamSerialNo(), locPacketiser));
+ locIt = streamMap.find(inOggPage->header()->StreamSerialNo());
+ }
+
+ if (locIt == streamMap.end()) {
+ cout<<"FAILED !!!!!!!!"<<endl;
+ }
+
+ //Assume we have a valid packetiser...
+
+ cout<<"======================================="<<endl;
+ cout << "Stream : "<<inOggPage->header()->StreamSerialNo()
+ << " Gran : "<<inOggPage->header()->GranulePos()<<endl<<endl;
+
+ (*locIt).second->acceptOggPage(inOggPage);
+
return true;
+
+
+
+
+
}
-
+#ifdef WIN32
int __cdecl _tmain(int argc, _TCHAR* argv[])
+#else
+int main (int argc, char * argv[])
+#endif
{
int x;
cin>>x;
- //This program just dumps the packets out of a file in ogg format.
+ //This program just dumps the packets of the first stream out of a file in ogg format.
// Currently does not error checking. Check your command line carefully !
// USAGE :: OOOggPacketise <OggFile>
//
if (argc < 2) {
cout<<"Usage : OOOggPacketise <filename>"<<endl;
} else {
- streamNo = 0;
+
OggDataBuffer testOggBuff;
- OOOggPacketDumper testPacketDumper;
- OggPacketiser* testPacketiser = new OggPacketiser(&testPacketDumper);
+
+
- testOggBuff.registerVirtualCallback(testPacketiser);
+ //testOggBuff.registerVirtualCallback(testPacketiser);
const BUFF_SIZE = 8092;
- //testOggBuff.registerStaticCallback(&pageCB);
+ testOggBuff.registerStaticCallback(&pageCB, NULL);
fstream testFile;
testFile.open(argv[1], ios_base::in | ios_base::binary);
More information about the commits
mailing list