mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08:56 +00:00
Added some sanity checks
Original commit message from CVS: Added some sanity checks
This commit is contained in:
parent
2686e1b6e0
commit
0d2aa4c6d2
2 changed files with 6 additions and 0 deletions
|
@ -14,9 +14,11 @@ int main (int argc, char *argv[])
|
|||
|
||||
/* create a new bin to hold the elements */
|
||||
bin = gst_pipeline_new ("pipeline");
|
||||
g_assert (bin);
|
||||
|
||||
/* create a disk reader */
|
||||
filesrc = gst_elementfactory_make ("filesrc", "disk_source");
|
||||
g_assert (filesrc);
|
||||
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
|
||||
|
||||
/* now it's time to get the decoder */
|
||||
|
@ -27,6 +29,7 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
/* and an audio sink */
|
||||
osssink = gst_elementfactory_make ("osssink", "play_audio");
|
||||
g_assert (osssink);
|
||||
|
||||
/* add objects to the main pipeline */
|
||||
gst_bin_add_many (GST_BIN (bin), filesrc, decoder, osssink, NULL);
|
||||
|
|
|
@ -14,9 +14,11 @@ int main (int argc, char *argv[])
|
|||
|
||||
/* create a new bin to hold the elements */
|
||||
bin = gst_pipeline_new ("pipeline");
|
||||
g_assert (bin);
|
||||
|
||||
/* create a disk reader */
|
||||
filesrc = gst_elementfactory_make ("filesrc", "disk_source");
|
||||
g_assert (filesrc);
|
||||
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
|
||||
|
||||
/* now it's time to get the decoder */
|
||||
|
@ -27,6 +29,7 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
/* and an audio sink */
|
||||
osssink = gst_elementfactory_make ("osssink", "play_audio");
|
||||
g_assert (osssink);
|
||||
|
||||
/* add objects to the main pipeline */
|
||||
gst_bin_add_many (GST_BIN (bin), filesrc, decoder, osssink, NULL);
|
||||
|
|
Loading…
Reference in a new issue