aja: Show/Hide SDI Transport/4K lists and options
Only show SDI Transport options if IOSelection is SDI and only show 12G selection in Capture plugin
This commit is contained in:
parent
f559287723
commit
0ef3b29cad
@ -58,6 +58,27 @@ static void free_video_frame(struct video_data *frame)
|
|||||||
memset(frame, 0, sizeof(*frame));
|
memset(frame, 0, sizeof(*frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void update_sdi_transport_and_sdi_transport_4k(obs_properties_t *props,
|
||||||
|
NTV2DeviceID device_id,
|
||||||
|
IOSelection io,
|
||||||
|
NTV2VideoFormat vf)
|
||||||
|
{
|
||||||
|
// Update SDI Transport and SDI 4K Transport selections
|
||||||
|
obs_property_t *sdi_trx_list =
|
||||||
|
obs_properties_get(props, kUIPropSDITransport.id);
|
||||||
|
obs_property_list_clear(sdi_trx_list);
|
||||||
|
populate_sdi_transport_list(sdi_trx_list, io, device_id);
|
||||||
|
obs_property_t *sdi_4k_trx_list =
|
||||||
|
obs_properties_get(props, kUIPropSDITransport4K.id);
|
||||||
|
obs_property_list_clear(sdi_4k_trx_list);
|
||||||
|
populate_sdi_4k_transport_list(sdi_4k_trx_list);
|
||||||
|
|
||||||
|
bool is_sdi = aja::IsIOSelectionSDI(io);
|
||||||
|
obs_property_set_visible(sdi_trx_list, is_sdi);
|
||||||
|
obs_property_set_visible(sdi_4k_trx_list,
|
||||||
|
is_sdi && NTV2_IS_4K_VIDEO_FORMAT(vf));
|
||||||
|
}
|
||||||
|
|
||||||
AJAOutput::AJAOutput(CNTV2Card *card, const std::string &cardID,
|
AJAOutput::AJAOutput(CNTV2Card *card, const std::string &cardID,
|
||||||
const std::string &outputID, UWord deviceIndex,
|
const std::string &outputID, UWord deviceIndex,
|
||||||
const NTV2DeviceID deviceID)
|
const NTV2DeviceID deviceID)
|
||||||
@ -835,11 +856,11 @@ bool aja_output_device_changed(void *data, obs_properties_t *props,
|
|||||||
|
|
||||||
IOSelection io_select = static_cast<IOSelection>(
|
IOSelection io_select = static_cast<IOSelection>(
|
||||||
obs_data_get_int(settings, kUIPropOutput.id));
|
obs_data_get_int(settings, kUIPropOutput.id));
|
||||||
obs_property_list_clear(sdi_trx_list);
|
|
||||||
populate_sdi_transport_list(sdi_trx_list, io_select, deviceID);
|
|
||||||
|
|
||||||
obs_property_list_clear(sdi_4k_list);
|
update_sdi_transport_and_sdi_transport_4k(
|
||||||
populate_sdi_4k_transport_list(sdi_4k_list);
|
props, cardEntry->GetDeviceID(), io_select,
|
||||||
|
static_cast<NTV2VideoFormat>(obs_data_get_int(
|
||||||
|
settings, kUIPropVideoFormatSelect.id)));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -898,13 +919,10 @@ bool aja_output_dest_changed(obs_properties_t *props, obs_property_t *list,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obs_property_t *sdi_trx_list =
|
update_sdi_transport_and_sdi_transport_4k(
|
||||||
obs_properties_get(props, kUIPropSDITransport.id);
|
props, cardEntry->GetDeviceID(), io_select,
|
||||||
obs_property_list_clear(sdi_trx_list);
|
static_cast<NTV2VideoFormat>(obs_data_get_int(
|
||||||
populate_sdi_transport_list(sdi_trx_list, io_select,
|
settings, kUIPropVideoFormatSelect.id)));
|
||||||
cardEntry->GetDeviceID());
|
|
||||||
obs_property_set_visible(sdi_trx_list,
|
|
||||||
aja::IsIOSelectionSDI(io_select));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -676,8 +676,6 @@ bool aja_source_device_changed(void *data, obs_properties_t *props,
|
|||||||
IOSelection io_select = static_cast<IOSelection>(
|
IOSelection io_select = static_cast<IOSelection>(
|
||||||
obs_data_get_int(settings, kUIPropInput.id));
|
obs_data_get_int(settings, kUIPropInput.id));
|
||||||
obs_property_list_clear(sdi_trx_list);
|
obs_property_list_clear(sdi_trx_list);
|
||||||
obs_property_list_add_int(sdi_trx_list, obs_module_text("Auto"),
|
|
||||||
kAutoDetect);
|
|
||||||
populate_sdi_transport_list(sdi_trx_list, io_select, deviceID, true);
|
populate_sdi_transport_list(sdi_trx_list, io_select, deviceID, true);
|
||||||
|
|
||||||
obs_property_list_clear(sdi_4k_list);
|
obs_property_list_clear(sdi_4k_list);
|
||||||
@ -694,6 +692,8 @@ bool aja_source_device_changed(void *data, obs_properties_t *props,
|
|||||||
obs_property_set_visible(io_select_list, have_cards);
|
obs_property_set_visible(io_select_list, have_cards);
|
||||||
obs_property_set_visible(vid_fmt_list, have_cards);
|
obs_property_set_visible(vid_fmt_list, have_cards);
|
||||||
obs_property_set_visible(pix_fmt_list, have_cards);
|
obs_property_set_visible(pix_fmt_list, have_cards);
|
||||||
|
obs_property_set_visible(
|
||||||
|
sdi_trx_list, have_cards && aja::IsIOSelectionSDI(io_select));
|
||||||
obs_property_set_visible(
|
obs_property_set_visible(
|
||||||
sdi_4k_list, have_cards && NTV2_IS_4K_VIDEO_FORMAT(curr_vf));
|
sdi_4k_list, have_cards && NTV2_IS_4K_VIDEO_FORMAT(curr_vf));
|
||||||
|
|
||||||
@ -725,11 +725,12 @@ bool aja_io_selection_changed(void *data, obs_properties_t *props,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
obs_property_t *io_select_list =
|
|
||||||
obs_properties_get(props, kUIPropInput.id);
|
|
||||||
|
|
||||||
filter_io_selection_input_list(cardID, ajaSource->GetName(),
|
filter_io_selection_input_list(cardID, ajaSource->GetName(),
|
||||||
io_select_list);
|
obs_properties_get(props, kUIPropInput.id));
|
||||||
|
obs_property_set_visible(
|
||||||
|
obs_properties_get(props, kUIPropSDITransport.id),
|
||||||
|
aja::IsIOSelectionSDI(static_cast<IOSelection>(
|
||||||
|
obs_data_get_int(settings, kUIPropInput.id))));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user