From 4081c20fd83ff5d41c9eea45306894752a5d63f2 Mon Sep 17 00:00:00 2001 From: austriancoder Date: Sun, 10 Oct 2004 20:42:36 +0000 Subject: using now std:: instead of namespace std; --- HISTORY | 4 ++-- dxr3audiodecoder.c | 4 ++-- dxr3interface_spu_encoder.c | 8 ++++---- dxr3memcpy.h | 2 +- dxr3multichannelaudio.c | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/HISTORY b/HISTORY index 8774c94..26d96a5 100644 --- a/HISTORY +++ b/HISTORY @@ -259,5 +259,5 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - rewrote cDxr3SpuDecoder dropped software decoder added hardware decoder, so we make use of DVD-functions of the dxr3 - kicked out YUV2Rgb - as we dont need it any more -- checked Lock() and Unlock() in dxr3interface.c - hope everything is ok else contact me \ No newline at end of file +- checked Lock() and Unlock() in dxr3interface.c - hope everything is ok else contact me +- using now std:: instead of namespace std; diff --git a/dxr3audiodecoder.c b/dxr3audiodecoder.c index 3c05bd5..b48b614 100644 --- a/dxr3audiodecoder.c +++ b/dxr3audiodecoder.c @@ -107,7 +107,7 @@ void cDxr3AudioDecoder::Decode(const uint8_t* buf, int length, uint32_t pts, cDx if ((buf[i+2] & 0xFC) != (lastHeader[2] & 0xFC)) { cLog::Instance() << "cDxr3AudioDecoder::Decode Found different audio header -> init\n"; - cLog::Instance() << "cDxr3AduioDecoder::Decode Old header 0x" << hex << *((uint32_t*) lastHeader) << " new header 0x" << *((uint32_t*) (buf+i))<< dec << "\n"; + cLog::Instance() << "cDxr3AduioDecoder::Decode Old header 0x" << std::hex << *((uint32_t*) lastHeader) << " new header 0x" << *((uint32_t*) (buf+i))<< std::dec << "\n"; Init(); lastHeader[0] = buf[i]; @@ -252,7 +252,7 @@ void cDxr3AudioDecoder::DecodeAc3Dts(const uint8_t* pPes, const uint8_t* buf, in for (int i = 0; i < pFrame->Count() - pesHeaderLength - LPCM_HEADER_LENGTH; i += 2) { - swap(pData[i], pData[i + 1]); + std::swap(pData[i], pData[i + 1]); } aBuf.Push(pFrame->Data() + pesHeaderLength + LPCM_HEADER_LENGTH, pFrame->Count() - pesHeaderLength - 7, tempPes.GetPts()); diff --git a/dxr3interface_spu_encoder.c b/dxr3interface_spu_encoder.c index e47a2c1..b9e59b9 100644 --- a/dxr3interface_spu_encoder.c +++ b/dxr3interface_spu_encoder.c @@ -227,10 +227,10 @@ void cSPUEncoder::CalculateActiveOsdArea() // calculate for (int i = 0; i < 8; i++) { - m_active_osd.x0 = max(m_active_osd.x0, m_windows[i].x0); - m_active_osd.x1 = max(m_active_osd.x1, m_windows[i].y0); - m_active_osd.y0 = max(m_active_osd.y0, m_windows[i].x1); - m_active_osd.y1 = max(m_active_osd.y1, m_windows[i].y1); + m_active_osd.x0 = std::max(m_active_osd.x0, m_windows[i].x0); + m_active_osd.x1 = std::max(m_active_osd.x1, m_windows[i].y0); + m_active_osd.y0 = std::max(m_active_osd.y0, m_windows[i].x1); + m_active_osd.y1 = std::max(m_active_osd.y1, m_windows[i].y1); } cLog::Instance() << "OSD x0: " << m_active_osd.x0 << "\n"; diff --git a/dxr3memcpy.h b/dxr3memcpy.h index 364f87f..977af5d 100644 --- a/dxr3memcpy.h +++ b/dxr3memcpy.h @@ -62,7 +62,7 @@ // ================================== struct memcpy_routine { - string name; ///< name of memcpy methode + std::string name; ///< name of memcpy methode void *(* function)(void *to, const void *from, size_t len); ///< our memcopy methode unsigned long long time; ///< needed time for banchmark uint32_t cpu_require; ///< caps from dxr3cpu.h diff --git a/dxr3multichannelaudio.c b/dxr3multichannelaudio.c index 0bbb15e..7a301ac 100644 --- a/dxr3multichannelaudio.c +++ b/dxr3multichannelaudio.c @@ -114,7 +114,7 @@ void cAudioEncapsulator::NewFrame(uchar PTSflags, const uchar *PTSdata) } static const int ptslen[] = { 0,0,PTS_SIZE,PTS_SIZE*2 }; const int plen = ptslen[PTSflags]; - int len = min(totalSize, MAX_FRAMECOUNT); + int len = std::min(totalSize, MAX_FRAMECOUNT); ED("NewFrame: totalSize=%d frameCount=%d PTSflags=%d",totalSize,len,PTSflags); totalSize -= len; ED(" new totalSize=%d\n",totalSize); @@ -176,7 +176,7 @@ void cAudioEncapsulator::PutData(const uchar *data, int len) if(!muteData) { if(!frameData) DEBUG("PutData() without frame\n"); while (frameData && len > 0) { - int l = min(len,frameCount); + int l = std::min(len,frameCount); if(data) { memcpy(frameData,data,l); data += l; @@ -327,7 +327,7 @@ void cAudioEncapsulator::Decode(const uchar *data, int len, uchar PTSflags, int } } else { // unfortunaly buffer is not empty, so continue with buffering until sync found - int need=min(SYNC_SIZE-have,len-used); + int need=std::min(SYNC_SIZE-have,len-used); if (need) { memcpy(&syncBuff[have],&data[used],need); have += need; used += need; ptsDelay -= need; @@ -347,7 +347,7 @@ void cAudioEncapsulator::Decode(const uchar *data, int len, uchar PTSflags, int } } else { // we have a header sync and are copying data - int need = min(length-have,len-used); + int need = std::min(length-have,len-used); if(need) { ED("Decode: writing %d\n",need); PutData(&data[used],need); -- cgit v1.2.3