Code Monkey home page Code Monkey logo

janus-plugin-sfu's Introduction

janus-plugin-sfu

Janus plugin to serve as a WebRTC Selective Forwarding Unit (SFU) for game networking data. It was designed as the backend for Mozilla Hubs, although Hubs no longer uses it.

See here for API documentation on how to communicate with the plugin.

PRs and GitHub issues are welcome.

How do I use this?

This is a plugin for Janus, so you'll need to install and run Janus first. The installation instructions on GitHub are canonical. It's compatible with Janus version 0.10.9 and later, although sometimes Janus makes changes that break plugins.

This plugin should be compatible with any OS that can run Janus; that includes Linux, OS X, and Windows via WSL. If you use a version from a package manager, you might want to check to make sure it has data channel support, which is a compile-time option. (Debian and Ubuntu have it.)

Dependencies

These are the native dependencies necessary for building the Rust plugin. For Janus's dependencies, consult its documentation.

$ sudo apt install libglib2.0-dev libjansson-dev

Building

$ cargo build [--release]

Testing

$ cargo test

Installing

Install the library output by the build process (e.g. ./target/release/libjanus_plugin_sfu.so) into the Janus plugins directory (e.g. /usr/lib/janus/plugins). Restart Janus to activate.

Configuration and usage

The plugin accepts a configuration file in the Janus configuration directory named janus.plugin.sfu.cfg containing key/value pairs in INI format. An example configuration file is provided as janus.plugin.sfu.cfg.example.

You can test your install by pointing a browser at the tiny.html client provided in the client directory. If you open two browser windows, you should be able to share your microphone, share your screen, and send data channel messages in one, and see the results in the other.

Using it with networked-aframe

You can use this plugin with A-Frame and networked-aframe. Look at the adapters table for a maintained version of the naf-janus-adapter.

janus-plugin-sfu's People

Contributors

arpu avatar brianpeiris avatar gfodor avatar mozilla-github-standards avatar mqp avatar vincentfretin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

janus-plugin-sfu's Issues

Cannot compile "note: Undefined symbols for architecture x86_64)"

