basic-tutorial-3: remove leading spaces in prints

https://bugzilla.gnome.org/show_bug.cgi?id=788794
This commit is contained in:
Thijs Vermeir 2017-10-10 21:31:11 +02:00 committed by Sebastian Dröge
parent 50bc3702ea
commit abc77fdd5b
2 changed files with 12 additions and 12 deletions

View file

@ -118,7 +118,7 @@ static void pad_added_handler (GstElement *src, GstPad *new_pad, CustomData *dat
/* If our converter is already linked, we have nothing to do here */
if (gst_pad_is_linked (sink_pad)) {
g_print (" We are already linked. Ignoring.\n");
g_print ("We are already linked. Ignoring.\n");
goto exit;
}
@ -127,16 +127,16 @@ static void pad_added_handler (GstElement *src, GstPad *new_pad, CustomData *dat
new_pad_struct = gst_caps_get_structure (new_pad_caps, 0);
new_pad_type = gst_structure_get_name (new_pad_struct);
if (!g_str_has_prefix (new_pad_type, "audio/x-raw")) {
g_print (" It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
g_print ("It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
goto exit;
}
/* Attempt the link */
ret = gst_pad_link (new_pad, sink_pad);
if (GST_PAD_LINK_FAILED (ret)) {
g_print (" Type is '%s' but link failed.\n", new_pad_type);
g_print ("Type is '%s' but link failed.\n", new_pad_type);
} else {
g_print (" Link succeeded (type '%s').\n", new_pad_type);
g_print ("Link succeeded (type '%s').\n", new_pad_type);
}
exit:

View file

@ -206,7 +206,7 @@ static void pad_added_handler (GstElement *src, GstPad *new_pad, CustomData *dat
/* If our converter is already linked, we have nothing to do here */
if (gst_pad_is_linked (sink_pad)) {
g_print (" We are already linked. Ignoring.\n");
g_print ("We are already linked. Ignoring.\n");
goto exit;
}
@ -215,16 +215,16 @@ static void pad_added_handler (GstElement *src, GstPad *new_pad, CustomData *dat
new_pad_struct = gst_caps_get_structure (new_pad_caps, 0);
new_pad_type = gst_structure_get_name (new_pad_struct);
if (!g_str_has_prefix (new_pad_type, "audio/x-raw")) {
g_print (" It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
g_print ("It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
goto exit;
}
/* Attempt the link */
ret = gst_pad_link (new_pad, sink_pad);
if (GST_PAD_LINK_FAILED (ret)) {
g_print (" Type is '%s' but link failed.\n", new_pad_type);
g_print ("Type is '%s' but link failed.\n", new_pad_type);
} else {
g_print (" Link succeeded (type '%s').\n", new_pad_type);
g_print ("Link succeeded (type '%s').\n", new_pad_type);
}
exit:
@ -379,7 +379,7 @@ Now we are going to link the pads directly.
``` c
/* If our converter is already linked, we have nothing to do here */
if (gst_pad_is_linked (sink_pad)) {
g_print (" We are already linked. Ignoring.\n");
g_print ("We are already linked. Ignoring.\n");
goto exit;
}
```
@ -394,7 +394,7 @@ new_pad_caps = gst_pad_get_current_caps (new_pad, NULL);
new_pad_struct = gst_caps_get_structure (new_pad_caps, 0);
new_pad_type = gst_structure_get_name (new_pad_struct);
if (!g_str_has_prefix (new_pad_type, "audio/x-raw")) {
g_print (" It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
g_print ("It has type '%s' which is not raw audio. Ignoring.\n", new_pad_type);
goto exit;
}
```
@ -431,9 +431,9 @@ Otherwise, attempt the link:
/* Attempt the link */
ret = gst_pad_link (new_pad, sink_pad);
if (GST_PAD_LINK_FAILED (ret)) {
g_print (" Type is '%s' but link failed.\n", new_pad_type);
g_print ("Type is '%s' but link failed.\n", new_pad_type);
} else {
g_print (" Link succeeded (type '%s').\n", new_pad_type);
g_print ("Link succeeded (type '%s').\n", new_pad_type);
}
```