Author: robux4
Date: 2005-03-03 16:58:15 +0300 (Thu, 03 Mar 2005)
New Revision: 1080
Added:
trunk/mkxuncat/
trunk/mkxuncat/mkxuncat.cpp
Log:
mkxuncat: new tool to split concatenated files (not functional yet, no makefile yet)
Added: trunk/mkxuncat/mkxuncat.cpp
===================================================================
--- trunk/mkxuncat/mkxuncat.cpp 2005-03-03 13:18:14 UTC (rev 1079)
+++ trunk/mkxuncat/mkxuncat.cpp 2005-03-03 13:58:15 UTC (rev 1080)
@@ -0,0 +1,83 @@
+/****************************************************************************
+** mkxsplit : split Matroska files in pieces, see http://www.matroska.org/
+**
+** Copyright (C) 2005 Steve Lhomme. All rights reserved.
+**
+** This file is part of mkxsplit.
+**
+** This library is free software; you can redistribute it and/or
+** modify it under the terms of the GNU Lesser General Public
+** License as published by the Free Software Foundation; either
+** version 2.1 of the License, or (at your option) any later version.
+**
+** This library is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** Lesser General Public License for more details.
+**
+** You should have received a copy of the GNU Lesser General Public
+** License along with this library; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.**
+** Contact [email protected] if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+/*!
+ \file
+ \version \$Id: KaxSegment.cpp 640 2004-07-09 21:05:36Z mosu $
+ \author Steve Lhomme <robux4 @ matroska.org>
+*/
+
+#include <cstdio>
+#include <string>
+
+using namespace std;
+
+#include <ebml/EbmlStream.h>
+#include <ebml/EbmlHead.h>
+
+using namespace LIBEBML_NAMESPACE;
+
+#if defined(_WIN32)
+#include <WinIOCallback.h>
+typedef WinIOCallback IOclass;
+#else
+#include <ebml/StdIOCallback.h>
+typedef StdIOCallback IOclass;
+#endif
+
+int main(int argc, const char *argv[])
+{
+ if ( argc != 2 )
+ {
+ fprintf( stderr, "Usage: mkxuncat <file_to_uncat>\n\tUndo concatenation on the given file\n" );
+ return -1;
+ }
+
+ // get the file basename/extension
+ string basename = argv[1];
+ string extension;
+ if (basename.rfind( '.' ) != string::npos )
+ {
+ extension = basename.substr( basename.rfind( '.' )+1 );
+ basename = basename.substr( 0, basename.rfind( '.' ) );
+ }
+
+ IOclass p_DataFile( argv[1], MODE_READ );
+
+ EbmlStream aStream( p_DataFile );
+
+ EbmlElement * ElementLevel0;
+
+ // find the EBML head in the file
+ ElementLevel0 = aStream.FindNextID( EbmlHead::ClassInfos, 0xFFFFFFFFL );
+
+ while ( ElementLevel0 != NULL )
+ {
+ }
+
+ return 0;
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.