mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +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
|
@ -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;
|
||||
|
@ -390,23 +390,18 @@ static void on_stream_caps_changed (GObject *obj, GParamSpec *pspec,
|
|||
*/
|
||||
int i = 0;
|
||||
const gchar *mimetype = gst_structure_get_name (gstrc);
|
||||
while (known_mimetypes[i] != NULL)
|
||||
{
|
||||
if (strcmp(mimetype, known_mimetypes[i]) == 0)
|
||||
{
|
||||
while (known_mimetypes[i] != NULL) {
|
||||
if (strcmp (mimetype, known_mimetypes[i]) == 0) {
|
||||
if (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))
|
||||
{
|
||||
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
|
||||
{
|
||||
} else {
|
||||
content_type = g_strdup_printf ("Content-Type: %s\r\n", mimetype);
|
||||
}
|
||||
g_print ("%s", content_type);
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue