mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 08:26:39 +00:00
examples: remove unused return value in addstream
Removing unused return value of pause_play_stream (). Fixing code style to satisfy the git hook.
This commit is contained in:
parent
2145586ab6
commit
7d147e27c5
1 changed files with 16 additions and 11 deletions
|
@ -53,7 +53,7 @@ create_stream (const gchar * descr)
|
||||||
return bin;
|
return bin;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static void
|
||||||
pause_play_stream (GstElement * bin, gint seconds)
|
pause_play_stream (GstElement * bin, gint seconds)
|
||||||
{
|
{
|
||||||
gboolean punch_in;
|
gboolean punch_in;
|
||||||
|
@ -85,9 +85,10 @@ pause_play_stream (GstElement * bin, gint seconds)
|
||||||
* this situation timestamps start from 0. */
|
* this situation timestamps start from 0. */
|
||||||
punch_in = TRUE;
|
punch_in = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
case GST_STATE_CHANGE_FAILURE:
|
case GST_STATE_CHANGE_FAILURE:
|
||||||
return FALSE;
|
/* fall through to return */
|
||||||
|
default:
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seconds)
|
if (seconds)
|
||||||
|
@ -106,8 +107,6 @@ pause_play_stream (GstElement * bin, gint seconds)
|
||||||
|
|
||||||
/* now set the pipeline to PLAYING */
|
/* now set the pipeline to PLAYING */
|
||||||
gst_element_set_state (bin, GST_STATE_PLAYING);
|
gst_element_set_state (bin, GST_STATE_PLAYING);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -151,7 +150,8 @@ perform_step (gpointer pstep)
|
||||||
create_stream
|
create_stream
|
||||||
("( v4l2src ! videoconvert ! timeoverlay ! queue ! xvimagesink name=v4llive )");
|
("( v4l2src ! videoconvert ! timeoverlay ! queue ! xvimagesink name=v4llive )");
|
||||||
pause_play_stream (bin1, 0);
|
pause_play_stream (bin1, 0);
|
||||||
g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (1));
|
g_timeout_add_seconds (1, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (1));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* live stream locks on to running_time, pipeline reconfigures latency
|
/* live stream locks on to running_time, pipeline reconfigures latency
|
||||||
|
@ -159,14 +159,16 @@ perform_step (gpointer pstep)
|
||||||
g_print ("creating bin2\n");
|
g_print ("creating bin2\n");
|
||||||
bin2 = create_stream ("( alsasrc ! queue ! alsasink name=alsalive )");
|
bin2 = create_stream ("( alsasrc ! queue ! alsasink name=alsalive )");
|
||||||
pause_play_stream (bin2, 0);
|
pause_play_stream (bin2, 0);
|
||||||
g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (2));
|
g_timeout_add_seconds (1, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (2));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* non-live stream, need base_time to align with current running live sources. */
|
/* non-live stream, need base_time to align with current running live sources. */
|
||||||
g_print ("creating bin3\n");
|
g_print ("creating bin3\n");
|
||||||
bin3 = create_stream ("( audiotestsrc ! alsasink name=atnonlive )");
|
bin3 = create_stream ("( audiotestsrc ! alsasink name=atnonlive )");
|
||||||
pause_play_stream (bin3, 0);
|
pause_play_stream (bin3, 0);
|
||||||
g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (3));
|
g_timeout_add_seconds (1, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (3));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
g_print ("creating bin4\n");
|
g_print ("creating bin4\n");
|
||||||
|
@ -174,7 +176,8 @@ perform_step (gpointer pstep)
|
||||||
create_stream
|
create_stream
|
||||||
("( videotestsrc ! timeoverlay ! videoconvert ! ximagesink name=vtnonlive )");
|
("( videotestsrc ! timeoverlay ! videoconvert ! ximagesink name=vtnonlive )");
|
||||||
pause_play_stream (bin4, 0);
|
pause_play_stream (bin4, 0);
|
||||||
g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (4));
|
g_timeout_add_seconds (1, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (4));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
/* live stream locks on to running_time */
|
/* live stream locks on to running_time */
|
||||||
|
@ -183,7 +186,8 @@ perform_step (gpointer pstep)
|
||||||
create_stream
|
create_stream
|
||||||
("( videotestsrc is-live=1 ! timeoverlay ! videoconvert ! ximagesink name=vtlive )");
|
("( videotestsrc is-live=1 ! timeoverlay ! videoconvert ! ximagesink name=vtlive )");
|
||||||
pause_play_stream (bin5, 0);
|
pause_play_stream (bin5, 0);
|
||||||
g_timeout_add_seconds (1, (GSourceFunc) perform_step, GINT_TO_POINTER (5));
|
g_timeout_add_seconds (1, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (5));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
/* pause the fist live stream for 2 seconds */
|
/* pause the fist live stream for 2 seconds */
|
||||||
|
@ -196,7 +200,8 @@ perform_step (gpointer pstep)
|
||||||
g_print ("PAUSE bin5 for 2 seconds\n");
|
g_print ("PAUSE bin5 for 2 seconds\n");
|
||||||
pause_play_stream (bin5, 2);
|
pause_play_stream (bin5, 2);
|
||||||
g_print ("Waiting 5 seconds\n");
|
g_print ("Waiting 5 seconds\n");
|
||||||
g_timeout_add_seconds (5, (GSourceFunc) perform_step, GINT_TO_POINTER (6));
|
g_timeout_add_seconds (5, (GSourceFunc) perform_step,
|
||||||
|
GINT_TO_POINTER (6));
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
g_print ("quiting\n");
|
g_print ("quiting\n");
|
||||||
|
|
Loading…
Reference in a new issue