From 06e635aaf5d930020c090ea20dbbc81734e9159c Mon Sep 17 00:00:00 2001 From: univrsal Date: Wed, 1 Nov 2023 22:06:00 +0100 Subject: [PATCH] ci stuff --- .github/scripts/.Brewfile | 1 + .github/workflows/push.yaml | 7 ------- src/mpv-source.c | 25 ++++++++++++------------- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/scripts/.Brewfile b/.github/scripts/.Brewfile index 8368e3d..347f7fa 100644 --- a/.github/scripts/.Brewfile +++ b/.github/scripts/.Brewfile @@ -4,3 +4,4 @@ brew "cmake" brew "git" brew "jq" brew "xcbeautify" +brew "mpv" diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 9e76855..103aef7 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -14,13 +14,6 @@ concurrency: group: '${{ github.workflow }} @ ${{ github.ref }}' cancel-in-progress: ${{ github.ref_type == 'tag' }} jobs: - check-format: - name: Check Formatting 🔍 - if: github.ref_name == 'master' - uses: ./.github/workflows/check-format.yaml - permissions: - contents: read - build-project: name: Build Project 🧱 uses: ./.github/workflows/build-project.yaml diff --git a/src/mpv-source.c b/src/mpv-source.c index fdd08a8..129d060 100644 --- a/src/mpv-source.c +++ b/src/mpv-source.c @@ -50,7 +50,7 @@ struct mpv_source { // jack source for audio obs_source_t* jack_source; - char* jack_port_name; // name of the jack capture source + char* jack_port_name; // name of the jack capture source char* jack_client_name; // name of the jack client mpv opens for audio output }; @@ -59,7 +59,7 @@ struct mpv_source { #define MPV_SEND_COMMAND_ASYNC(...) \ do { \ if (!context->init) \ - break; \ + break; \ int __mpv_result = mpv_command_async(context->mpv, 0, (const char*[]) { __VA_ARGS__, NULL }); \ if (__mpv_result != 0) \ obs_log(LOG_ERROR, "Failed to run mpv command: %s", mpv_error_string(__mpv_result)); \ @@ -84,11 +84,11 @@ struct mpv_source { } while (0) #define MPV_SET_OPTION(name, val) \ - do { \ - if (!context->init) \ - break; \ + do { \ + if (!context->init) \ + break; \ int __mpv_result = mpv_set_option_string(context->mpv, name, val); \ - if (__mpv_result < 0) \ + if (__mpv_result < 0) \ obs_log(LOG_ERROR, "Failed to set mpv option %s: %s", name, mpv_error_string(__mpv_result)); \ } while (0) @@ -118,7 +118,8 @@ static void* get_proc_address_mpvs(void* ctx, const char* name) return addr; } -static void mpv_audio_callback(void *data, int samples, int sample_format, void *audio_data) { +static void mpv_audio_callback(void* data, int samples, int sample_format, void* audio_data) +{ struct mpv_source* context = data; UNUSED_PARAMETER(samples); UNUSED_PARAMETER(sample_format); @@ -202,7 +203,7 @@ static inline void mpvs_handle_events(struct mpv_source* context) } if (event->event_id == MPV_EVENT_PROPERTY_CHANGE) { - mpv_event_property *prop = (mpv_event_property *)event->data; + mpv_event_property* prop = (mpv_event_property*)event->data; if (strcmp(prop->name, "audio-data") == 0) { os_breakpoint(); } @@ -291,7 +292,6 @@ static void mpvs_init(struct mpv_source* context) MPV_SET_PROP_STR("jack-port", context->jack_port_name); MPV_SET_PROP_STR("jack-name", context->jack_client_name); - mpv_set_wakeup_callback(context->mpv, handle_mpvs_events, context); mpv_render_context_set_update_callback(context->mpv_gl, on_mpvs_render_events, context); } @@ -600,10 +600,9 @@ static void mpvs_mouse_move(void* data, const struct obs_mouse_event* event, MPV_SEND_COMMAND_ASYNC("mouse", pos, pos2); } - -static void mpvs_enum_active_sources(void *data, - obs_source_enum_proc_t enum_callback, - void *param) +static void mpvs_enum_active_sources(void* data, + obs_source_enum_proc_t enum_callback, + void* param) { struct mpv_source* context = data; enum_callback(context->src, context->jack_source, param);