I use following command to create a pipeline from cmd.
gst-launch -v filesrc location=c:\\song.mp3 ! mad ! audioconvert ! directsoundsink
how to code the above command into a program?
I use following command to create a pipeline from cmd.
gst-launch -v filesrc location=c:\\song.mp3 ! mad ! audioconvert ! directsoundsink
how to code the above command into a program?
All gstreamer modules have test/examples directories which you can also look at the git browser. To implement the above gst-launch invocation as a programm you need to pick the languag (e.g. c or python) and implement that using the gst API. Don't expect that someone does that for you here though.
by "program" is guess you mean a file that you can run.
you can simply put the gst-launch stanza into a script-file, and run that script-file.
the following example uses bash syntax (save it in a file playmad, make the file executable and run
playmad /path/to/song.mp3
)on w32, you can create a
.bat
file that does the same.