Bool vmw_video_close(ScrnInfoPtr pScrn, struct vmw_driver *vmw);
+void vmw_video_stop_all(ScrnInfoPtr pScrn, struct vmw_driver *vmw);
+
/***********************************************************************
* vmw_ioctl.c
return TRUE;
}
+static Bool
+vmw_screen_enter_vt(ScrnInfoPtr pScrn)
+{
+ debug_printf("%s: enter\n", __func__);
+
+ return TRUE;
+}
+
+static Bool
+vmw_screen_leave_vt(ScrnInfoPtr pScrn)
+{
+ struct vmw_driver *vmw = vmw_driver(pScrn);
+
+ debug_printf("%s: enter\n", __func__);
+
+ vmw_video_stop_all(pScrn, vmw);
+
+ return TRUE;
+}
+
/*
* Functions for setting up hooks into the xorg state tracker
*/
ms = modesettingPTR(pScrn);
ms->winsys_screen_init = vmw_screen_init;
ms->winsys_screen_close = vmw_screen_close;
+ ms->winsys_enter_vt = vmw_screen_enter_vt;
+ ms->winsys_leave_vt = vmw_screen_leave_vt;
return TRUE;
}
}
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * vmw_video_stop_all --
+ *
+ * Stop all video streams from playing.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * All buffers are freed.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void vmw_video_stop_all(ScrnInfoPtr pScrn, struct vmw_driver *vmw)
+{
+ struct vmw_video_private *video = vmw->video_priv;
+ int i;
+
+ debug_printf("%s: enter\n", __func__);
+
+ if (!video)
+ return;
+
+ for (i = 0; i < VMWARE_VID_NUM_PORTS; ++i) {
+ vmw_xv_stop_video(pScrn, &video->port[i], TRUE);
+ }
+}
+
+
/*
*-----------------------------------------------------------------------------
*