ofxGstreamer setVolume(float) not working

#1

hi, everyone!!

i am using ofxGstreamer for every video projects i have and recommend it a lot!
but, i tried some ways to output sound from the video but isnt working.

SET VOLUME
below, this doesnt work:
player.setVolume(1.0);

OFGSTUTILS.APP
below, i changed as arturo posted HERE, but didnt work either:

void ofGstUtils::setVolume(float volume){
//    gdouble gvolume = volume;
//    g_object_set(G_OBJECT(gstPipeline), "volume", gvolume, (void*)NULL);
    
    gdouble gvolume = CLAMP(volume,0,10);
    g_object_set(G_OBJECT(gstPipeline), "volume", gvolume, NULL);
}

and also tried to edit directly the pipeline of the video with no success.

does anyone uses sound + video with ofxGstreamer?
any help will be perfect.

thank you!!

#2

does anyone ever used ofxGstreamer with .setVolume()?
trying with no success to add sound & video with ofxGstreamer.

#3

got it working!!

did as below, into update():


auto gstvideo = std::dynamic_pointer_cast<ofGstVideoPlayer>(player.getPlayer());
gstvideo.get()->setVolume(sound1);
1 Like