Restart video when mode detection is failed
KVM sometimes stops when video mode is changed. This commit adds
video restarting logic for the case.
Tested:
1. Open BMCWeb -> Server control -> KVM
2. Checked KVM screen update while restarting the host. It
updates all frames even when video mode changes happen.
Change-Id: If986394110986e49a6eaac1ae2859208fa7681f5
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/ikvm_video.hpp b/ikvm_video.hpp
index 0e5f3af..faaa57d 100644
--- a/ikvm_video.hpp
+++ b/ikvm_video.hpp
@@ -50,6 +50,12 @@
void start();
/* @brief Stops streaming from the video device */
void stop();
+ /* @brief Restarts streaming from the video device */
+ void restart()
+ {
+ stop();
+ start();
+ }
/*
* @brief Gets the desired video frame rate in frames per second