commit
9025d92f7a
|
@ -220,8 +220,7 @@ void populate_multi_view_audio_sources(obs_property_t *list, NTV2DeviceID id)
|
|||
}
|
||||
|
||||
bool on_misc_device_selected(void *data, obs_properties_t *props,
|
||||
obs_property_t *list OBS_UNUSED,
|
||||
obs_data_t *settings)
|
||||
obs_property_t *, obs_data_t *settings)
|
||||
{
|
||||
const char *cardID = obs_data_get_string(settings, kUIPropDevice.id);
|
||||
if (!cardID || !cardID[0])
|
||||
|
@ -451,7 +450,7 @@ static void OBSEvent(enum obs_frontend_event event, void *)
|
|||
}
|
||||
}
|
||||
|
||||
static void aja_loaded(void *data OBS_UNUSED, calldata_t *calldata)
|
||||
static void aja_loaded(void * /* data */, calldata_t *calldata)
|
||||
{
|
||||
// Receive CardManager pointer from the main AJA plugin
|
||||
calldata_get_ptr(calldata, "card_manager", &cardManager);
|
||||
|
|
|
@ -233,9 +233,12 @@ extern bool import_python(const char *python_path);
|
|||
#define _Py_NoneStruct (*Import__Py_NoneStruct)
|
||||
#define PyTuple_New Import_PyTuple_New
|
||||
#if PY_VERSION_HEX >= 0x030800f0
|
||||
static inline void Import__Py_DECREF(const char *filename OBS_UNUSED,
|
||||
int lineno OBS_UNUSED, PyObject *op)
|
||||
static inline void Import__Py_DECREF(const char *filename, int lineno,
|
||||
PyObject *op)
|
||||
{
|
||||
UNUSED_PARAMETER(filename);
|
||||
UNUSED_PARAMETER(lineno);
|
||||
|
||||
if (--op->ob_refcnt != 0) {
|
||||
#ifdef Py_REF_DEBUG
|
||||
if (op->ob_refcnt < 0) {
|
||||
|
|
|
@ -178,10 +178,12 @@ create_dmabuf_egl_image(EGLDisplay egl_display, unsigned int width,
|
|||
}
|
||||
|
||||
struct gs_texture *gl_egl_create_texture_from_eglimage(
|
||||
EGLDisplay egl_display OBS_UNUSED, uint32_t width, uint32_t height,
|
||||
EGLDisplay egl_display, uint32_t width, uint32_t height,
|
||||
enum gs_color_format color_format, EGLint target, EGLImage image)
|
||||
{
|
||||
UNUSED_PARAMETER(egl_display);
|
||||
UNUSED_PARAMETER(target);
|
||||
|
||||
struct gs_texture *texture = NULL;
|
||||
texture = gs_texture_create(width, height, color_format, 1, NULL,
|
||||
GS_DYNAMIC);
|
||||
|
|
|
@ -120,9 +120,11 @@ extern void device_present(gs_device_t *device)
|
|||
gl_vtable->device_present(device);
|
||||
}
|
||||
|
||||
extern bool device_is_monitor_hdr(gs_device_t *device OBS_UNUSED,
|
||||
void *monitor OBS_UNUSED)
|
||||
extern bool device_is_monitor_hdr(gs_device_t *device, void *monitor)
|
||||
{
|
||||
UNUSED_PARAMETER(device);
|
||||
UNUSED_PARAMETER(monitor);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -384,11 +384,16 @@ static bool gl_wayland_egl_device_query_dmabuf_modifiers_for_format(
|
|||
}
|
||||
|
||||
static struct gs_texture *gl_wayland_egl_device_texture_create_from_pixmap(
|
||||
gs_device_t *device OBS_UNUSED, uint32_t width OBS_UNUSED,
|
||||
uint32_t height OBS_UNUSED,
|
||||
enum gs_color_format color_format OBS_UNUSED,
|
||||
uint32_t target OBS_UNUSED, void *pixmap OBS_UNUSED)
|
||||
gs_device_t *device, uint32_t width, uint32_t height,
|
||||
enum gs_color_format color_format, uint32_t target, void *pixmap)
|
||||
{
|
||||
UNUSED_PARAMETER(device);
|
||||
UNUSED_PARAMETER(width);
|
||||
UNUSED_PARAMETER(height);
|
||||
UNUSED_PARAMETER(color_format);
|
||||
UNUSED_PARAMETER(target);
|
||||
UNUSED_PARAMETER(pixmap);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,9 +152,9 @@ static void *ffmpeg_image_copy_data_straight(struct ffmpeg_image *info,
|
|||
return data;
|
||||
}
|
||||
|
||||
static inline size_t get_dst_position(size_t src OBS_UNUSED, const size_t w,
|
||||
const size_t h, const size_t x,
|
||||
const size_t y, int orient)
|
||||
static inline size_t get_dst_position(const size_t w, const size_t h,
|
||||
const size_t x, const size_t y,
|
||||
int orient)
|
||||
{
|
||||
size_t res_x = 0;
|
||||
size_t res_y = 0;
|
||||
|
@ -343,8 +343,7 @@ static void *ffmpeg_image_orient(struct ffmpeg_image *info, void *in_data,
|
|||
for (size_t x = x0; x < lim_x; x++) {
|
||||
off_src = (x + y * sx) * 4;
|
||||
|
||||
off_dst = get_dst_position(off_src,
|
||||
info->cx,
|
||||
off_dst = get_dst_position(info->cx,
|
||||
info->cy, x,
|
||||
y, orient);
|
||||
|
||||
|
|
|
@ -1499,10 +1499,14 @@ static bool scene_audio_render(void *data, uint64_t *ts_out,
|
|||
return true;
|
||||
}
|
||||
|
||||
enum gs_color_space scene_video_get_color_space(
|
||||
void *data OBS_UNUSED, size_t count OBS_UNUSED,
|
||||
const enum gs_color_space *preferred_spaces OBS_UNUSED)
|
||||
enum gs_color_space
|
||||
scene_video_get_color_space(void *data, size_t count,
|
||||
const enum gs_color_space *preferred_spaces)
|
||||
{
|
||||
UNUSED_PARAMETER(data);
|
||||
UNUSED_PARAMETER(count);
|
||||
UNUSED_PARAMETER(preferred_spaces);
|
||||
|
||||
enum gs_color_space space = GS_CS_SRGB;
|
||||
struct obs_video_info ovi;
|
||||
if (obs_get_video_info(&ovi)) {
|
||||
|
@ -2059,8 +2063,7 @@ static inline bool source_has_audio(obs_source_t *source)
|
|||
|
||||
static obs_sceneitem_t *obs_scene_add_internal(obs_scene_t *scene,
|
||||
obs_source_t *source,
|
||||
obs_sceneitem_t *insert_after,
|
||||
bool create_texture OBS_UNUSED)
|
||||
obs_sceneitem_t *insert_after)
|
||||
{
|
||||
struct obs_scene_item *last;
|
||||
struct obs_scene_item *item;
|
||||
|
@ -2158,8 +2161,7 @@ release_source_and_fail:
|
|||
|
||||
obs_sceneitem_t *obs_scene_add(obs_scene_t *scene, obs_source_t *source)
|
||||
{
|
||||
obs_sceneitem_t *item =
|
||||
obs_scene_add_internal(scene, source, NULL, true);
|
||||
obs_sceneitem_t *item = obs_scene_add_internal(scene, source, NULL);
|
||||
struct calldata params;
|
||||
uint8_t stack[128];
|
||||
|
||||
|
@ -3286,8 +3288,8 @@ obs_sceneitem_t *obs_scene_insert_group(obs_scene_t *scene, const char *name,
|
|||
obs_scene_t *sub_scene = create_id("group", name);
|
||||
obs_sceneitem_t *last_item = items ? items[count - 1] : NULL;
|
||||
|
||||
obs_sceneitem_t *item = obs_scene_add_internal(scene, sub_scene->source,
|
||||
last_item, true);
|
||||
obs_sceneitem_t *item =
|
||||
obs_scene_add_internal(scene, sub_scene->source, last_item);
|
||||
|
||||
obs_scene_release(sub_scene);
|
||||
|
||||
|
@ -3409,8 +3411,7 @@ void obs_sceneitem_group_ungroup(obs_sceneitem_t *item)
|
|||
obs_sceneitem_t *dst;
|
||||
|
||||
remove_group_transform(item, last);
|
||||
dst = obs_scene_add_internal(scene, last->source, insert_after,
|
||||
false);
|
||||
dst = obs_scene_add_internal(scene, last->source, insert_after);
|
||||
duplicate_item_data(dst, last, true, true, true);
|
||||
apply_group_transform(last, item);
|
||||
|
||||
|
|
|
@ -599,8 +599,7 @@ static const uint8_t *set_gpu_converted_plane(uint32_t width, uint32_t height,
|
|||
return in;
|
||||
}
|
||||
|
||||
static void set_gpu_converted_data(struct obs_core_video *video OBS_UNUSED,
|
||||
struct video_frame *output,
|
||||
static void set_gpu_converted_data(struct video_frame *output,
|
||||
const struct video_data *input,
|
||||
const struct video_output_info *info)
|
||||
{
|
||||
|
@ -777,8 +776,8 @@ static inline void output_video_data(struct obs_core_video *video,
|
|||
input_frame->timestamp);
|
||||
if (locked) {
|
||||
if (video->gpu_conversion) {
|
||||
set_gpu_converted_data(video, &output_frame,
|
||||
input_frame, info);
|
||||
set_gpu_converted_data(&output_frame, input_frame,
|
||||
info);
|
||||
} else {
|
||||
copy_rgbx_frame(&output_frame, input_frame, info);
|
||||
}
|
||||
|
|
|
@ -162,6 +162,7 @@ void *bmemdup(const void *ptr, size_t size)
|
|||
return out;
|
||||
}
|
||||
|
||||
OBS_DEPRECATED void base_set_allocator(struct base_allocator *defs OBS_UNUSED)
|
||||
OBS_DEPRECATED void base_set_allocator(struct base_allocator *defs)
|
||||
{
|
||||
UNUSED_PARAMETER(defs);
|
||||
}
|
||||
|
|
|
@ -24,12 +24,10 @@
|
|||
#define UNUSED_PARAMETER(param) (void)param
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define OBS_UNUSED
|
||||
#define _OBS_DEPRECATED __declspec(deprecated)
|
||||
#define OBS_NORETURN __declspec(noreturn)
|
||||
#define FORCE_INLINE __forceinline
|
||||
#else
|
||||
#define OBS_UNUSED __attribute__((unused))
|
||||
#define _OBS_DEPRECATED __attribute__((deprecated))
|
||||
#define OBS_NORETURN __attribute__((noreturn))
|
||||
#define FORCE_INLINE inline __attribute__((always_inline))
|
||||
|
|
|
@ -201,9 +201,8 @@ void populate_pixel_format_list(NTV2DeviceID deviceID, obs_property_t *list)
|
|||
}
|
||||
}
|
||||
|
||||
void populate_sdi_transport_list(obs_property_t *list,
|
||||
IOSelection io OBS_UNUSED,
|
||||
NTV2DeviceID deviceID, bool capture)
|
||||
void populate_sdi_transport_list(obs_property_t *list, NTV2DeviceID deviceID,
|
||||
bool capture)
|
||||
{
|
||||
if (capture) {
|
||||
obs_property_list_add_int(list, obs_module_text("Auto"),
|
||||
|
@ -1019,9 +1018,9 @@ inline bool IsStandard1080p(NTV2Standard standard)
|
|||
return false;
|
||||
}
|
||||
|
||||
VPIDStandard DetermineVPIDStandard(NTV2DeviceID id OBS_UNUSED, IOSelection io,
|
||||
NTV2VideoFormat vf, NTV2PixelFormat pf,
|
||||
SDITransport trx, SDITransport4K t4k)
|
||||
VPIDStandard DetermineVPIDStandard(IOSelection io, NTV2VideoFormat vf,
|
||||
NTV2PixelFormat pf, SDITransport trx,
|
||||
SDITransport4K t4k)
|
||||
{
|
||||
VPIDStandard vpid = VPIDStandard_Unknown;
|
||||
auto rd = aja::DetermineRasterDefinition(vf);
|
||||
|
|
|
@ -45,7 +45,7 @@ populate_video_format_list(NTV2DeviceID deviceID, obs_property_t *list,
|
|||
bool want4KHFR = false);
|
||||
extern void populate_pixel_format_list(NTV2DeviceID deviceID,
|
||||
obs_property_t *list);
|
||||
extern void populate_sdi_transport_list(obs_property_t *list, IOSelection io,
|
||||
extern void populate_sdi_transport_list(obs_property_t *list,
|
||||
NTV2DeviceID deviceID,
|
||||
bool capture = false);
|
||||
extern void populate_sdi_4k_transport_list(obs_property_t *list);
|
||||
|
@ -105,8 +105,7 @@ extern bool IsIOSelectionHDMI(IOSelection io);
|
|||
extern std::string MakeCardID(CNTV2Card &card);
|
||||
|
||||
extern RasterDefinition DetermineRasterDefinition(NTV2VideoFormat vf);
|
||||
extern VPIDStandard DetermineVPIDStandard(NTV2DeviceID id, IOSelection io,
|
||||
NTV2VideoFormat vf,
|
||||
extern VPIDStandard DetermineVPIDStandard(IOSelection io, NTV2VideoFormat vf,
|
||||
NTV2PixelFormat pf, SDITransport trx,
|
||||
SDITransport4K t4k);
|
||||
extern std::vector<NTV2DeviceID> MultiViewCards();
|
||||
|
|
|
@ -67,7 +67,7 @@ static void update_sdi_transport_and_sdi_transport_4k(obs_properties_t *props,
|
|||
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);
|
||||
populate_sdi_transport_list(sdi_trx_list, device_id);
|
||||
obs_property_t *sdi_4k_trx_list =
|
||||
obs_properties_get(props, kUIPropSDITransport4K.id);
|
||||
obs_property_list_clear(sdi_4k_trx_list);
|
||||
|
|
|
@ -233,7 +233,7 @@ bool Routing::ConfigureSourceRoute(const SourceProps &props, NTV2Mode mode,
|
|||
}
|
||||
if (vpidStandard == VPIDStandard_Unknown) {
|
||||
vpidStandard = DetermineVPIDStandard(
|
||||
deviceID, props.ioSelect, props.videoFormat,
|
||||
props.ioSelect, props.videoFormat,
|
||||
props.pixelFormat, props.sdiTransport,
|
||||
props.sdi4kTransport);
|
||||
}
|
||||
|
@ -375,11 +375,9 @@ bool Routing::ConfigureOutputRoute(const OutputProps &props, NTV2Mode mode,
|
|||
HDMIWireFormat hwf = HDMIWireFormat::Unknown;
|
||||
if (NTV2_OUTPUT_DEST_IS_SDI(init_dest)) {
|
||||
kind = ConnectionKind::SDI;
|
||||
vpidStandard = DetermineVPIDStandard(deviceID, props.ioSelect,
|
||||
props.videoFormat,
|
||||
props.pixelFormat,
|
||||
props.sdiTransport,
|
||||
props.sdi4kTransport);
|
||||
vpidStandard = DetermineVPIDStandard(
|
||||
props.ioSelect, props.videoFormat, props.pixelFormat,
|
||||
props.sdiTransport, props.sdi4kTransport);
|
||||
} else if (NTV2_OUTPUT_DEST_IS_HDMI(init_dest)) {
|
||||
kind = ConnectionKind::HDMI;
|
||||
hwf = HDMIWireFormat::Unknown;
|
||||
|
|
|
@ -694,7 +694,7 @@ bool aja_source_device_changed(void *data, obs_properties_t *props,
|
|||
IOSelection io_select = static_cast<IOSelection>(
|
||||
obs_data_get_int(settings, kUIPropInput.id));
|
||||
obs_property_list_clear(sdi_trx_list);
|
||||
populate_sdi_transport_list(sdi_trx_list, io_select, deviceID, true);
|
||||
populate_sdi_transport_list(sdi_trx_list, deviceID, true);
|
||||
|
||||
obs_property_list_clear(sdi_4k_list);
|
||||
populate_sdi_4k_transport_list(sdi_4k_list);
|
||||
|
|
|
@ -331,10 +331,13 @@ static obs_missing_files_t *image_source_missingfiles(void *data)
|
|||
return files;
|
||||
}
|
||||
|
||||
static enum gs_color_space image_source_get_color_space(
|
||||
void *data, size_t count OBS_UNUSED,
|
||||
const enum gs_color_space *preferred_spaces OBS_UNUSED)
|
||||
static enum gs_color_space
|
||||
image_source_get_color_space(void *data, size_t count,
|
||||
const enum gs_color_space *preferred_spaces)
|
||||
{
|
||||
UNUSED_PARAMETER(count);
|
||||
UNUSED_PARAMETER(preferred_spaces);
|
||||
|
||||
struct image_source *const s = data;
|
||||
gs_image_file4_t *const if4 = &s->if4;
|
||||
return if4->image3.image2.image.texture ? if4->space : GS_CS_SRGB;
|
||||
|
|
|
@ -382,9 +382,11 @@ static enum gs_color_format gs_format_from_tex()
|
|||
}
|
||||
}
|
||||
|
||||
static int silence_x11_errors(Display *display OBS_UNUSED,
|
||||
XErrorEvent *err OBS_UNUSED)
|
||||
static int silence_x11_errors(Display *display, XErrorEvent *err)
|
||||
{
|
||||
UNUSED_PARAMETER(display);
|
||||
UNUSED_PARAMETER(err);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -175,9 +175,8 @@ static void *av1_create_internal(obs_data_t *settings, obs_encoder_t *encoder,
|
|||
if (strcmp(enc_lib, "libsvtav1") == 0)
|
||||
enc->svtav1 = true;
|
||||
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings, encoder,
|
||||
enc_lib, NULL, enc_name, NULL,
|
||||
on_first_packet))
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, enc_lib, NULL,
|
||||
enc_name, NULL, on_first_packet))
|
||||
goto fail;
|
||||
if (!av1_update(enc, settings))
|
||||
goto fail;
|
||||
|
|
|
@ -284,20 +284,20 @@ static void *nvenc_create_internal(obs_data_t *settings, obs_encoder_t *encoder,
|
|||
#ifdef ENABLE_HEVC
|
||||
enc->hevc = hevc;
|
||||
if (hevc) {
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings,
|
||||
encoder, "hevc_nvenc",
|
||||
"nvenc_hevc", ENCODER_NAME_HEVC,
|
||||
on_init_error, on_first_packet))
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder,
|
||||
"hevc_nvenc", "nvenc_hevc",
|
||||
ENCODER_NAME_HEVC, on_init_error,
|
||||
on_first_packet))
|
||||
goto fail;
|
||||
} else
|
||||
#else
|
||||
UNUSED_PARAMETER(hevc);
|
||||
#endif
|
||||
{
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, settings,
|
||||
encoder, "h264_nvenc",
|
||||
"nvenc_h264", ENCODER_NAME_H264,
|
||||
on_init_error, on_first_packet))
|
||||
if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder,
|
||||
"h264_nvenc", "nvenc_h264",
|
||||
ENCODER_NAME_H264, on_init_error,
|
||||
on_first_packet))
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,6 @@ void ffmpeg_video_encoder_free(struct ffmpeg_video_encoder *enc)
|
|||
}
|
||||
|
||||
bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc, void *parent,
|
||||
obs_data_t *settings OBS_UNUSED,
|
||||
obs_encoder_t *encoder, const char *enc_lib,
|
||||
const char *enc_lib2, const char *enc_name,
|
||||
init_error_cb on_init_error,
|
||||
|
|
|
@ -39,8 +39,7 @@ struct ffmpeg_video_encoder {
|
|||
};
|
||||
|
||||
extern bool ffmpeg_video_encoder_init(struct ffmpeg_video_encoder *enc,
|
||||
void *parent, obs_data_t *settings,
|
||||
obs_encoder_t *encoder,
|
||||
void *parent, obs_encoder_t *encoder,
|
||||
const char *enc_lib, const char *enc_lib2,
|
||||
const char *enc_name,
|
||||
init_error_cb on_init_error,
|
||||
|
|
Loading…
Reference in New Issue