error: linking with cc failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.11dsit7tlqd1xaak.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.11h12rsptqc40y7l.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.11wnq456p49md7bu.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1467hrj4p1noin7n.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.14a20phesmn4usqz.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.152f6tl63p8aywe9.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.15rz1t6ojaajo8v8.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.168kkby4le5tdk8t.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1b4zcpegfuffwq67.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1cbmp7vpcol4xtuc.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1dg7e3ebrl3ddizg.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1ehxc3f74ey2yrlb.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1fbzrvo3o6rhb63k.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1fwepnv90h6db42b.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1g1ck4arthzz0nll.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1gf2dy3y80kb47ja.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1gib03blszrb6lrn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1grs2ug88htmvqw1.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1i7vnmkkroqmktzg.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1ji907anckihzufo.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1k3etmxdqret7ybj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1kigeh9j9b0lxjiv.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1l8kx5yih1mdpmyj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1m4j1b4ijpokotuj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1mvraa9luuiiz2xn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1myel0l8d8bkwutr.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1o235ltl2tq60h0c.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1qs133qgiheflp3r.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1t5pnsxeezbxk9in.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.1zziugvv6ziax02n.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.21n9rmyki96j7dlj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.21xv6xfnlvuxh53z.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.220nh3w630ws5cju.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.27cwvhu0vhshx83c.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.28jsz2iw2ttfzv5s.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.299x55g6nnxqgpgd.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2ajoyxe3gp1icgbn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2fcqm2nv14z043ie.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2go2wreoa4z0yp16.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2htegeojxe9axa8g.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2hyggm1gew9ni80z.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2ic83h1fk0a1tgx5.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2knfhfaga8mwph6k.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2mf9pic14f6b3jkj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2o50jky0z5di93mg.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2oku556v476bftm3.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2r65ejhvjigq24cw.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2rlosa3iv9mjlern.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2rs2ba5hcwghbrkj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2s9awjmdtofl7350.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2sdozce31vbcwyxo.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2tbgwfi0w5tmjn1i.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2xwisvy83xbdaglv.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2xzzt9frmunk1npo.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2y0wxr9zc8iq0i4v.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2zafo2oqavaztlw0.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.2zccem44s4qmphpt.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.301q6kl12vb6iwo7.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.31k9x8ojxfsuvn17.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.33yc047rtjl2y6vy.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.342wys2dt0e07swz.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.34g0e42o7usjr80m.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.38vnnaog258jwqap.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3abwr8nyusxt62ur.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3ahlilhka5tubtuh.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3bgba8du3qhkatt8.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3cs7r78ek9qx137b.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3e1qlzgr6z18jm95.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3eqcar1iqe3nyc5u.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3f3m428hef36yaag.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3gioq5a0rx8v03rj.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3h2q0ygw364wqquf.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3ipa9s99b1u9z8yz.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3lb68isewvcqtq04.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3lrf7pzvambhcgdc.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3mbhds8x6juntcnh.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3otungbuhq21twm1.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3p04l92cvf28m7m6.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3p26g5nr42ieg0t9.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3p9fu2ghxy8aofse.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3tlvyrcktvlv5v7s.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3u0nqdnnad70a41n.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3vazljb24rjyn23u.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3x4xuwtm7h2jlv8r.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3xosfcklesuklscn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.3y4wk70qz2pog26i.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.40aow2at49ma1sng.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.44t6snd0geee1lqb.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.45qdx3emjm70lr1u.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.46xpl239oqxyt1t4.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.471rv80tm6vm5fw9.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.478ozusxpa4mwadr.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.485gzpke1iveznn6.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4b1uak3kxu7ofs92.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4csjefpskr4uvtjw.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4eq91xisfv35v7w4.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4f4gn4g87tx8tsr6.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4fnaezqweuul6zm3.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4gjqe0yfsd3icje1.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4gvt4o5b38f0rtd2.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4ii37ilvwuolvpnm.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4iwmjko0g5jgekpp.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4jo6szssby09470e.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4lcavkr6eqvwa6lr.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4lvkto336xbsp713.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4nvpswk1f3990u5l.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4nww0jadac8q7vjd.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4puu08id86m07n3c.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4pw3qb59nm4hcrp0.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4qqjsirmdau9iu40.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4rsoqe2eiycf52b6.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4sh49egvjb0qgkaw.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4t0z2fdgc85mt679.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4uh383zyndg3u6xm.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4uie6n349cuzyz75.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4w7wzdqs0k8vw94r.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4xv8vfasf9hzw04s.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4yj6rgrcutn1xc2c.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.51m9l6jlqo04hjck.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.51zjareseap07pfw.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.542oubu5c87ku32y.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5637xnnbxjkb7c9e.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.59v762spzcpx5pif.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5akr4dsyu98tk8vh.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5byu5vlad39is0le.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5c1ghrld4p14bgrf.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5fm5bt0lj88hyt2f.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5g4tm2d8ltz42eqw.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.5g94i6ecof41rfxo.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.60xu7opt4lo432g.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.6vvlupulqw58myr.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.8td6ijjo7tqtgeb.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.dza81omre1nz5d2.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.jtg6qygu7pszcfn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.k45isq2aq7mdub3.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.lz9u904teh0hw5o.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.ojll9h6bqpubwco.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.pkgpkvjq9sn5emh.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.py626ugjcig7j8b.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.r9gfz5j1ka0txkp.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.rzn13rghtwdwez8.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.s0u0scos6cobpre.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.schcicj044tf7pn.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.t9vb8ltv4bzptxp.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.vnogotkhvszrd2f.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.xxymzpb4caw7zxb.rcgu.o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.yla4gezo7bzspa5.rcgu.o" "-o" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sfu.dylib" "-Wl,-exported_symbols_list,/tmp/rustchI3v32/list" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/janus_plugin_sfu.4n1nvcfdacrt5w22.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps" "-L" "/usr/local/Cellar/glib/2.62.4/lib" "-L" "/usr/local/opt/gettext/lib" "-L" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/build/ring-07e256506e5db30e/out" "-L" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libmultimap-d197efb9a07d0fd6.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libonce_cell-32acef99ecbc8401.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libjanus_plugin-2ffc55088b6c6669.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libcolored-1ba00e49d9716402.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/liblazy_static-135381280f245aa7.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libatty-c9aed381a6dfa506.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libbitflags-3922be4c3b999f75.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sys-c97bf3c5c3d9860f.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libglib_sys-f2b413813d06ac96.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libjansson_sys-b2e8a2d79afaa1b1.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libini-e77dcba4ecacabc8.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libjsonwebtoken-2af7b20eee4f5b46.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libserde_json-3b5bdfce447e7641.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libryu-8ddbf5cef997c69f.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libitoa-c084fce5e8ef6f72.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libserde-d32e1e630c0a7f12.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libring-41724907abc42a2a.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libspin-4071c8770df43774.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libuntrusted-f502b17fbdd02259.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libchrono-e57c6038dc7e57fb.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libnum_integer-db2a626e45f00966.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libnum_traits-6eba579e2c34c115.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libtime-8e2fba761e9eea17.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/liblibc-f8b89613d51e022d.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libbase64-49931bf634dafe62.rlib" "/Users/liamseskis/Desktop/janus-plugin-sfu/target/debug/deps/libbyteorder-4c006fd46574ed3b.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-294f81c884c3ba53.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-837838cd71c109aa.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-7ae260fc8ecbbbf2.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-6321896fcbf0abe2.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-22d4379fb3038aa3.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-f3ba55d7bd7ab7bd.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-88160dd7623100d7.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-a599c0ce8c55e324.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-095210cdd49ef254.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-591d2e7d25d1401c.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-b88aba0bfa594cae.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-75b4cff66e2f24c0.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-abe5cf524a032c2d.rlib" "/Users/liamseskis/.rustup/toolchains/beta-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f29eceb36de3be11.rlib" "-lglib-2.0" "-lintl" "-ljansson" "-framework" "Security" "-lSystem" "-lresolv" "-lc" "-lm" "-dynamiclib" "-Wl,-dylib"
= note: Undefined symbols for architecture x86_64:
"_janus_log_colors", referenced from:
_$LT$janus_plugin..debug..LogParameters$u20$as$u20$core..default..Default$GT$::default::h895684cf08bfc835 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.15.rcgu.o)
"_janus_rtcp_pli", referenced from:
janus_plugin::rtcp::gen_pli::h9d903e2f04805122 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.9.rcgu.o)
"_janus_rtcp_has_pli", referenced from:
janus_plugin::rtcp::has_pli::h6aef811783d7b34a in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.9.rcgu.o)
"_janus_get_api_error", referenced from:
janus_plugin::JanusError::to_cstr::h29ae1fab5bd090bd in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.4.rcgu.o)
"_janus_sdp_destroy", referenced from:
_$LT$janus_plugin..sdp..Sdp$u20$as$u20$core..ops..drop..Drop$GT$::drop::h8bcc3c4f7b165d0b in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
"_janus_log_timestamps", referenced from:
_$LT$janus_plugin..debug..LogParameters$u20$as$u20$core..default..Default$GT$::default::h895684cf08bfc835 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.15.rcgu.o)
"_janus_sdp_get_codec_pt", referenced from:
janus_plugin::sdp::Sdp::get_payload_type::h2f819e02c1070d44 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
"_janus_plugin_result_new", referenced from:
janus_plugin::PluginResult::new::hb7ddcbdd3d6cb8ac in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.4.rcgu.o)
"_refcount_debug", referenced from:
janus_plugin::refcount::decrease::h26f983d8e5478a52 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.8.rcgu.o)
"_janus_rtcp_fir", referenced from:
janus_plugin::rtcp::gen_fir::h23b1b76201ae0900 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.9.rcgu.o)
"_janus_plugin_result_destroy", referenced from:
_$LT$janus_plugin..PluginResult$u20$as$u20$core..ops..drop..Drop$GT$::drop::h223333bdc667dab3 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.4.rcgu.o)
"_janus_log_level", referenced from:
janus_plugin_sfu::init::h45fd1e3d1fde0623 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::destroy::h457a7a66da4b2369 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::create_session::hec55e0b3ddbbc05d in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::destroy_session::h3de0db726171aa39 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::setup_media::haf36d267ce313868 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::slow_link::hd082f095cd12e388 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
janus_plugin_sfu::hangup_media::hd869a8a56ff6ecf8 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
...
"_janus_sdp_attribute_create", referenced from:
janus_plugin::sdp::Sdp::add_attribute::h06d5cb39ef6c3468 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
"_janus_sdp_attribute_add_to_mline", referenced from:
janus_plugin::sdp::Sdp::add_attribute::h06d5cb39ef6c3468 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
"_janus_vprintf", referenced from:
janus_plugin::debug::log::h04200d8f4935ed43 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.15.rcgu.o)
janus_plugin::refcount::decrease::h26f983d8e5478a52 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.8.rcgu.o)
"_janus_sdp_generate_answer", referenced from:
janus_plugin_sfu::process_offer::h384bfb12e8f3e264 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
"_janus_sdp_parse", referenced from:
janus_plugin::sdp::Sdp::parse::h0ae1864c71d8ae55 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
"_janus_rtcp_has_fir", referenced from:
janus_plugin::rtcp::has_fir::hd7b5c1166f5251d3 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.9.rcgu.o)
"_janus_sdp_generate_offer", referenced from:
janus_plugin_sfu::process_offer::h384bfb12e8f3e264 in janus_plugin_sfu.2gafqq7tz6qwmgex.rcgu.o
"_janus_sdp_write", referenced from:
janus_plugin::sdp::Sdp::to_glibstring::h9c7ed111ff77c0d4 in libjanus_plugin-2ffc55088b6c6669.rlib(janus_plugin-2ffc55088b6c6669.janus_plugin.6vx9bks4-cgu.5.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

error: could not compile janus-plugin-sfu.

Remove again lazy_static dependency?

@mqp I just saw an old PR #41 where you removed the usage of lazy_static.
The multi threading PR reintroduced the dependency
#49
Can we remove again the dependency and use OneCell or something like that?
I'm not familiar with those Rust constructs so I'm not sure how to change it.

crash on janus plugin api version 14

[8398200112870128] There's a message for Janus SFU plugin
Queueing signalling message on 0x7fff8401aae0.
No auth_key configured. Allowing join from 0x7fff8401aae0 to room 37 as user 4842612465433525.
Processing join-time subscription from 0x7fff8401aae0: Subscription { notifications: false, data: false, media: Some("3462427722628661") }.
[8398200112870128] Audio has been negotiated
[8398200112870128] Video has been negotiated
[8398200112870128] SCTP/DataChannels have been negotiated
[8398200112870128] Setting ICE locally: got ANSWER (1 audios, 1 videos)
[8398200112870128] Creating ICE agent (ICE Full mode, controlling)
[8398200112870128] Adding 10.6.0.169 to the addresses to gather candidates for
[8398200112870128] Component state changed for component 1 in stream 1: 1 (gathering)
[8398200112870128] Waiting for candidates-done callback...

Thread 32 "hloop 784930706" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff7dffb700 (LWP 18075)]
janus_plugin_relay_rtp (plugin_session=0x7fff8401aae0, packet=0x7dfea7c0) at janus.c:3576
3576                            packet == NULL || packet->buffer == NULL || packet->length < 1)
(gdb) bt full
#0  0x000055555559e0df in janus_plugin_relay_rtp (plugin_session=0x7fff8401aae0, packet=0x7dfea7c0) at janus.c:3576
#1  0x00007fffb3d2a881 in janus_plugin_sfu::incoming_rtp () at /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so
#2  0x00005555555977c8 in janus_ice_cb_nice_recv (agent=<optimized out>, stream_id=<optimized out>, component_id=<optimized out>, len=<optimized out>, buf=0x7fff7dfeaa70 "\200o", ice=0x7fff6401e1a0) at ice.c:2496
        last_seqs = <optimized out>
        header = 0x7fff7dfeaa70
        plen = 66
        payload = 0x7fff7dfeaa7c "x\030d\226.n\321\375ϰ\017&lP\206\213\212z%Q\241LE\214\063\252\223q\222\066\215\353\255au\237F\202\025$=\002\275\226\216\216L$\237\241\301"
        rtp = {video = 0, buffer = 0x7fff7dfeaa70 "\200o", length = 78, extensions = {audio_level = -1 '\377', audio_level_vad = 0, video_rotation = -1, video_back_camera = 0, video_flipped = 0}}
        now = <optimized out>
        backup =
            {csrccount = 0, extension = 0, padding = 0, version = 2, type = 111, markerbit = 0, seq_number = 16469, timestamp = 2932084590, ssrc = 2928453440, csrc = {2523142264, 4258360878, 638562511, 2340835436, 1361410698, 2353351841, 1905502771, 4019009170, 2917900428, 1184855393, 1025774978, 2392243458, 2669956238, 1325449633, 3481830823, 1975102778}}
        new_seqn = <optimized out>
        cur_seqn = <optimized out>
        last_seqs_len = <optimized out>
        plugin = <optimized out>
        rtcp_ctx = <optimized out>
        retransmissions_disabled = <optimized out>
        cur_seq = <optimized out>
        nacks = <optimized out>
        nacks_count = <optimized out>
        video = <optimized out>
        vindex = <optimized out>
        buflen = 78
        header = 0x7fff7dfeaa70
        packet_ssrc = 1084722350
        rtx = <optimized out>
        res = <optimized out>
        component = 0x7fff6401e1a0
        __FUNCTION__ = "janus_ice_cb_nice_recv"
        stream = <optimized out>
        handle = 0x7fffc40058b0
        session = <optimized out>
