aja: Increment aja-source version for buffering setting
Add aja-source version 2 to differentiate buffering settings, which is implemented in a255b0f74. To register two versions, remove to return obs_source_info and register the source inside aja-source.cpp. Also revise aja-output.cpp to register aja-output to keep consistency of function type.
This commit is contained in:
parent
b224a2cd47
commit
d7b363a7c4
@ -1289,7 +1289,7 @@ static void aja_output_defaults(obs_data_t *settings)
|
|||||||
static_cast<long long>(kDefaultAJASDITransport4K));
|
static_cast<long long>(kDefaultAJASDITransport4K));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct obs_output_info create_aja_output_info()
|
void register_aja_output_info()
|
||||||
{
|
{
|
||||||
struct obs_output_info aja_output_info = {};
|
struct obs_output_info aja_output_info = {};
|
||||||
|
|
||||||
@ -1305,5 +1305,5 @@ struct obs_output_info create_aja_output_info()
|
|||||||
aja_output_info.update = aja_output_update;
|
aja_output_info.update = aja_output_update;
|
||||||
aja_output_info.get_defaults = aja_output_defaults;
|
aja_output_info.get_defaults = aja_output_defaults;
|
||||||
aja_output_info.get_properties = aja_output_get_properties;
|
aja_output_info.get_properties = aja_output_get_properties;
|
||||||
return aja_output_info;
|
obs_register_output(&aja_output_info);
|
||||||
}
|
}
|
||||||
|
@ -1127,7 +1127,12 @@ void aja_source_get_defaults(obs_data_t *settings)
|
|||||||
static_cast<long long>(SDITransport4K::TwoSampleInterleave));
|
static_cast<long long>(SDITransport4K::TwoSampleInterleave));
|
||||||
obs_data_set_default_bool(settings, kUIPropDeactivateWhenNotShowing.id,
|
obs_data_set_default_bool(settings, kUIPropDeactivateWhenNotShowing.id,
|
||||||
false);
|
false);
|
||||||
obs_data_set_default_bool(settings, kUIPropBuffering.id, false);
|
}
|
||||||
|
|
||||||
|
static void aja_source_get_defaults_v1(obs_data_t *settings)
|
||||||
|
{
|
||||||
|
aja_source_get_defaults(settings);
|
||||||
|
obs_data_set_default_bool(settings, kUIPropBuffering.id, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aja_source_save(void *data, obs_data_t *settings)
|
void aja_source_save(void *data, obs_data_t *settings)
|
||||||
@ -1161,14 +1166,14 @@ void aja_source_save(void *data, obs_data_t *settings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct obs_source_info create_aja_source_info()
|
void register_aja_source_info()
|
||||||
{
|
{
|
||||||
struct obs_source_info aja_source_info = {};
|
struct obs_source_info aja_source_info = {};
|
||||||
aja_source_info.id = kUIPropCaptureModule.id;
|
aja_source_info.id = kUIPropCaptureModule.id;
|
||||||
aja_source_info.type = OBS_SOURCE_TYPE_INPUT;
|
aja_source_info.type = OBS_SOURCE_TYPE_INPUT;
|
||||||
aja_source_info.output_flags = OBS_SOURCE_ASYNC_VIDEO |
|
aja_source_info.output_flags =
|
||||||
OBS_SOURCE_AUDIO |
|
OBS_SOURCE_ASYNC_VIDEO | OBS_SOURCE_AUDIO |
|
||||||
OBS_SOURCE_DO_NOT_DUPLICATE;
|
OBS_SOURCE_DO_NOT_DUPLICATE | OBS_SOURCE_CAP_OBSOLETE;
|
||||||
aja_source_info.get_name = aja_source_get_name;
|
aja_source_info.get_name = aja_source_get_name;
|
||||||
aja_source_info.create = aja_source_create;
|
aja_source_info.create = aja_source_create;
|
||||||
aja_source_info.destroy = aja_source_destroy;
|
aja_source_info.destroy = aja_source_destroy;
|
||||||
@ -1178,8 +1183,13 @@ struct obs_source_info create_aja_source_info()
|
|||||||
aja_source_info.activate = aja_source_activate;
|
aja_source_info.activate = aja_source_activate;
|
||||||
aja_source_info.deactivate = aja_source_deactivate;
|
aja_source_info.deactivate = aja_source_deactivate;
|
||||||
aja_source_info.get_properties = aja_source_get_properties;
|
aja_source_info.get_properties = aja_source_get_properties;
|
||||||
aja_source_info.get_defaults = aja_source_get_defaults;
|
aja_source_info.get_defaults = aja_source_get_defaults_v1;
|
||||||
aja_source_info.save = aja_source_save;
|
aja_source_info.save = aja_source_save;
|
||||||
aja_source_info.icon_type = OBS_ICON_TYPE_CAMERA;
|
aja_source_info.icon_type = OBS_ICON_TYPE_CAMERA;
|
||||||
return aja_source_info;
|
obs_register_source(&aja_source_info);
|
||||||
|
|
||||||
|
aja_source_info.version = 2;
|
||||||
|
aja_source_info.output_flags &= ~OBS_SOURCE_CAP_OBSOLETE;
|
||||||
|
aja_source_info.get_defaults = aja_source_get_defaults;
|
||||||
|
obs_register_source(&aja_source_info);
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,8 @@ MODULE_EXPORT const char *obs_module_description(void)
|
|||||||
return "aja";
|
return "aja";
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct obs_source_info create_aja_source_info();
|
extern void register_aja_source_info();
|
||||||
struct obs_source_info aja_source_info;
|
extern void register_aja_output_info();
|
||||||
|
|
||||||
extern struct obs_output_info create_aja_output_info();
|
|
||||||
struct obs_output_info aja_output_info;
|
|
||||||
|
|
||||||
bool obs_module_load(void)
|
bool obs_module_load(void)
|
||||||
{
|
{
|
||||||
@ -28,11 +25,9 @@ bool obs_module_load(void)
|
|||||||
|
|
||||||
aja::CardManager::Instance().EnumerateCards();
|
aja::CardManager::Instance().EnumerateCards();
|
||||||
|
|
||||||
aja_source_info = create_aja_source_info();
|
register_aja_source_info();
|
||||||
obs_register_source(&aja_source_info);
|
|
||||||
|
|
||||||
aja_output_info = create_aja_output_info();
|
register_aja_output_info();
|
||||||
obs_register_output(&aja_output_info);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user