#windows

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

#196 in #windows

Download history 196/week @ 2024-07-23 197/week @ 2024-07-30 4/week @ 2024-08-06 2/week @ 2024-08-13 24/week @ 2024-09-10 18/week @ 2024-09-17 27/week @ 2024-09-24 5/week @ 2024-10-01

74 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