#3  0x00007ffff79865c0 in nice_component_emit_io_callback (agent=0x7fff6400a2a0, component=0x7fff6401a430, buf=0x7fff7dfeaa70 "\200o", buf_len=88) at component.c:954
  stream_id = 1
        component_id = 1
        io_callback = 0x555555593390 <janus_ice_cb_nice_recv>
        io_user_data = 0x7fff6401e1a0
        __func__ = "nice_component_emit_io_callback"
#4  0x00007ffff7991489 in component_io_cb (gsocket=<optimized out>, condition=<optimized out>, user_data=0x7fff64002e20) at agent.c:5556
        local_buf = "\200o\000\003\000\000\a\200@\247\214\256x\030d\226.n\321\375ϰ\017&lP\206\213\212z%Q\241LE\214\063\252\223q\222\066\215\353\255au\237F\202\025$=\002\275\226\216\216L$\237\241\301\000O\247\205\210\317:\255\271u\277\271c\024\233\060:$\246\307\032\342\002aX\201|\222U\340P\355\217Ak\177q>\377\205Δ\202ݾ\325qd\035\261\245\207+\026X1\373\061\277\355\376\354{IW\245|\324X\037`[S\\\252\317a\031\242\316\361\345\253\325\334B\306\002\024\346\277\066\243\067\016\037\356吶\260\251I\017\206\225\035F\274\306\321\067\266\004\202\240a4Y\004\202_&\332|\337\016e1_\352\301\304\v$\222\372\032f\020\224"...
        local_bufs = {buffer = 0x7fff7dfeaa70, size = 65535}
        local_message = {buffers = 0x7fff7dfeaa00, n_buffers = 1, from = 0x0, length = 88}
        retval = <optimized out>
        socket_source = 0x7fff64002e20
        component = 0x7fff6401a430
        agent = 0x7fff6400a2a0
        stream = 0x7fff64019fd0
        has_io_callback = <optimized out>
        remove_source = 0
        __func__ = "component_io_cb"
