mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-14 02:14:39 -04:00
libobs: Add video_output_disconnect2()
This commit is contained in:
@@ -178,6 +178,17 @@ Video Handler
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: bool video_output_disconnect2(video_t *video, void (*callback)(void *param, struct video_data *frame), void *param)
|
||||
|
||||
Disconnects a raw video callback from the video output handler.
|
||||
|
||||
:param video: Video output handler object
|
||||
:param callback: Callback
|
||||
:param param: Private data
|
||||
:return: *true* if callback was removed, *false* otherwise (e.g., already removed)
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: const struct video_output_info *video_output_get_info(const video_t *video)
|
||||
|
||||
Gets the full video information of the video output handler.
|
||||
|
||||
@@ -463,9 +463,14 @@ static void log_skipped(video_t *video)
|
||||
}
|
||||
|
||||
void video_output_disconnect(video_t *video, void (*callback)(void *param, struct video_data *frame), void *param)
|
||||
{
|
||||
video_output_disconnect2(video, callback, param);
|
||||
}
|
||||
|
||||
bool video_output_disconnect2(video_t *video, void (*callback)(void *param, struct video_data *frame), void *param)
|
||||
{
|
||||
if (!video || !callback)
|
||||
return;
|
||||
return false;
|
||||
|
||||
video = get_root(video);
|
||||
|
||||
@@ -485,6 +490,8 @@ void video_output_disconnect(video_t *video, void (*callback)(void *param, struc
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&video->input_mutex);
|
||||
|
||||
return idx != DARRAY_INVALID;
|
||||
}
|
||||
|
||||
bool video_output_active(const video_t *video)
|
||||
|
||||
@@ -305,6 +305,8 @@ EXPORT bool video_output_connect2(video_t *video, const struct video_scale_info
|
||||
void *param);
|
||||
EXPORT void video_output_disconnect(video_t *video, void (*callback)(void *param, struct video_data *frame),
|
||||
void *param);
|
||||
EXPORT bool video_output_disconnect2(video_t *video, void (*callback)(void *param, struct video_data *frame),
|
||||
void *param);
|
||||
|
||||
EXPORT bool video_output_active(const video_t *video);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user