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 02:40:40 (GMT)
commit7bd0b542f9d8fc67ba8d82eb634c8ed495ba4cc0 (patch)
tree3a80325b8474f10dfa5e31bdc85c807e6c7d3116
parenta90960c73f0912b0c3ce72fffdf92c69000f87ab (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.
-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 9cfdc1e..81eb3a7 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -2116,7 +2116,11 @@ void MythPlayer::VideoStart(void)
m_double_framerate = 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, fr_int, 0, false);
}
diff --git a/mythtv/libs/libmythtv/vsync.h b/mythtv/libs/libmythtv/vsync.h
index 9f8e7c5..5764ddc 100644
--- a/mythtv/libs/libmythtv/vsync.h
+++ b/mythtv/libs/libmythtv/vsync.h
@@ -192,7 +192,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.
*/
@@ -208,4 +208,16 @@ class USleepVideoSync : public VideoSync
bool TryInit(void);
int 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 */