#5  0x00007ffff5088039 in  () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007ffff745a285 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff745a650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff745a962 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x000055555558f013 in janus_ice_handle_thread (data=0x7fffc40058b0) at ice.c:1116
        handle = 0x7fffc40058b0
        __FUNCTION__ = "janus_ice_handle_thread"
#10 0x00007ffff7482195 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff5d0f6db in start_thread (arg=0x7fff7dffb700) at pthread_create.c:463
        pd = 0x7fff7dffb700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735307298560, 4878660307081762848, 140735307296320, 0, 93824995254048, 140736741758336, -4878946181651621856, -4878647361755408352}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#12 0x00007ffff5a3888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) 

Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms

We're opening this issue because your project has used Travis CI within the last 6 months. If you have already migrated off it, you can close and ignore this issue.

Travis CI is ending free builds on public repositories. travis-ci.com stopped providingthem in early November, and travis-ci.org will stop after December 31, 2020. To avoid disruptions to your workflows, you must migrate to another CI service.

For production use cases, we recommend switching to CircleCI. This service is already widely used within Mozilla. There is a guide to migrating from Travis CI to CircleCI available here.

For non production use cases, we recommend either CircleCI or Github Actions. There is a guide to migrating from Travis CI to Github Actions available here. Github Actions usage within Mozilla is new, and you will have to work with our github administrators to enable specific actions following this process.

