question/request
popot.org
info at popot.org
Wed Aug 17 08:41:41 UTC 2016
Hi GStreamer folks,
I would like this:
----------
#include <gst/gst.h>
#include <glib.h>
#include <stdio.h>
#include <unistd.h>
int main (int argc, char *argv[])
{
int iID;
int iLoop;
gst_init (&argc, &argv);
printf ("Let's play some music.\n");
iID = gst_play_file_non_blocking ("ogg/song.ogg", GST_NO_LOOP);
for (iLoop = 1; iLoop <= 100; iLoop++)
{
sleep (1);
printf ("Music is playing while this"
" increases: %i\n", iLoop);
}
gst_stop_by_id (iID); /*** Stop audio with ID iID. ***/
gst_stop_all(); /*** Or simply stop all audio. ***/
printf ("Done.\n");
return 0;
}
----------
What is the absolute easiest way to accomplish this?
I know it seems like I'm asking you to do my work. I am. :) The reason
I use frameworks and libraries is to make things easy for myself.
This hello world code is already pretty extensive:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html
And I don't want to read about threads just to play some sounds effects
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-threads-status.html
Is there, like, a super easy example how to just play sound effects or
music in a non-blocking(!) way?
Maybe GStreamer is not suitable for me?
Awaiting your reply,
Best regards,
Norbert
More information about the gstreamer-devel
mailing list