summaryrefslogtreecommitdiff
path: root/src/conversation/gnunet_gst.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/conversation/gnunet_gst.c
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
tighten formatting rules
Diffstat (limited to 'src/conversation/gnunet_gst.c')
-rw-r--r--src/conversation/gnunet_gst.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/conversation/gnunet_gst.c b/src/conversation/gnunet_gst.c
index 7703215bb..d776189cd 100644
--- a/src/conversation/gnunet_gst.c
+++ b/src/conversation/gnunet_gst.c
@@ -62,6 +62,7 @@ BREAKOUT:
return;
}
+
/***
* load gnunet configuration
*/
@@ -142,6 +143,7 @@ gg_load_configuration (GNUNET_gstData *d)
// GNUNET_CONFIGURATION_write(cfg, "mediahelper.conf");
}
+
static void
write_data (const char *ptr, size_t msg_size)
{
@@ -163,7 +165,6 @@ write_data (const char *ptr, size_t msg_size)
}
-
extern GstFlowReturn
on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
{
@@ -179,9 +180,7 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
char *si_str;
GstCaps *s_caps;
char *caps_str;
- */
-
- if (gst_app_sink_is_eos (GST_APP_SINK (element)))
+ */if (gst_app_sink_is_eos (GST_APP_SINK (element)))
return GST_FLOW_OK;
// pull sample from appsink
@@ -198,7 +197,6 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
GST_WARNING ("caps are %" GST_PTR_FORMAT, gst_sample_get_caps (s));
-
gst_buffer_map (b, &map, GST_MAP_READ);
size_t len;
@@ -226,6 +224,7 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
return GST_FLOW_OK;
}
+
/***
* Dump a pipeline graph
*/
@@ -248,7 +247,6 @@ pl_graph (GstElement *pipeline)
}
-
extern gboolean
gnunet_gst_bus_call (GstBus *bus, GstMessage *msg, gpointer data)
{
@@ -286,6 +284,7 @@ gnunet_gst_bus_call (GstBus *bus, GstMessage *msg, gpointer data)
return TRUE;
}
+
/* called when pipeline changes state */
extern void
state_changed_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *d)
@@ -326,6 +325,7 @@ state_changed_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *d)
}
}
+
static void
application_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -333,6 +333,7 @@ application_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
static void
error_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -340,6 +341,7 @@ error_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
static void
eos_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -347,6 +349,7 @@ eos_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
extern void
gg_setup_gst_bus (GNUNET_gstData *d)
{
@@ -367,6 +370,7 @@ gg_setup_gst_bus (GNUNET_gstData *d)
gst_object_unref (bus);
}
+
/*
* take buffer from gstreamer and feed it to gnunet
*/
@@ -543,7 +547,6 @@ feed_buffer_to_gst (const char *audio, size_t b_len, GNUNET_gstData *d)
}
-
/**
* debug making elements
*/
@@ -567,6 +570,7 @@ gst_element_factory_make_debug (gchar *factoryname, gchar *name)
}
}
+
/*
static gboolean
gst_element_link_many_debug(...)
@@ -585,6 +589,7 @@ lf (char *msg)
exit (10);
}
+
/***
* used to set properties on autoaudiosink's chosen sink
*/
@@ -601,6 +606,7 @@ autoaudiosink_child_added (GstChildProxy *child_proxy,
NULL);
}
+
/***
* used to set properties on autoaudiosource's chosen sink
*/
@@ -624,6 +630,7 @@ get_pipeline (GstElement *element)
return GST_ELEMENT (p);
}
+
static void
decoder_ogg_pad_added (GstElement *element,
GstPad *pad,
@@ -682,6 +689,7 @@ gnunet_read (GNUNET_gstData *d)
return 0;
}
+
/**
* Message callback
*
@@ -802,6 +810,7 @@ get_app (GNUNET_gstData *d, int type)
return bin;
}
+
extern GstBin *
get_coder (GNUNET_gstData *d, int type)
{
@@ -824,8 +833,7 @@ get_coder (GNUNET_gstData *d, int type)
"sprop-stereo", G_TYPE_STRING, "0",
"encoding-params", G_TYPE_STRING, "2",
NULL);
- */
- rtpcaps = gst_caps_new_simple ("application/x-rtp",
+ */ rtpcaps = gst_caps_new_simple ("application/x-rtp",
"media", G_TYPE_STRING, "audio",
"clock-rate", G_TYPE_INT, SAMPLING_RATE,
"encoding-name", G_TYPE_STRING, "OPUS",
@@ -1013,8 +1021,7 @@ get_audiobin (GNUNET_gstData *d, int type)
"enough-data",
G_CALLBACK(appsrc_enough_data),
NULL);
- */
-/*
+ *//*
g_signal_connect (queue,
"notify::current-level-bytes",
G_CALLBACK(queue_current_level),
@@ -1039,11 +1046,7 @@ get_audiobin (GNUNET_gstData *d, int type)
"pushing",
G_CALLBACK(queue_pushing),
NULL);
- */
- }
-
-
-
+ */ }
gst_bin_add_many (bin, conv, resampler, sink, NULL);