If you have any questions, reach out in #github-admin:mozilla.org on matrix.

Migrate to new Janus configuration style

Right now, the plugin reads its configuration in INI format, like Janus used to, using a Rust library that knows how to parse INIs. But Janus migrated everything else to libconfig-style configuration. So it would make a lot of sense to migrate the plugin configuration, too.

Janus exposes its config reading/writing API in C, so it's probably good to use the API it exposes rather than hunting down a separate Rust library that knows how to read libconfig syntax.

max_ccu setting is misleading

From the naming and the comments in the config, max_ccu seems to imply that it's a user limit, when in reality it appears to be a session limit. Since number of sessions scale as (number of users)^2, the default limit of 1000 actually supports a much smaller number of users than expected.

Possible split brain issue

With latest master https://github.com/mozilla/janus-plugin-sfu/tree/3694c36040eea4de1e80b83447a3625156454956
I reproduced an issue that is quite hallucinating.
I had several reported cases where a person said that after entering a room, they saw nobody. Okay, I thought it was just a connection problem on their end. But here a case I reproduced when testing with another user.
First I assure you that the room id was really the same, we exchanged the link via mail or hmd.link :)

  • Chrome macOS (device from Alice) join the room, Chrome Ubuntu (device from Bob on different network) join the room, both see and hear each other
  • iPhone 6s join, he's alone in the room. With some logging on the frontend, it seems that the backend replied that there was nobody in the room. So the backend in process_join returned that there was nobody in the room get_users returned an empty list.
  • iPhone X (device from Alice) join, he sees only iPhone 6s (device from Alice)
  • iPad (device from Bob) join, he sees both iPhones

So for a given room id, we had two separate groups:

  • Chrome macOS and Chrome Ubuntu
  • iPhone 6s, iPhone X, iPad.

