Skip to content
Snippets Groups Projects
Commit 9c4024f5 authored by Palana's avatar Palana
Browse files

Implement 'update_properties' for mac-avcapture

parent 59f2a6ac
No related branches found
No related tags found
No related merge requests found
......@@ -453,12 +453,9 @@ error_input:
AVFREE(capture->device);
}
static inline void handle_disconnect(struct av_capture* capture,
static inline void handle_disconnect_capture(struct av_capture *capture,
AVCaptureDevice *dev)
{
if (!dev)
return;
if (![dev.uniqueID isEqualTo:capture->uid])
return;
......@@ -474,12 +471,19 @@ static inline void handle_disconnect(struct av_capture* capture,
remove_device(capture);
}
static inline void handle_connect(struct av_capture *capture,
AVCaptureDevice *dev, obs_data_t *settings)
static inline void handle_disconnect(struct av_capture *capture,
AVCaptureDevice *dev)
{
if (!dev)
return;
handle_disconnect_capture(capture, dev);
obs_source_update_properties(capture->source);
}
static inline void handle_connect_capture(struct av_capture *capture,
AVCaptureDevice *dev, obs_data_t *settings)
{
if (![dev.uniqueID isEqualTo:capture->uid])
return;
......@@ -495,6 +499,16 @@ static inline void handle_connect(struct av_capture *capture,
capture_device(capture, [dev retain], settings);
}
static inline void handle_connect(struct av_capture *capture,
AVCaptureDevice *dev, obs_data_t *settings)
{
if (!dev)
return;
handle_connect_capture(capture, dev, settings);
obs_source_update_properties(capture->source);
}
static void av_capture_init(struct av_capture *capture, obs_data_t *settings)
{
if (!init_session(capture))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment