summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--dxr3outputthread.c83
2 files changed, 10 insertions, 74 deletions
diff --git a/HISTORY b/HISTORY
index 0d3f9ee..fa5edc1 100644
--- a/HISTORY
+++ b/HISTORY
@@ -262,3 +262,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- checked Lock() and Unlock() in dxr3interface.c - hope everything is ok else contact me
- using now std:: instead of namespace std;
- renamed dxr3interface_spu_encoder.h/c to dxr3spuencoder.h/c
+- removed log commands in dxr3outputthread.c \ No newline at end of file
diff --git a/dxr3outputthread.c b/dxr3outputthread.c
index 5429555..3d4da85 100644
--- a/dxr3outputthread.c
+++ b/dxr3outputthread.c
@@ -39,7 +39,7 @@ cThread(), m_dxr3Device(dxr3Device), m_buffer(buffer), m_bStopThread(false), m_b
}
// ==================================
-// send stop signal
+//! send stop signal
void cDxr3OutputThread::SetStopSignal()
{
Lock();
@@ -48,7 +48,7 @@ void cDxr3OutputThread::SetStopSignal()
}
// ==================================
-// was stop signal send?
+//! was stop signal send?
bool cDxr3OutputThread::GetStopSignal()
{
bool ret = false;
@@ -60,14 +60,14 @@ bool cDxr3OutputThread::GetStopSignal()
}
// ==================================
-// constr.
+//! constr.
cDxr3AudioOutThread::cDxr3AudioOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer) :
cDxr3OutputThread(dxr3Device, buffer)
{
}
// ==================================
-// thread action
+//! thread action
void cDxr3AudioOutThread::Action()
{
bool resync = false;
@@ -92,10 +92,6 @@ void cDxr3AudioOutThread::Action()
if (pts && abs((int)pts-(int)SCR) > 30000 || m_dxr3Device.IsExternalReleased())
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
- cLog::Instance() << "cDxr3AudioOutThread::Action " << "pts = " << pts << " scr = " << SCR << "\n";
- }
m_buffer.Clear();
m_bNeedResync = true;
}
@@ -103,10 +99,6 @@ void cDxr3AudioOutThread::Action()
{
if (!pts || pts < SCR)
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// if (pts) cLog::Instance() << "cDxr3AudioOutThread::Action pts " << pNext->GetPts() << " scr " << SCR << " delta " << (pts - SCR) << "\n";
- }
if (!pts && resync)
{
continue;
@@ -118,10 +110,6 @@ void cDxr3AudioOutThread::Action()
if (pts && (pts < SCR) && ((SCR - pts) > 5000))
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3AudioOutThread::Action pts audio too small " << (SCR - pts) << "\n";
- }
m_dxr3Device.SetSysClock(pts+ 1 * AUDIO_OFFSET);
m_dxr3Device.PlayAudioFrame(pNext);
if (m_buffer.IsPolled())
@@ -132,10 +120,6 @@ void cDxr3AudioOutThread::Action()
}
else
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3AudioOutThread::Action write audio\n";
- }
m_dxr3Device.PlayAudioFrame(pNext);
m_buffer.Pop();
}
@@ -144,10 +128,6 @@ void cDxr3AudioOutThread::Action()
{
if (abs((int)pts - (int)SCR) < (AUDIO_OFFSET ))
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// if (pts) cLog::Instance() << "cDxr3AudioOutThread::Action pts " << pNext->GetPts() << " scr " << SCR << " delta " << (pts - SCR) << "\n";
- }
m_dxr3Device.PlayAudioFrame(pNext);
m_buffer.Pop();
}
@@ -156,30 +136,20 @@ void cDxr3AudioOutThread::Action()
if ((pts > SCR && abs((int)pts - (int)SCR) > AUDIO_OFFSET))
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3AudioOutThread::Action Stopping audio " << SCR << " " << pts << "\n";
- }
-
- usleep(10000);
-
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3AudioOutThread::Action Starting audio " << SCR << " " << pts << "\n";
- }
+ usleep(10000);
}
}
}
// ==================================
-// constr.
+//! constr.
cDxr3VideoOutThread::cDxr3VideoOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer) :
cDxr3OutputThread(dxr3Device, buffer)
{
}
// ==================================
-// thread action
+//! thread action
void cDxr3VideoOutThread::Action()
{
uint32_t pts = 0;
@@ -192,7 +162,7 @@ void cDxr3VideoOutThread::Action()
if (!pthread_setschedparam(pthread_self(), SCHED_RR, &temp))
{
-// cLog::Instance() << "cDxr3VideoOutThread::Action(): Error can't set priority\n";
+ cLog::Instance() << "cDxr3VideoOutThread::Action(): Error can't set priority\n";
}
while (!GetStopSignal())
@@ -220,38 +190,13 @@ void cDxr3VideoOutThread::Action()
{
if ((pts > SCR) && abs((int)pts - (int)SCR) < 7500)
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action pts " << pts << " scr " << SCR << " delta " << (pts - SCR) << "\n";
- }
-
m_dxr3Device.SetPts(pts);
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action done\n";
- }
-
if (m_buffer.Available() && pNext->GetData() && pNext->GetCount())
{
m_dxr3Device.PlayVideoFrame(pNext);
-
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action write\n";
- }
-
- m_buffer.Pop();
-
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action done pop\n";
- }
+ m_buffer.Pop();
}
- if (cDxr3ConfigData::Instance().GetDebug())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action done complete\n";
- }
}
else
{
@@ -272,17 +217,7 @@ void cDxr3VideoOutThread::Action()
if ((pts > SCR && abs((int)pts - (int)SCR) > 7500 ))
{
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action Stopping video " << SCR << " " << pts << "\n";
- }
-
usleep(10000);
-
- if (cDxr3ConfigData::Instance().GetDebugEverything())
- {
-// cLog::Instance() << "cDxr3VideoOutThread::Action Starting video " << SCR << " " << pts << "\n";
- }
}
}
}