diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /k9vamps/k9vamps.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9vamps/k9vamps.cpp')
-rwxr-xr-x | k9vamps/k9vamps.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/k9vamps/k9vamps.cpp b/k9vamps/k9vamps.cpp index b077fb8..f5e537a 100755 --- a/k9vamps/k9vamps.cpp +++ b/k9vamps/k9vamps.cpp @@ -11,7 +11,7 @@ // #include "k9vamps.h" -#include <qapplication.h> +#include <tqapplication.h> #include "ac.h" @@ -163,7 +163,7 @@ k9vamps::k9vamps(k9DVDBackup *dvdbackup) { void k9vamps::setPreserve(bool _value) { m_preserve = _value; } -void k9vamps::setOutput(QFile *_output) { +void k9vamps::setOutput(TQFile *_output) { m_output=_output; } @@ -185,7 +185,7 @@ void k9vamps::run () { vobuf = (uchar*) malloc (vbuf_size); if (vibuf == NULL || vobuf == NULL) - fatal (QString("Allocation of video buffers failed: %1").arg(strerror (errno))); + fatal (TQString("Allocation of video buffers failed: %1").tqarg(strerror (errno))); // actually do vaporization @@ -357,18 +357,18 @@ int k9vamps::check_video_packet (uchar *ptr) { vid_packet_start_code |= (uint32_t) (ptr [3]); if (vid_packet_start_code != 0x000001e0) - fatal(QString ("Bad video packet start code at %1: %2").arg(rtell(ptr)).arg(vid_packet_start_code,0,16)); + fatal(TQString ("Bad video packet start code at %1: %2").tqarg(rtell(ptr)).tqarg(vid_packet_start_code,0,16)); vid_packet_length = ptr [4] << 8; vid_packet_length |= ptr [5]; vid_packet_length += 6; if ((ptr [6] & 0xc0) != 0x80) - fatal (QString("Not an MPEG2 video packet at %1").arg(rtell (ptr))); + fatal (TQString("Not an MPEG2 video packet at %1").tqarg(rtell (ptr))); if (ptr [7]) { if ((ptr [7] & 0xc0) != 0xc0) - qDebug (QString("First video packet in sequence starting at %1 misses PTS or DTS, flags=%2").arg(rtell (ptr)).arg(ptr [7])); + qDebug (TQString("First video packet in sequence starting at %1 misses PTS or DTS, flags=%2").tqarg(rtell (ptr)).tqarg(ptr [7])); else { sequence_header_code = (uint32_t) (ptr [6 + 3 + ptr [8] + 0]) << 24; sequence_header_code |= (uint32_t) (ptr [6 + 3 + ptr [8] + 1]) << 16; @@ -399,7 +399,7 @@ int k9vamps::check_video_packet (uchar *ptr) { pad_packet_start_code |= (uint32_t) (ptr [3]); if (pad_packet_start_code != 0x000001be) - qDebug (QString("Bad padding packet start code at %1: %2").arg(rtell (ptr + vid_packet_length)).arg(pad_packet_start_code)); + qDebug (TQString("Bad padding packet start code at %1: %2").tqarg(rtell (ptr + vid_packet_length)).tqarg(pad_packet_start_code)); else { pad_packet_length = ptr [4] << 8; pad_packet_length |= ptr [5]; @@ -409,7 +409,7 @@ int k9vamps::check_video_packet (uchar *ptr) { // length of video packet plus padding packet must always match sector size if (14 + vid_packet_length + pad_packet_length != SECT_SIZE) - qDebug (QString("Bad video packet length at %1: %2").arg(rtell (ptr)).arg(vid_packet_length)); + qDebug (TQString("Bad video packet length at %1: %2").tqarg(rtell (ptr)).tqarg(vid_packet_length)); return rc; } @@ -479,7 +479,7 @@ int k9vamps::requant (uchar *dst, uchar *src, int n, float fact) { double realrqtfact=(double)(vin_bytes) / (double)(vout_bytes+rv); avgdiff = ((m_avgfact) /realrqtfact); - //qDebug ("factor : " +QString::number(m_avgfact) +" --> " +QString::number((float)n/(float)rv) +" avgdiff : " + QString::number(avgdiff) +" rqt_visize :" +QString::number(m_requant->rqt_visize) +" ps_size :" +QString::number(ps_size) + " vin_bytes :" + QString::number(vin_bytes)) ; + //qDebug ("factor : " +TQString::number(m_avgfact) +" --> " +TQString::number((float)n/(float)rv) +" avgdiff : " + TQString::number(avgdiff) +" rqt_visize :" +TQString::number(m_requant->rqt_visize) +" ps_size :" +TQString::number(ps_size) + " vin_bytes :" + TQString::number(vin_bytes)) ; return rv; @@ -636,7 +636,7 @@ void k9vamps::vap_leader () { data_length |= ptr [5]; if (14 + data_length != SECT_SIZE - 6) - fatal (QString("Bad padding packet length at %1: %2").arg(rtell (ptr)).arg(data_length)); + fatal (TQString("Bad padding packet length at %1: %2").tqarg(rtell (ptr)).tqarg(data_length)); //JMP:à vérifier skip (SECT_SIZE); @@ -681,7 +681,7 @@ void k9vamps::vap_trailer (int length) { data_length |= ptr [5]; if (14 + data_length != SECT_SIZE - 6) - fatal (QString("Bad padding packet length at %1: %2").arg(rtell (ptr)).arg(data_length)); + fatal (TQString("Bad padding packet length at %1: %2").tqarg(rtell (ptr)).tqarg(data_length)); skip (SECT_SIZE); } else { copy (SECT_SIZE); @@ -802,7 +802,7 @@ int k9vamps::vap_phase1 (void) { data_length |= ptr [5]; if (14 + data_length != SECT_SIZE - 6) - fatal (QString("Bad padding packet length at %1: %2").arg(rtell (ptr)).arg(data_length)); + fatal (TQString("Bad padding packet length at %1: %2").tqarg(rtell (ptr)).tqarg(data_length)); break; @@ -938,7 +938,7 @@ void k9vamps::vap_phase2 (int seq_length) { data_length |= ptr [5]; if (14 + data_length != SECT_SIZE - 6) - fatal (QString("Bad padding packet length at %1: %2").arg(rtell (ptr)).arg(data_length)); + fatal (TQString("Bad padding packet length at %1: %2").tqarg(rtell (ptr)).tqarg(data_length)); //JMP: à vérifier skip (SECT_SIZE); break; @@ -955,7 +955,7 @@ void k9vamps::vap_phase2 (int seq_length) { } } -QString & k9vamps::geterrMsg() { +TQString & k9vamps::geterrMsg() { return m_errMsg; } @@ -1068,7 +1068,7 @@ void k9vamps::abort() { // this is a *very* sophisticated kind of error handling :-) void -k9vamps::fatal (QString msg) { +k9vamps::fatal (TQString msg) { m_errMsg=msg; m_error=true; if (m_requant !=NULL) |