examples: fix indentation of rpicamsrc examples

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/667>
This commit is contained in:
Tim-Philipp Müller 2020-07-10 00:42:13 +01:00
parent fbcc43d822
commit c22b71e181
3 changed files with 102 additions and 96 deletions

View file

@ -39,7 +39,8 @@ declare_value(CONTRAST, 0);
return current_##name; \ return current_##name; \
} }
gint compute_value(GstColorBalanceChannel* channel, gint current_value) gint
compute_value (GstColorBalanceChannel * channel, gint current_value)
{ {
#if CONTROL_SATURATION #if CONTROL_SATURATION
update (SATURATION, channel, current_value); update (SATURATION, channel, current_value);
@ -53,7 +54,8 @@ gint compute_value(GstColorBalanceChannel* channel, gint current_value)
return current_value; return current_value;
} }
static gboolean process(gpointer data) static gboolean
process (gpointer data)
{ {
GstColorBalance *balance = (GstColorBalance *) data; GstColorBalance *balance = (GstColorBalance *) data;
const GList *controls; const GList *controls;
@ -68,8 +70,7 @@ static gboolean process(gpointer data)
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
for (item = controls, index = 0; item != NULL; for (item = controls, index = 0; item != NULL; item = item->next, ++index) {
item = item->next, ++index) {
channel = item->data; channel = item->data;
current_value = gst_color_balance_get_value (balance, channel); current_value = gst_color_balance_get_value (balance, channel);
new_value = compute_value (channel, current_value); new_value = compute_value (channel, current_value);
@ -79,7 +80,8 @@ static gboolean process(gpointer data)
return G_SOURCE_CONTINUE; return G_SOURCE_CONTINUE;
} }
int main(int argc, char** argv) int
main (int argc, char **argv)
{ {
GMainLoop *loop; GMainLoop *loop;
GstElement *pipeline; GstElement *pipeline;

View file

@ -10,7 +10,8 @@
#define PIPELINE "rpicamsrc name=src preview=0 fullscreen=0 ! h264parse ! omxh264dec ! glimagesink sync=0" #define PIPELINE "rpicamsrc name=src preview=0 fullscreen=0 ! h264parse ! omxh264dec ! glimagesink sync=0"
void configure_orientation(GstVideoOrientation* orientation) void
configure_orientation (GstVideoOrientation * orientation)
{ {
gboolean flip; gboolean flip;
@ -35,7 +36,8 @@ void configure_orientation(GstVideoOrientation* orientation)
} }
} }
int main(int argc, char** argv) int
main (int argc, char **argv)
{ {
GMainLoop *loop; GMainLoop *loop;
GstElement *pipeline; GstElement *pipeline;

View file

@ -184,7 +184,9 @@ create_receiver_entry (SoupWebsocketConnection * connection)
G_CALLBACK (soup_websocket_message_cb), (gpointer) receiver_entry); G_CALLBACK (soup_websocket_message_cb), (gpointer) receiver_entry);
error = NULL; error = NULL;
receiver_entry->pipeline = gst_parse_launch ("webrtcbin name=webrtcbin stun-server=stun://" STUN_SERVER " " receiver_entry->pipeline =
gst_parse_launch ("webrtcbin name=webrtcbin stun-server=stun://"
STUN_SERVER " "
"rpicamsrc bitrate=600000 annotation-mode=12 preview=false ! video/x-h264,profile=constrained-baseline,width=640,height=360,level=3.0 ! queue max-size-time=100000000 ! h264parse ! " "rpicamsrc bitrate=600000 annotation-mode=12 preview=false ! video/x-h264,profile=constrained-baseline,width=640,height=360,level=3.0 ! queue max-size-time=100000000 ! h264parse ! "
"rtph264pay config-interval=-1 name=payloader ! " "rtph264pay config-interval=-1 name=payloader ! "
"application/x-rtp,media=video,encoding-name=H264,payload=" "application/x-rtp,media=video,encoding-name=H264,payload="