#obs #capture #list #windows #information #helper #window-capture

libobs-window-helper

Provides a list of windows that can be captured by OBS

3 releases

0.1.2 Jul 30, 2024
0.1.1 Jul 28, 2024
0.1.0 Jul 27, 2024

#10 in #obs

Download history 3/week @ 2024-08-12 40/week @ 2024-09-16 29/week @ 2024-09-23 5/week @ 2024-09-30 4/week @ 2024-10-14

98 downloads per month
Used in libobs-sources

GPL-3.0 license

28KB
629 lines

libOBS Window Helper

This is just a helper crate for the (to be released) libobs-sources crate. It provides a way to get a list of all windows that OBS can capture (eiter window_capture or game_capture). If you want to use this crate nevertheless, here's an example.

Example

use libobs_window_helper::{get_all_windows, WindowSearchMode};

fn main() {
    let res = get_all_windows(WindowSearchMode::ExcludeMinimized, false).unwrap();
        for i in res {
            /// This struct contains all crucial information about the window like title, class name, obs_id etc.
            println!("{:?}", i);
        }
}

lib.rs:

OBS Window Helper

This crate provides necessary information about windows that could be used so they can be captured with the window_capture or game_capture source in OBS.
The function you probably want to use is get_all_windows which returns a list of WindowInfo structs.

Dependencies

~128MB
~2M SLoC