OF, Jack, videos and audio output linux

After having struggled a bit to connect OF Jack Openframeworks with linux/jack
I am faced with a new problem!
I suppose that it is in the gstreamer sound output to Jack but I can not find anything except plugin pulse-audio-jack that I would avoid !!
A track?
Bernard

Could be used jackaudiosink?
Bernard

yes if you want to output audio from videos through jack you should create a custom pipeline using jackaudiosink

Hello Arturo!
it’s going to me but everything I try does not work with ofgstvideoutils.
So not easy to test jackaudiosink.
I’m looking on the forum and I can not find a code that works?
I know gststreamer-1.0 changes the comande but there was something else?
Even with a simple code like this, I can not find the error?
gstreamer seems to send the pipe …
thank you
Benard


ofGstVideoUtils gstPipe; 
ofImage pipeImg; 

ofApp ::  void setup () {
gstPipe.setPipeline ("videotestsrc", 24, true, 320.240); 
gstPipe.play (); 
pipeImg.allocate (gstPipe.getWidth () gstPipe.getHeight () OF_IMAGE_COLOR); 
} 
//---------------------------------------------------------------  
void ofApp :: update () {   
gstPipe.update ();
pipeImg.setFromPixels(gstPipe.getPixels(),gstPipe.getWidth(),gstPipe.getHeight(),OF_IMAGE_COLOR,true);
}  
// --------------------------------------------------------------    
void ofApp :: draw () {
ofSetColor (255 125 255); 
pipeImg.draw (20:20);  
}

taking your example here


here works …!
I missed gst.startPipeline (); no doubt!

     ofGstVideoUtils gst; 
     ofTexture texture; 

// ------------------------------------------------ -------------- 
ofApp :: void setup () {

 ofBackground (255,255,255); 
 gst.setPipeline ("videotestsrc", 24, true, 320.240); 
 gst.startPipeline (); 
 gst.play (); 
 texture.allocate (320.240, GL_RGB); 
} 

// ------------------------------------------------ -------------- 
void ofApp :: update () {
  gst.update (); 
 if (gst.isFrameNew ()) {
     texture.loadData (gst.getPixelsRef () GL_BGR); 
 } 

} 

// ------------------------------------------------ -------------- 
void ofApp :: draw () {
 ofSetColor (255 255 255); 
 texture.draw (20:20); 
} 

Well I continue …
thank you
Bernard
ps: french english by google!

here is where I am:

  • Play Video/Audio to jack is ok (parameter in Jack are important for a good result)
gst.setPipeline ("filesrc location =. / data / video.mov! qtdemux name = demux demux.audio_0! decodebin! audioconvert! audioresample! jackaudiosink demux.video_0! tail! decodebin! videoconvert! videoscale", 24, true, 320.240) ; 
  • Play / Pause Ok
 gst.setPaused (true/false); 
  • Auto loop not working?
 gst.setLoopState (OF_LOOP_NORMAL); 
  • Not possible to change the volume ???
gst.setVolume (0.5); 

A track?
thank you
Bernard

Solutions found:
Solution 1: jackaudiosink in a pipline customize, not great for creating a new bus every time you open a file, difficulty with volume options and speed + his parasite!
Solution 2: gstreamer-properties: select custom option in gstreamer-properties and write jackaudiosink: a new bus every open file + its parasite!
Solution 3: pulseaudio-plugins-jack, not always a good result!
Solution 4: best: http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge#asoundrc_definition! It is the easy solution moin but that seems to work best!

Here’s where I am!
Yours Bernard