The display subsystem interface.More...
|kd_load_aliases(const std::string &filename)|
|kd_load_filter_graph(const std::string &filename)|
|kd_load_video_presets(const std::string &filename)|
|kd_show_headless_assert_error_message(const char *const msg, const char *const filename, const uint lineNum)|
|kd_show_headless_error_message(const char *const title, const char *const msg)|
|kd_show_headless_info_message(const char *const title, const char *const msg)|
The display subsystem interface.
The VCS GUI is responsible for providing the user with real-time means to enter information (e.g. configuring capture parameters), for directing such input to VCS, and for displaying captured frames and other information about VCS's run-time state to the user.
The display interface decouples the GUI's implementation from the rest of VCS, making it possible to replace the GUI with fairly minimal modification to the rest of VCS.
VCS's default GUI uses Qt, and its implementation of the display interface can be found in src/display/qt/d_main.cpp.
As of VCS 2.0.0, this interface is undergoing refactoring. Many of its functions are expected to become renamed or removed.
Asks the GUI to create and open the output window. The output window is a surface on which VCS's output frames are to be displayed by the GUI.
If the GUI makes use of child windows and/or dialogs, this may be a good time to create them, as well.
By default, VCS will call this function automatically on program startup.
Returns a function that closes and releases the output window.
Returns true if the output window is in fullscreen mode; false otherwise.
Asks the GUI to load alias resolutions from the given file.
The GUI is expected to inform VCS's alias subsystem of the new aliases.
Asks the GUI to load a filter graph from the given file.
The GUI is expected to inform VCS's filter subsystem of the new graph.
Asks the GUI to load video presets from the given file.
The GUI is expected to inform VCS's video presets subsystem of the new presets.
Request the display subsystem to prevent the system's screensaver or display hibernation from activating while VCS is running.
Asks the GUI to inform the filter interface, src/filter/filter.h, of all filter chains currently configured in the GUI.
This assumes that the GUI provides a dialog of some sort in which the user can create and modify filter chains. When this function is called, the GUI is expected to enumerate those filter chains into a format consumed by the filter interface and then to submit them to the filter interface.
In pseudocode, the GUI would do something like the following:
for (chain: guiFilterChains)
const standardFilterChain = ...convert chain into standard format...
Asks the GUI to execute one spin of its event loop.
Spinning the event loop would involve e.g. repainting the output window, processing any user input, etc.
The following sample Qt 5 code executes one spin of the event loop:
VCS will generally call this function at the capture's refresh rate, e.g. 70 times per second when capturing VGA mode 13h.
If the GUI wants to match the capture's refresh rate, it should repaint its output only when VCS calls this function.
Lets the GUI know that the size of output frames has changed. The GUI should update the size of its output window accordingly.
VCS expects the size of the output window to match the size of output frames; although the GUI may choose not to honor this.
The current size of output frames can be obtained via the scaler interface, src/scaler/scaler.h, by calling ks_output_resolution().
The following sample Qt 5 code sizes the output window to match the size of VCS's output frames (this is the output window's instance):
resolution_s r = ks_output_resolution();
Asks the GUI to refresh the output window's title bar text.
VCS assumes that the output window's title bar displays certain information about VCS's state - e.g. the current capture resolution. VCS will thus call this function to let the GUI know that the relevant state has changed.
If your custom GUI implementation displays different state variables than VCS's default GUI does, you may need to do custom polling of the relevant state in order to be aware of changes to it.
An event that can be fired by subsystems to indicate that the output window should redraw its contents.