diff --git a/internal/gst/gst.c b/internal/gst/gst.c index a4f5b78b..b68dccee 100644 --- a/internal/gst/gst.c +++ b/internal/gst/gst.c @@ -50,14 +50,14 @@ GstFlowReturn gstreamer_send_new_sample_handler(GstElement *object, gpointer use gsize copy_size = 0; SampleHandlerUserData *s = (SampleHandlerUserData *)user_data; - g_signal_emit_by_name (object, "pull-sample", &sample); + g_signal_emit_by_name(object, "pull-sample", &sample); if (sample) { buffer = gst_sample_get_buffer(sample); if (buffer) { gst_buffer_extract_dup(buffer, 0, gst_buffer_get_size(buffer), ©, ©_size); goHandlePipelineBuffer(copy, copy_size, GST_BUFFER_DURATION(buffer), s->pipelineId); } - gst_sample_unref (sample); + gst_sample_unref(sample); } return GST_FLOW_OK; @@ -69,8 +69,8 @@ GstElement *gstreamer_send_create_pipeline(char *pipeline) { } void gstreamer_send_destroy_pipeline(GstElement *pipeline) { - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref (pipeline); + gst_element_set_state(pipeline, GST_STATE_NULL); + gst_object_unref(pipeline); } void gstreamer_send_start_pipeline(GstElement *pipeline, int pipelineId) { @@ -96,5 +96,3 @@ void gstreamer_send_play_pipeline(GstElement *pipeline) { void gstreamer_send_stop_pipeline(GstElement *pipeline) { gst_element_set_state(pipeline, GST_STATE_NULL); } - - diff --git a/internal/remote/manager.go b/internal/remote/manager.go index 5b5792de..19f803bd 100644 --- a/internal/remote/manager.go +++ b/internal/remote/manager.go @@ -7,6 +7,7 @@ import ( "github.com/kataras/go-events" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "demodesk/neko/internal/gst" "demodesk/neko/internal/types" "demodesk/neko/internal/types/config" diff --git a/internal/session/session.go b/internal/session/session.go index 35eb18d4..869d7fda 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -2,6 +2,7 @@ package session import ( "github.com/rs/zerolog" + "demodesk/neko/internal/types" "demodesk/neko/internal/types/event" "demodesk/neko/internal/types/message" diff --git a/internal/xorg/xorg.c b/internal/xorg/xorg.c index 58421f5f..6c7b72eb 100644 --- a/internal/xorg/xorg.c +++ b/internal/xorg/xorg.c @@ -54,7 +54,7 @@ void XDisplaySet(char *input) { void XMove(int x, int y) { Display *display = getXDisplay(); - XWarpPointer(display, None, DefaultRootWindow(display), 0, 0, 0, 0, x, y); + XWarpPointer(display, None, DefaultRootWindow(display), 0, 0, 0, 0, x, y); XSync(display, 0); } @@ -102,7 +102,7 @@ void XKey(unsigned long key, int down) { KeyCode code = XKeysymToKeycode(display, key); // Map non-existing keysyms to new keycodes - if(code == 0) { + if (code == 0) { int min, max, numcodes; XDisplayKeycodes(display, &min, &max); XGetKeyboardMapping(display, min, max-min, &numcodes); @@ -129,19 +129,19 @@ char *XClipboardGet() { } void XGetScreenConfigurations() { - Display *display = getXDisplay(); - Window root = RootWindow(display, 0); + Display *display = getXDisplay(); + Window root = RootWindow(display, 0); XRRScreenSize *xrrs; - int num_sizes; + int num_sizes; xrrs = XRRSizes(display, 0, &num_sizes); - for(int i = 0; i < num_sizes; i ++) { + for (int i = 0; i < num_sizes; i++) { short *rates; - int num_rates; + int num_rates; goCreateScreenSize(i, xrrs[i].width, xrrs[i].height, xrrs[i].mwidth, xrrs[i].mheight); rates = XRRRates(display, 0, i, &num_rates); - for (int j = 0; j < num_rates; j ++) { + for (int j = 0; j < num_rates; j++) { goSetScreenRates(i, j, rates[j]); } } @@ -155,14 +155,14 @@ void XSetScreenConfiguration(int index, short rate) { int XGetScreenSize() { Display *display = getXDisplay(); - XRRScreenConfiguration *conf = XRRGetScreenInfo(display, RootWindow(display, 0)); + XRRScreenConfiguration *conf = XRRGetScreenInfo(display, RootWindow(display, 0)); Rotation original_rotation; return XRRConfigCurrentConfiguration(conf, &original_rotation); } short XGetScreenRate() { Display *display = getXDisplay(); - XRRScreenConfiguration *conf = XRRGetScreenInfo(display, RootWindow(display, 0)); + XRRScreenConfiguration *conf = XRRGetScreenInfo(display, RootWindow(display, 0)); return XRRConfigCurrentRate(conf); }