summaryrefslogtreecommitdiffstats
path: root/libk9copy/k9cell.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-17 00:32:19 +0000
commit0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch)
tree8578dcddfce4191f3f7a142a37769df7add48475 /libk9copy/k9cell.h
downloadk9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz
k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libk9copy/k9cell.h')
-rwxr-xr-xlibk9copy/k9cell.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/libk9copy/k9cell.h b/libk9copy/k9cell.h
new file mode 100755
index 0000000..c253415
--- /dev/null
+++ b/libk9copy/k9cell.h
@@ -0,0 +1,129 @@
+/***************************************************************************
+* Copyright (C) 2005 by Jean-Michel Petit *
+* jm_petit@laposte.net *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+* This program 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 General Public License for more details. *
+* *
+* You should have received a copy of the GNU General Public License *
+* along with this program; if not, write to the *
+* Free Software Foundation, Inc., *
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+***************************************************************************/
+#ifndef K9CELL_H
+#define K9CELL_H
+
+#include "k9common.h"
+#include "k9dvdtitle.h"
+
+
+enum streamType_t {stAudio,stVideo,stSubpicture,stOther};
+/**
+@author Jean-Michel Petit
+*/
+class k9CellList;
+class k9Cell;
+class k9DVDTitleset;
+class k9Vobu : public QObject {
+ Q_OBJECT
+public:
+ k9Vobu(k9Cell * parent,uint32_t _oldSector);
+ ~k9Vobu();
+ uint32_t newSector;
+ uint32_t oldSector;
+ uint32_t size;
+ int firstAudio[8];
+ int firstSubp[32];
+ int firstVideo;
+ bool empty;
+ k9Cell *parent;
+ long vobPos;
+ int vobNum;
+ uchar frameType;
+ uint32_t firstRef,secondRef,thirdRef;
+ bool firstRefOk,secondRefOk,thirdRefOk;
+};
+
+class k9VobuList : public QPtrList <k9Vobu> {
+public:
+ k9Vobu *findVobu(uint32_t sector);
+private:
+ k9Vobu * findVobu(uint32_t sector, uint32_t start, uint32_t end);
+protected:
+ int compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 ) ;
+};
+
+class k9Cell : public QObject {
+ Q_OBJECT
+public:
+ k9Cell(QObject *parent = 0, const char *name = 0);
+ ~k9Cell();
+ k9Vobu * addVobu(uint32_t _sector);
+ void addNewVobus(char *_buffer,uint32_t _len,uint32_t _position,int _vobNum,long _vobPos);
+ static int isNavPack (uchar *ptr);
+ static streamType_t identifyStream( uchar *buffer,int * packetType );
+ static int getStreamID(int type);
+ k9Vobu * findVobu(uint32_t _oldSector);
+ uint32_t getnewSize();
+ void addTitle(k9DVDTitle *_title);
+ k9DVDTitleset * getTitleset();
+ bool getforceFactor();
+ float getFactor();
+public:
+ k9VobuList vobus;
+ int vts;
+ int pgc;
+ int vob;
+ uint32_t startSector;
+ uint32_t lastSector;
+ //TO REMOVE uint32_t ;
+ //TO REMOVE uint32_t ;
+ //TO REMOVE uint32_t newSize;
+ uchar angleBlock;
+ //TO REMOVE int nbVideoNew,nbVideoOld;
+ int id;
+ bool selected;
+ bool copied;
+ QValueList<int> audio;
+ QValueList<int> subpicture;
+ k9CellList *cellList;
+private:
+ int numVobu;
+ void addRefStream(k9Vobu *_vobu,uchar *_buffer,uint32_t _position);
+ QPtrList <k9DVDTitle> m_titles;
+};
+
+
+
+class k9CellList : public QPtrList <k9Cell> {
+private:
+ uint32_t m_position;
+ k9Cell * findCell(uint32_t sector);
+ k9Cell * findCell(uint32_t sector, uint32_t start, uint32_t end);
+
+public:
+ k9CellList() {
+ m_position=0;
+ };
+ k9Cell *addCell(int _vts, int _pgc,int _vob);
+ k9Vobu *findVobu(uint32_t sector);
+
+ void setPosition(const uint32_t& _value) {
+ m_position = _value;
+ }
+
+ uint32_t getPosition() const {
+ return m_position;
+ }
+
+};
+
+
+#endif