Re: gstreamermm, Gst::AudioSink




Hi ,

i was able to solve the issue by implementing unprepare_vfunc and adding a ref to gst_caps

    bool prepare_audiosink_vfunc(Gst::AudioRingBufferSpec& spec) override
    {
         //auto srccaps = Gst::Caps::create_from_string();
        // spec.set_caps(srccaps);

         auto bufferspec = spec.gobj();
         bufferspec->caps = gst_caps_ref(gst_caps_from_string("audio/x-raw, format=(string)S16LE, rate=(int)16000,channels=(int)1,layout=(string)interleaved"));
         return true;
    }
    bool unprepare_vfunc() override
    {
        return true;
    }

--
Regards

Ankur Deep Jaiswal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]