howto instantiate a C struct in gjs



Hi,

I'm following this example C code and trying to convert it into gjs

https://github.com/shadeslayer/farstream/blob/master/examples/commandline/simple-call.c


I'm trying to create a object of type GObject.Parameter so that I can
pass it to Farstream.Stream.set_transmitter() method. I tried

let param = new GObject.Parameter()

which throws error saying there is no default constructor. I tried by
directly providing an object,

stream.set_transmitter({'preferred-local-candidates': candidates});

this also not working because gjs is not gussing the correct GValue. Is
there any way to solve this issue?

Thanks,
Mohan R



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