Parallel rooms. :D
We triggered the issue at several occasions. With a single deployed janus instance with message_threads=3 or even with message_threads=1
Every time when we triggered the issue, it was because the iPhone 6s connected to the room...

Without restarting janus and tested right away, just using an other room id, we were 5 in the room...

I know this project is not maintained and I'm on my own, just wanted to leave a trace of the issue for archive. :D

I don't know much about Rust and threads, after reading the code I couldn't figure out what could go wrong.

Did you experience similar issues when you were using the code?

[feature request] JWT valid only for a specific room

Related to the JWT (see #77).
Currently the JWT content can contains { join_hub: true, kick_users: true } because the security model of Hubs was giving access to all rooms in the Hubs Cloud instance. For my use case, I may need more security, only giving access to one or more rooms so I think it would make sense to add an additional optional room_ids parameter like this
{ kick_users: true, room_ids: ["123", "456"] }
(make it plural to support main room with breakout rooms right away)
room_ids and join_hub should be mutually exclusive, only one of this parameter should be in the JWT.
Thoughts?

Intermittent error "Can't subscribe to a nonexistent publisher" despite that user being in the room

Just started noticing this today, using Janus 0.9.0 and master of the SFU. When the client joins a room, it gets a list of all of the users - e.g. {a, b, c, d, e, f}. However, they may fail to subscribe to users {b, c, d} giving the above error, whereas other clients may fail to subscribe to {d, e, f} or other subsets - so I know that the users have not left (I also get a message when they leave). Perhaps this is related to the recent code change that looks up the publishers?

Allow one session to join multiple rooms

Hi, I was checking the plugin implementation, now thinking it looks possible to allow one session to join multiple rooms. Currently, I only need the publisher to be across rooms though. Wondering are you planning to implement this feature? Or is it impossible to add this feature for some logic I didn't notice?

Thanks!

Please update README: Janus package in Debian supports data channels now

Hi, Debian package maintained of Janus here.

I notice that you explicitly warn against using distro-packaged Janus due to of lack of data Channels support. It is correct that until recently Janus in Debian (and by extension derivatives like Ubuntu) did not link against libusrsctp and therefore lacked support for data channels.

Recently, however, libusrsctp got updated and since Janus releases since 0.6.0-2 released 2019-02-07 link against libusrctp and should therefore support data channels.

Please doublecheck, and consider updating README of this project.

Plugin no longer loads with latest libnice and janus-gateway

Seems that janus-gateway > 0.9.5 no longer loads the janus-plugin-sfu module, complaining that API version 14 < 15:

[ERR] [janus.c:main:5053] The 'janus.plugin.sfu' plugin was compiled against an older version of the API (14 < 15), skipping it: update it to enable it again

I rolled back libnice and janus-gateway and was able to get it working again, but it seems some work may be needed to adapt it to the latest versions.

Optimize notify_user to use get_publisher

process_block and process_unblock are using
notify_user(&event, &whom, switchboard.publishers_occupying(&joined.room_id));
so iterating over publishers in the rooms to find the session for the user id whom having notifications:true.
Looking at it for #55 when using multiple rooms, we should iterate in this case over all rooms and all sessions of those rooms to just find the session.
With an old version of the code, iterating over sessions of the room was better than iterating over all the sessions (this was what get_publisher was doing).
But we now have an optimized switchboard and get_publisher(user_id) is just O(1).
I think we can rewrite process_block and process_unblock and notify_user to use get_publisher here.
Note that previously we didn't use the same semantic for publisher, notify_user is searching for a session with notifications:true and in process_join we check for data:true.

I currently don't have the block/unblock feature in my app, so it may be a little bit difficult for me to test any changes, although I could test it in Chrome console and send the request manually.
I may try doing a PR myself in a month for this if I'm going to work on #55.

Use a single queue for message threads instead of round-robin

I finished reading the Rust book! While reading the book I read again the code in janus-plugin-sfu and in janus-plugin-rs where you handle all the Rust - C/C++ conversion and incr/decr refcount for session/jansson/libcstring, I understand it all now, wow, beautiful :)

The last chapter Final Project: Building a Multithreaded Web Server is really interesting.
In the janus-plugin-sfu current implementation for message threads, we use a simple round-robin and a sender/receiver channel for each thread, relevant code here

janus-plugin-sfu/src/lib.rs

Lines 274 to 282 in ef815ec

thread::Builder::new()
.name(format!("sfu msg {}", i))
.spawn(move || {
for msg in messages_rx.iter() {
if let Err(e) = handle_message_async(msg) {
janus_err!("Error processing message: {}", e);
}
}
})

and here

janus-plugin-sfu/src/lib.rs

Lines 775 to 778 in ef815ec

let message_count = MESSAGE_COUNTER.fetch_add(1, Ordering::Relaxed);
let senders = MESSAGE_SENDERS.get().unwrap();
let sender = &senders[message_count % senders.len()];
sender.send(msg).ok();

While reading the chapter and the current janus-plugin-sfu code, I reached the same conclusion as
you wrote in #49 (comment)
If you're using the websocket transport in naf-janus-adapter you can indeed have lots of quick messages for process_data. Hubs didn't use this transport, so janus handled sdp offer/answer primarily.

In the Rust book chapter they use a single sender/receiver, and use an Arc<Mutex<receiver>> to really have a single queue of messages, full code at the end of the chapter

I may propose a PR to change the implementation to that, it will be a good exercise.

About when to send the leave event

I see there is currently a todo comment there

janus-plugin-sfu/src/lib.rs

Lines 336 to 342 in ef815ec

// if this user is entirely disconnected, notify their roommates.
// todo: is it better if this is instead when their publisher disconnects?
if !switchboard.is_connected(&joined.user_id) {
let response = json!({ "event": "leave", "user_id": &joined.user_id, "room_id": &joined.room_id });
let occupants = switchboard.publishers_occupying(&joined.room_id);
notify_except(&response, &joined.user_id, occupants);
}

I had an issue with naf-janus-adapter master (see issue networked-aframe/naf-janus-adapter#21) where the js code can now triggers duplicate avatar on reconnect because of this part of the code I think because the users could possibly never receive the leave event. This is my hypothesis, I don't have proof that the leave event was not send when the issue occurred.

I currently don' plan to investigate this further, just wanted to document it. I currently reverted back to naf-janus-adapter 3.0.x in production.

Crash during meeting

Had a crash happen during meeting, around :34 minute mark at end of this log. Don't see any errors though.

Add a max_sessions option?

I open this for discussion. This is a point I listed in #76

Since #74 we don't count the users connected via the subscribe message anymore for the max_ccu limit (previously based on sessions and not publishers).
To not explode a server with high number of sessions, does it make sense to add another option max_sessions to check the number of sessions?
It may be better to add an api join as listener (not publisher), add a list of listeners struct in the switchboard to be able to count them as users for the max_ccu. max_room_size would still be max publishers in a room, it shouldn't count listeners.

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

could not compile on fresh debian 10 install

trying to set it up on google cloud, only thing I've done is install janus basically. Error is

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
 --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:8:5
  |
8 | use std::mem::MaybeUninit;
  |     ^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:29
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `uninit` found for type `std::mem::MaybeUninit<jansson_sys::json_error_t>` in the current scope
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:71
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ------------------------------------------^^^^^^
   |                             |
   |                             function or associated item not found in `std::mem::MaybeUninit<jansson_sys::json_error_t>`

error: aborting due to 3 previous errors

Some errors occurred: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: Could not compile `janus-plugin`.

To learn more, run the command again with --verbose.

running it with verbose, I get

   Compiling janus-plugin v0.12.0 (https://github.com/mozilla/janus-plugin-rs#d3fba606)
     Running `rustc --edition=2018 --crate-name janus_plugin /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=bc2fa068b9ba60ac -C extra-filename=-bc2fa068b9ba60ac --out-dir /home/kyle/janus-plugin-sfu/target/debug/deps -L dependency=/home/kyle/janus-plugin-sfu/target/debug/deps --extern bitflags=/home/kyle/janus-plugin-sfu/target/debug/deps/libbitflags-da8334855be1adb3.rlib --extern chrono=/home/kyle/janus-plugin-sfu/target/debug/deps/libchrono-95210fb078edc1aa.rlib --extern colored=/home/kyle/janus-plugin-sfu/target/debug/deps/libcolored-8e4c27b188fef94b.rlib --extern glib_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libglib_sys-9a2a32facfff5bea.rlib --extern jansson_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjansson_sys-6ad949b548df7133.rlib --extern janus_plugin_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sys-53b3eb88ca9b5839.rlib --extern libc=/home/kyle/janus-plugin-sfu/target/debug/deps/liblibc-666ffec6133ef2ff.rlib --extern serde=/home/kyle/janus-plugin-sfu/target/debug/deps/libserde-fc68779d6af80be7.rlib --cap-lints allow`
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
 --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:8:5
  |
8 | use std::mem::MaybeUninit;
  |     ^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:29
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `uninit` found for type `std::mem::MaybeUninit<jansson_sys::json_error_t>` in the current scope
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:71
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ------------------------------------------^^^^^^
   |                             |
   |                             function or associated item not found in `std::mem::MaybeUninit<jansson_sys::json_error_t>`

error: aborting due to 3 previous errors

Some errors occurred: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: Could not compile `janus-plugin`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name janus_plugin /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=bc2fa068b9ba60ac -C extra-filename=-bc2fa068b9ba60ac --out-dir /home/kyle/janus-plugin-sfu/target/debug/deps -L dependency=/home/kyle/janus-plugin-sfu/target/debug/deps --extern bitflags=/home/kyle/janus-plugin-sfu/target/debug/deps/libbitflags-da8334855be1adb3.rlib --extern chrono=/home/kyle/janus-plugin-sfu/target/debug/deps/libchrono-95210fb078edc1aa.rlib --extern colored=/home/kyle/janus-plugin-sfu/target/debug/deps/libcolored-8e4c27b188fef94b.rlib --extern glib_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libglib_sys-9a2a32facfff5bea.rlib --extern jansson_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjansson_sys-6ad949b548df7133.rlib --extern janus_plugin_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sys-53b3eb88ca9b5839.rlib --extern libc=/home/kyle/janus-plugin-sfu/target/debug/deps/liblibc-666ffec6133ef2ff.rlib --extern serde=/home/kyle/janus-plugin-sfu/target/debug/deps/libserde-fc68779d6af80be7.rlib --cap-lints allow` (exit code: 1)

Webinar with listeners only

Like I said in #74 (comment)
We currently have in the code the process_subscribe to somewhat subscribe to a publisher without being a publisher yourself. This is something I'm interested in to have potentially a webinar with 1-5 publishers and 100 subscribers.
Note that process_subscribe is not currently used in naf-janus-adapter, we use instead process_join with {media: occupantId} option to subscribe to occupantId.
With #74 we don't count those users anymore for the max_ccu limit (previously based on sessions and not publishers)
Hum process_subscribe is not doing all the checks with the jwt token like process_join is doing, it may be an issue. I think process_subscribe is maybe dead code, maybe we used that instead of process_join with {media: occupantId} in a previous version? And we can't currently use process_subscribe without knowing the occupantId that is returned in the response of using process_join as a publisher...

I'll use below "listener" to denote the user. A listener can have several subscription to publishers. A listener don't have a connection as publisher.

To develop the use case of webinar with listeners only, we need I think

  • a way to get the list of publishers' userid without having to join as a publisher, just an api to get the publishers in the room. (we still need to check jwt validity like we do in process_join)
  • be able to get the number of publishers and listeners (we can return it in the process_subscribe response, need to check jwt validity here too).
  • send event to publishers and listeners that a listener joined or left so we can maintain a counter of participants client side.
  • a listener can become a publisher later and come back to listener afterwards (for the case of a Q/A session).

For this case, chat is done via websocket, not datachannel of course.

Janus API 15 < 16 Build

After building the plugin and installing, I am receiving the following message after starting Janus with the plugin:

Plugins folder: /opt/janus/lib/janus/plugins
Loading plugin 'libjanus_plugin_sfu.so'...
Sessions watchdog started
Joining Janus requests handler thread
[ERR] [janus.c:main:5471] The 'janus.plugin.sfu' plugin was compiled against an older version of the API (15 < 16), skipping it: update it to enable it again

Current Janus server build:

root@janus:~/janus-plugin-sfu# /opt/janus/bin/janus -v
Janus commit: 7c83c093e05400d3c18e0cac08f1b797e35dfe4f
Compiled on:  Mon Feb  7 04:15:10 UTC 2022

Is this plugin being maintained anymore, will this be updated?

Thanks in advance!

Check security token in process_subscribe

This is one of the point listed in #76 and discussed in #81 (comment)

We need to check if the user is allowed to subscribe to a publisher UserId in process_subscribe similar to what we do in process_join by checking publisher.joined.room_id (later room_ids plural, see #55) is in the JWT room_ids.
Even if the user have no publisher and have not joined any room, the user could subscribe to a publisher who has joined some room, as long as the user have a JWT with that room in the publisher room_ids.

We need to change the signature
Subscribe { what: Subscription }
to
Subscribe { what: Subscription, token: String }

The publisher UserID we want to subscribe to is in the param what { media: UserID }

Prometheus instrumentation to get metrics of the switchboard

Add prometheus instrumentation with crates prometheus and prometheus-static-metric to get details of the switchboard like number of rooms, users, sessions to be able to vizualize that with Grafana.
The /metrics endpoint can be added with tide / async_std (this is what janus-conference use) or axum / tokio (see also comments on #93)

An agones Rust SDK integration may be interesting (or not I didn't dig this much yet) to scale horizontally janus instances on kubernetes. The Rust SDK is using tokio as a dependency already, and you get prometheus metrics too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.