mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
run gst-indent over c files
This commit is contained in:
parent
75122bd55b
commit
28fdf37d17
2 changed files with 19 additions and 25 deletions
|
@ -108,7 +108,7 @@ send_response_200_ok (Client * client)
|
|||
{
|
||||
gchar *response;
|
||||
response = g_strdup_printf ("%s 200 OK\r\n%s\r\n", client->http_version,
|
||||
content_type);
|
||||
content_type);
|
||||
write_bytes (client, response, strlen (response));
|
||||
g_free (response);
|
||||
}
|
||||
|
@ -242,10 +242,10 @@ on_read_bytes (GPollableInputStream * stream, Client * client)
|
|||
client_message (client, (gchar *) client->current_message->data, len);
|
||||
g_byte_array_remove_range (client->current_message, 0, len);
|
||||
tmp = client->current_message->data;
|
||||
tmp_len = client->current_message->len;
|
||||
tmp_len = client->current_message->len;
|
||||
} else {
|
||||
tmp++;
|
||||
tmp_len--;
|
||||
tmp_len--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,8 +372,8 @@ on_client_socket_removed (GstElement * element, GSocket * socket,
|
|||
remove_client (client);
|
||||
}
|
||||
|
||||
static void on_stream_caps_changed (GObject *obj, GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
static void
|
||||
on_stream_caps_changed (GObject * obj, GParamSpec * pspec, gpointer user_data)
|
||||
{
|
||||
GstPad *src_pad;
|
||||
GstCaps *src_caps;
|
||||
|
@ -389,27 +389,22 @@ static void on_stream_caps_changed (GObject *obj, GParamSpec *pspec,
|
|||
* type is OK in HTTP. Required for MJPEG streams.
|
||||
*/
|
||||
int i = 0;
|
||||
const gchar *mimetype = gst_structure_get_name(gstrc);
|
||||
while (known_mimetypes[i] != NULL)
|
||||
{
|
||||
if (strcmp(mimetype, known_mimetypes[i]) == 0)
|
||||
{
|
||||
const gchar *mimetype = gst_structure_get_name (gstrc);
|
||||
while (known_mimetypes[i] != NULL) {
|
||||
if (strcmp (mimetype, known_mimetypes[i]) == 0) {
|
||||
if (content_type)
|
||||
g_free(content_type);
|
||||
g_free (content_type);
|
||||
|
||||
/* Handle the (maybe not so) especial case of multipart to add boundary */
|
||||
if (strcmp(mimetype, "multipart/x-mixed-replace") == 0 &&
|
||||
gst_structure_has_field_typed(gstrc, "boundary", G_TYPE_STRING))
|
||||
{
|
||||
const gchar *boundary = gst_structure_get_string(gstrc, "boundary");
|
||||
if (strcmp (mimetype, "multipart/x-mixed-replace") == 0 &&
|
||||
gst_structure_has_field_typed (gstrc, "boundary", G_TYPE_STRING)) {
|
||||
const gchar *boundary = gst_structure_get_string (gstrc, "boundary");
|
||||
content_type = g_strdup_printf ("Content-Type: "
|
||||
"multipart/x-mixed-replace;boundary=--%s\r\n", boundary);
|
||||
}
|
||||
else
|
||||
{
|
||||
"multipart/x-mixed-replace;boundary=--%s\r\n", boundary);
|
||||
} else {
|
||||
content_type = g_strdup_printf ("Content-Type: %s\r\n", mimetype);
|
||||
}
|
||||
g_print("%s", content_type);
|
||||
g_print ("%s", content_type);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
@ -455,7 +450,7 @@ main (gint argc, gchar ** argv)
|
|||
}
|
||||
|
||||
const gchar *port_str = argv[1];
|
||||
const int port = (int) g_ascii_strtoll(port_str, NULL, 10);
|
||||
const int port = (int) g_ascii_strtoll (port_str, NULL, 10);
|
||||
|
||||
bin = gst_parse_launchv ((const gchar **) argv + 2, &err);
|
||||
if (!bin) {
|
||||
|
@ -481,8 +476,7 @@ main (gint argc, gchar ** argv)
|
|||
|
||||
content_type = g_strdup ("");
|
||||
g_signal_connect (srcpad, "notify::caps",
|
||||
G_CALLBACK (on_stream_caps_changed),
|
||||
NULL);
|
||||
G_CALLBACK (on_stream_caps_changed), NULL);
|
||||
|
||||
ghostpad = gst_ghost_pad_new ("src", srcpad);
|
||||
gst_element_add_pad (GST_ELEMENT (bin), ghostpad);
|
||||
|
|
|
@ -409,10 +409,10 @@ play_current_uri (GtkPlay * play, GList * uri, const gchar * ext_suburi)
|
|||
{
|
||||
/* reset the button/widget state to default */
|
||||
g_signal_handlers_block_by_func (play->seekbar,
|
||||
seekbar_value_changed_cb, play);
|
||||
seekbar_value_changed_cb, play);
|
||||
gtk_range_set_range (GTK_RANGE (play->seekbar), 0, 0);
|
||||
g_signal_handlers_unblock_by_func (play->seekbar,
|
||||
seekbar_value_changed_cb, play);
|
||||
seekbar_value_changed_cb, play);
|
||||
gtk_widget_set_sensitive (play->prev_button, g_list_previous (uri) != NULL);
|
||||
gtk_widget_set_sensitive (play->next_button, g_list_next (uri) != NULL);
|
||||
gtk_label_set_label (play->rate_label, NULL);
|
||||
|
|
Loading…
Reference in a new issue