Hi, I search a way to play a list of indexed ogg with gst-launch (in fact it's in a code).
I'm developing an addin for tomboy which add voice notes to tomboy, it's working with gstreamer but I'm trying to add a new functionality which need to read indexed ogg files in order, one by one, like that : "play(name_of_the_note.0.ogg) -> playing over -> play(name_of_the_note.1.ogg) -> etc..." I have a function "Play(filePath)" which works but if I do a for() loop for all the voice notes, that play all ogg together so I searched in gstreamer plugins list a way to do what I want but didn't find. I tried to use Threads in C# but didn't worked. I saw the plugin multifilesrc which read indexed files but I didn't find other than PNG images examples with that, no example with sound files or other. I would like to know if there is a way with gst-launch (the command line tool) to play a list of file one by one. Thanks. My Play() function and the bus callback if someone is interested (it's in C# using Gstreamer-sharp): public void Play(string filePath) { int status = GetState(); /* * get the state of the pipeline * 0 : null * 1 : playing * 2 : Paused */ if(status == 2) { pipeline.SetState(Gst.State.Playing); } else { string command = "filesrc location="+filePath+" ! oggdemux ! vorbisdec ! audioconvert ! gconfaudiosink"; pipeline = Gst.Parse.Launch(command); SetBusCallback(); pipeline.SetState(Gst.State.Playing); } } private bool BusCallback(Gst.Bus bus,Gst.Message message) { switch (message.Type) { case Gst.MessageType.Eos: status = Gst.State.Ready; pipeline.SetState(status); break; case Gst.MessageType.Error: status = Gst.State.Null; pipeline.SetState(status); break; default: break; } return true; } PS: sorry for my english if I made some mistakes. |
Crevetolog wrote:
> Hi, I search a way to play a list of indexed ogg with gst-launch (in fact > it's in a code). > > I'm developing an addin for tomboy which add voice notes to tomboy, it's > working with gstreamer but I'm trying to add a new functionality which need > to read indexed ogg files in order, one by one, like that : > "play(name_of_the_note.0.ogg) -> playing over -> > play(name_of_the_note.1.ogg) -> etc..." > > I have a function "Play(filePath)" which works but if I do a for() loop for > all the voice notes, that play all ogg together so I searched in gstreamer > plugins list a way to do what I want but didn't find. > I tried to use Threads in C# but didn't worked. > I saw the plugin multifilesrc which read indexed files but I didn't find > other than PNG images examples with that, no example with sound files or > other. > next item, when you get "Gst.MessageType.Eos" on the bus. Stefan > I would like to know if there is a way with gst-launch (the command line > tool) to play a list of file one by one. > > Thanks. > > > My Play() function and the bus callback if someone is interested (it's in C# > using Gstreamer-sharp): > > > public void Play(string filePath) > { > int status = GetState(); > > /* > * get the state of the pipeline > * 0 : null > * 1 : playing > * 2 : Paused > */ > > if(status == 2) > { > pipeline.SetState(Gst.State.Playing); > } > else > { > > string command = "filesrc location="+filePath+" ! oggdemux ! vorbisdec ! > audioconvert ! gconfaudiosink"; > pipeline = Gst.Parse.Launch(command); > SetBusCallback(); > pipeline.SetState(Gst.State.Playing); > } > } > private bool BusCallback(Gst.Bus bus,Gst.Message message) > { > switch (message.Type) > { > case Gst.MessageType.Eos: > status = Gst.State.Ready; > pipeline.SetState(status); > > break; > case Gst.MessageType.Error: > status = Gst.State.Null; > pipeline.SetState(status); > break; > default: > break; > } > return true; > } > > > > PS: sorry for my english if I made some mistakes. > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
You find the solution, call the play() methode in the buscallback. Works great now ! Thanks !
But now I would like to add a function that merge every ogg of the list into one ogg, the final goal of that is to add a button into my addin to save the voiceNote where you want but to do that I need to transform the list of ogg into one big ogg. I search a way to do that with gst-launch. |
Crevetolog wrote:
> You find the solution, call the play() methode in the buscallback. Works > great now ! Thanks ! > > But now I would like to add a function that merge every ogg of the list into > one ogg, the final goal of that is to add a button into my addin to save the > voiceNote where you want but to do that I need to transform the list of ogg > into one big ogg. > you could use gnonlin. If you do this manualy you need to handle several details correctly (eat intermedia eos events from sources and use newsegment events to create a continous output). Stefan ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |