summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-05-10 02:40:40 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-05-10 03:50:30 (GMT)
commitee029d1eccba5f7e62b051a8756106c32f92e17d (patch)
tree68b53967e0a156bec4b2d22ccf13063bb97ac4e2
parent983e6d74fa9ee4a8693606bce8d9be5237a9f7d2 (diff)
PiP: Add a dummy video sync sub-class for Picture in Picture.
Video timing for PiP's is handled by the main player - hence no actual video sync is required for the PiP players. (cherry picked from commit 7bd0b542f9d8fc67ba8d82eb634c8ed495ba4cc0)
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp6
-rw-r--r--mythtv/libs/libmythtv/vsync.h14
2 files changed, 18 insertions, 2 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index e02c4d1..8ddeba7 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2029,7 +2029,11 @@ void MythPlayer::VideoStart(void)
m_can_double = false;
m_scan_tracker = 2;
- if (using_null_videoout)
+ if (player_ctx->IsPIP() && using_null_videoout)
+ {
+ videosync = new DummyVideoSync(videoOutput, fr_int, 0, false);
+ }
+ else if (using_null_videoout)
{
videosync = new USleepVideoSync(videoOutput, (int)fr_int, 0, false);
}
diff --git a/mythtv/libs/libmythtv/vsync.h b/mythtv/libs/libmythtv/vsync.h
index 156cdad..14252ce 100644
--- a/mythtv/libs/libmythtv/vsync.h
+++ b/mythtv/libs/libmythtv/vsync.h
@@ -252,7 +252,7 @@ class BusyWaitVideoSync : public VideoSync
* inaccurate on < Linux 2.6 kernels; not very accurate there either.
* Not phase-maintaining. Not tried automatically.
*
- * This only used when NVP's 'disablevideo' is true (i.e. for
+ * This is only used when MythPlayer's 'disablevideo' is true (i.e. for
* commercial flagging and for transcoding), since it doesn't
* waste CPU cycles busy-waiting like BusyWaitVideoSync.
*/
@@ -268,4 +268,16 @@ class USleepVideoSync : public VideoSync
bool TryInit(void);
void WaitForFrame(int sync_delay);
};
+
+class DummyVideoSync : public VideoSync
+{
+ public:
+ DummyVideoSync(VideoOutput* vo, int fr, int ri, bool intl)
+ : VideoSync(vo, fr, ri, intl) { }
+ ~DummyVideoSync() { }
+
+ QString getName(void) const { return QString("Dummy"); }
+ bool TryInit(void) { return true; }
+ int WaitForFrame(int sync_delay) { return 0; }
+};
#endif /* VSYNC_H_INCLUDED */