You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k9copy/libk9copy/k9dvdtitle.h

264 lines
7.9 KiB

/**************************************************************************
* 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 K9DVDTITLE_H
#define K9DVDTITLE_H
#include "k9common.h"
#include "k9dvd.h"
#include "k9dvdchapter.h"
#include <tqdatetime.h>
#include <tqstringlist.h>
#include <tqptrlist.h>
class k9DVDTitleSet;
class k9DVDVideoStream : public TQObject{
TQ_OBJECT
friend class k9DVDTitle;
private: // Private attributes
public: // Public methods
};
class k9DVDAudioStream : public TQObject{
TQ_OBJECT
friend class k9DVDTitle;
friend class k9DVD;
private: // Private attributes
/** */
TQString langCod;
/** */
TQString language;
/** */
TQString format;
/** */
TQString frequency;
/** */
TQString quantization;
/** */
int channels;
/** */
int appMode;
/** */
TQString content;
/** */
float size_mb;
/** */
bool selected;
int id;
k9DVDTitle *title;
int m_streamId;
public: // Public methods
k9DVDAudioStream();
/** Read property of TQString langCod. */
virtual const TQString& getlangCod();
/** Read property of TQString language. */
virtual const TQString& getlanguage();
/** Read property of TQString format. */
virtual const TQString& getformat();
/** Read property of TQString frequency. */
virtual const TQString& getfrequency();
/** Read property of TQString quantization. */
virtual const TQString& getquantization();
/** Read property of int channels. */
virtual const int& getchannels();
/** Read property of int appMode. */
virtual const int& getappMode();
/** Read property of TQString content. */
virtual const TQString& getcontent();
/** Read property of float size_mb. */
virtual const float& getsize_mb();
/** Write property of bool selected. */
virtual void setselected( const bool& _newVal);
/** Read property of bool selected. */
virtual const bool& getselected();
virtual k9DVDTitle* gettitle();
virtual int getID();
virtual int getStreamId() const {return m_streamId;};
};
class k9DVDSubtitle : public TQObject{
TQ_OBJECT
friend class k9DVDTitle;
friend class k9DVD;
private: // Private attributes
/** */
TQString langCod;
/** */
TQString language;
/** */
int num;
/** */
TQString content;
/** */
float size_mb;
/** */
bool selected;
TQValueList<int> id;
k9DVDTitle *title;
public: // Public methods
k9DVDSubtitle();
/** Read property of TQString langCod. */
virtual const TQString& getlangCod();
/** Read property of TQString language. */
virtual const TQString& getlanguage();
/** Read property of int num. */
virtual const int& getnum();
/** Read property of TQString content. */
virtual const TQString& getcontent();
/** Read property of float size_mb. */
virtual const float& getsize_mb();
/** Write property of bool selected. */
virtual void setselected( const bool& _newVal);
/** Read property of bool selected. */
virtual const bool& getselected();
virtual k9DVDTitle* gettitle();
virtual TQValueList<int>& getID();
};
class k9TitleEncOpt;
class k9DVDTitle : public TQObject{
TQ_OBJECT
friend class k9DVD;
private: // Public attributes
unsigned int ts_nr;
int chapterCount;
int streamCount;
int audioStreamCount;
int subPictureCount;
TQTime length;
k9DVDVideoStream videoStream;
TQObjectList audioStreams;
TQObjectList subtitles;
int VTS;
int TTN;
float FPS;
TQString format;
TQString aspectRatio;
int numTitle;
TQString width;
TQString height;
TQStringList palette;
TQString DF;
float size_mb;
int angleCount;
float videosize_mb;
float vobusize_mb;
TQString name;
k9DVDTitle* nextTitle;
int id;
k9DVDTitleset *m_titleset;
k9DVDAudioStream *m_defAudio;
k9DVDSubtitle *m_defSubtitle;
bool m_defAudioSet;
bool m_defSubtitleSet;
TQPtrList <k9DVDTitle> m_titles;
uint32_t m_sectors;
bool m_forceFactor;
float m_factor;
k9TitleEncOpt *m_encOpt;
public: // Public methods
k9DVDTitle();
virtual k9DVDTitleset *gettitleset() {return m_titleset;};
virtual const int& getchapterCount();
virtual const int& getstreamCount();
virtual const int& getaudioStreamCount();
virtual const int& getsubPictureCount();
virtual const TQTime& getlength();
virtual TQTime gettotallength();
virtual TQTime getSelectedLength();
virtual const int& getVTS();
virtual const int& getTTN();
virtual const float& getFPS();
virtual const TQString& getformat();
virtual const TQString& getaspectRatio();
virtual const TQString& getwidth();
virtual const TQString& getheight();
virtual void getpalette(int i,TQString & c);
virtual const TQString& getDF();
virtual const int& getangleCount();
virtual const int& getnumTitle();
virtual k9DVDAudioStream *getaudioStream(int num);
virtual k9DVDSubtitle *getsubtitle(int num);
virtual const float& getsize_mb();
virtual const float gettotalsize_mb();
virtual const float gettotalvideosize_mb();
virtual const float getChaptersSize_mb(bool _selected);
virtual const uint64_t getChaptersSize(bool _selected);
virtual const float& getvideosize_mb();
virtual bool isSelected();
virtual void setname( const TQString& _newVal);
virtual const TQString& getname();
virtual int getpgc();
virtual void setnextTitle(k9DVDTitle * nTitle);
virtual k9DVDTitle* getnextTitle();
virtual k9DVDChapter *getChapter(int num);
virtual bool getIndexed() {return indexed;};
virtual void setforceSelection(bool _state);
virtual int getId() {return id;};
virtual void setDefAudio(k9DVDAudioStream* _value);
virtual k9DVDAudioStream* getDefAudio() const;
virtual void setDefSubtitle(k9DVDSubtitle* _value);
virtual k9DVDSubtitle* getDefSubtitle() const;
virtual bool getDefAudioSet() const {return m_defAudioSet;};
virtual bool getDefSubtitleSet() const {return m_defSubtitleSet;};
virtual TQPtrList< k9DVDTitle > getTitles() const {return m_titles;};
virtual uint32_t getsectors() { return m_sectors;};
virtual float getfactor() { return m_factor;};
virtual bool getforceFactor() { return m_forceFactor;};
virtual void selectChapters(bool _state);
virtual TQPtrList< k9DVDChapter > getChapters() const {return chapters;};
virtual k9TitleEncOpt* getEncOpt() ;
public slots:
virtual void setfactor(float _value) {m_factor=_value;};
virtual void setforceFactor(bool _value) {m_forceFactor=_value;};
signals:
void selectionChanged();
private: // Private methods
k9DVDAudioStream* addAudioStream();
k9DVDChapter* addChapter(int num);
k9DVDSubtitle* addSubtitle(int num);
TQPtrList <k9DVDChapter> chapters;
bool indexed;
bool forceSelection;
int pgc;
public: // Public attributes
};
#endif