mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix formatting.
This commit is contained in:
parent
cd769c05d3
commit
78c397ef54
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
@ -135,13 +135,13 @@ void XGetScreenConfigurations() {
|
||||
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;
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user