Add source properties window (very preliminary)
- Add a properties window for sources so that you can now actually edit the settings for sources. Also, display the source by itself in the window (Note: not working on mac, and possibly not working on linux). When changing the settings for a source, it will call obs_source_update on that source when you have modified any values automatically. - Add a properties 'widget', eventually I want to turn this in to a regular nice properties view like you'd see in the designer, but right now it just uses a form layout in a QScrollArea with regular controls to display the properties. It's clunky but works for the time being. - Make it so that swap chains and the main graphics subsystem will automatically use at least one backbuffer if none was specified - Fix bug where displays weren't added to the main display array - Make it so that you can get the properties of a source via the actual pointer of a source/encoder/output in addition to being able to look up properties via identifier. - When registering source types, check for required functions (wasn't doing it before). getheight/getwidth should not be optional if it's a video source as well. - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted libobs pointers - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to automatically disconnect them on destruction - Move the "scale and center" calculation in window-basic-main.cpp to its own function and in its own source file - Add an 'update' callback to WASAPI audio sources
This commit is contained in:
@@ -48,11 +48,22 @@ obs_display_t obs_display_create(struct gs_init_data *graphics_data)
|
||||
{
|
||||
struct obs_display *display = bzalloc(sizeof(struct obs_display));
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
|
||||
if (!graphics_data->num_backbuffers)
|
||||
graphics_data->num_backbuffers = 1;
|
||||
|
||||
if (!obs_display_init(display, graphics_data)) {
|
||||
obs_display_destroy(display);
|
||||
display = NULL;
|
||||
} else {
|
||||
pthread_mutex_lock(&obs->data.displays_mutex);
|
||||
da_push_back(obs->data.displays, &display);
|
||||
pthread_mutex_unlock(&obs->data.displays_mutex);
|
||||
}
|
||||
|
||||
gs_leavecontext();
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
@@ -74,7 +85,10 @@ void obs_display_destroy(obs_display_t display)
|
||||
da_erase_item(obs->data.displays, &display);
|
||||
pthread_mutex_unlock(&obs->data.displays_mutex);
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
obs_display_free(display);
|
||||
gs_leavecontext();
|
||||
|
||||
bfree(display);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user