summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3interface.c41
-rw-r--r--dxr3interface.h2
2 files changed, 15 insertions, 28 deletions
diff --git a/dxr3interface.c b/dxr3interface.c
index b8edfd0..981aab0 100644
--- a/dxr3interface.c
+++ b/dxr3interface.c
@@ -257,7 +257,7 @@ void cDxr3Interface::Pause()
}
// ==================================
-void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times)
+void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame)
{
if (!m_VideoActive) {
return;
@@ -266,35 +266,22 @@ void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times)
int written = 0;
int count = 0;
- Lock();
-
- for (int i = 0; i < times; i++)
- {
- if (times > 1)
- {
- dsyslog("dxr3: playvideoframe: times=%d", times);
- }
-
- while (written < pFrame->GetCount() && count >= 0)
- {
- if ((count = write(m_fdVideo, pFrame->GetData() + written, pFrame->GetCount() - written)) == -1)
- {
- // an error occured
- Resuscitation();
- }
- written += count;
- }
+ Lock();
- // reset
- written = 0;
- }
+ while (written < pFrame->GetCount() && count >= 0) {
+ if ((count = write(m_fdVideo, pFrame->GetData() + written, pFrame->GetCount() - written)) == -1) {
+ // an error occured
+ Resuscitation();
+ }
+ written += count;
+ }
- Unlock();
+ Unlock();
- SetAspectRatio(pFrame->GetAspectRatio());
- uint32_t pts = pFrame->GetPts();
- if (pts > 0)
- m_lastSeenPts = pts;
+ SetAspectRatio(pFrame->GetAspectRatio());
+ uint32_t pts = pFrame->GetPts();
+ if (pts > 0)
+ m_lastSeenPts = pts;
}
// ==================================
diff --git a/dxr3interface.h b/dxr3interface.h
index 79b662a..c4db465 100644
--- a/dxr3interface.h
+++ b/dxr3interface.h
@@ -108,7 +108,7 @@ public:
void flushBuffers();
void Pause();
- void PlayVideoFrame(cFixedLengthFrame* pFrame, int times = 1);
+ void PlayVideoFrame(cFixedLengthFrame* pFrame);
void PlayVideoFrame(cDxr3PesFrame *frame);
// device access