diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-11 11:29:18 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-11 11:31:01 (GMT) |
commit | f13ff0e899d182ed567e7f5ae7b1452aad9f4516 (patch) | |
tree | ad69a3959a48ba801d895fa1a80bd8f4d57aec25 /src/main.c | |
parent | 4d3eb464ab471e1754f25d6dc9673fc2533e0b5c (diff) | |
download | soup-transcoding-proxy-f13ff0e899d182ed567e7f5ae7b1452aad9f4516.zip soup-transcoding-proxy-f13ff0e899d182ed567e7f5ae7b1452aad9f4516.tar.gz |
Remove trailing whitespace to make git happy
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -1,4 +1,4 @@ -/* +/* * vim: set sts=2 sw=2 et : * * License: LGPL-2.1+ @@ -92,7 +92,7 @@ tee_src_pad_blocked_cb (GstPad *srcpad, g_print ("Linked pads, removed probe. State was %s:%s.\n", gst_element_state_change_return_get_name (ret), gst_element_state_get_name (state)); - + if (gst_element_set_state (server_ctx->pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { g_critical ("Unable to set pipeline back to PLAYING\n"); @@ -171,12 +171,12 @@ write_client_chunk_cb (GstElement *appsink, GstBuffer *buffer; GstMemory *memory; gboolean eos; - + if (!g_mutex_trylock (&ctx->can_write_chunk)) { g_print ("!"); /* We cannot safely append to the message body till * the previous chunk is written out, otherwise we get - * a segfault. This is likely because SoupMessageBody + * a segfault. This is likely because SoupMessageBody * uses a GSList for the chunks, which isn't MT-safe. */ return GST_FLOW_OK; } @@ -246,7 +246,7 @@ handle_request_cb (SoupServer *server, GHashTable *ctx_table) { TranscodeServerCtx *server_ctx; - + if (!msg) return; @@ -282,7 +282,7 @@ GET: GstPad *srcpad, *sinkpadq2; TranscodeClientCtx *client_ctx; GstStateChangeReturn state; - + server_ctx = get_server_ctx_from_msg (msg, ctx_table); if (server_ctx == NULL || server_ctx->pipeline == NULL) { @@ -306,13 +306,13 @@ GET: default: g_assert_not_reached (); } - + /* Connect appsink to tee, and start streaming */ client_ctx = g_new0 (TranscodeClientCtx, 1); client_ctx->msg = msg; client_ctx->server_ctx = server_ctx; g_mutex_init (&client_ctx->can_write_chunk); - + bin = gst_bin_new (NULL); /* queue ! appsink */ @@ -344,7 +344,7 @@ GET: template = gst_pad_template_new ("teesrc", GST_PAD_SRC, GST_PAD_REQUEST, GST_CAPS_ANY); srcpad = gst_element_request_pad (tee, template, NULL, GST_CAPS_ANY); - + gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_BLOCK, (GstPadProbeCallback) tee_src_pad_blocked_cb, client_ctx, NULL); @@ -366,8 +366,8 @@ GET: server_ctx->clients = g_list_prepend (server_ctx->clients, client_ctx); - /* Since we set the response as chunked, the server will - * automatically pause the message for us, and the response + /* Since we set the response as chunked, the server will + * automatically pause the message for us, and the response * won't be completed till we call soup_message_body_complete() */ soup_message_set_status (msg, SOUP_STATUS_OK); } @@ -421,13 +421,13 @@ got_first_request_body_chunk (SoupMessage *msg, int num; /* Disconnect the ctx cleanup function */ - num = g_signal_handlers_disconnect_by_func (msg, + num = g_signal_handlers_disconnect_by_func (msg, G_CALLBACK (request_ended_no_body_cb), ctx); if (num != 1) g_critical ("Unable to remove signal handler for cleanup function!\n"); /* Disconnect us from got-chunk */ - num = g_signal_handlers_disconnect_by_func (msg, + num = g_signal_handlers_disconnect_by_func (msg, G_CALLBACK (got_first_request_body_chunk), ctx); if (num != 1) g_critical ("Unable to remove signal handler for first request chunk!\n"); @@ -435,7 +435,7 @@ got_first_request_body_chunk (SoupMessage *msg, ctx->msg = msg; ctx->pipeline = gst_pipeline_new ("pipe"); - /* The chunked request is copied into this stream + /* The chunked request is copied into this stream * for consumption by the gst pipeline */ #ifdef PLAY_DEBUG stp_play_from_msg (ctx); @@ -505,7 +505,7 @@ PUT: { connection_exists = g_hash_table_contains (ctx_table, soup_uri_get_path (uri)); /* Data might be sent to us in one of three ways: - * 1. Chunked encoding with the stream (and request body) sent in chunks + * 1. Chunked encoding with the stream (and request body) sent in chunks * 2. Content-Length encoding with the entire stream in one chunk * 3. A persistent Content-Length encoding connection, and subsequent * requests can send more stream data, forever, subject to a timeout */ @@ -525,7 +525,7 @@ PUT: { g_print ("Content-Length encoding detected!\n"); content_range = soup_message_headers_get_one (msg->request_headers, "Content-Range"); - /* TODO: Right now, we don't check if the Content-Range is valid, + /* TODO: Right now, we don't check if the Content-Range is valid, * and just pass the data to the pipeline. */ if (connection_exists && !content_range) { /* A connection already exists, and this one isn't a continuation @@ -546,7 +546,7 @@ PUT: { g_assert_not_reached (); } - /* Whether the incoming stream is chunked or fixed length, we want to + /* Whether the incoming stream is chunked or fixed length, we want to * handle it chunked, so tell libsoup to not collect chunks for * forming a complete request body */ soup_message_body_set_accumulate (msg->request_body, FALSE); |