Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOWTO / Feature Request: Dynamic Room Creation #2

Closed
DamonOehlman opened this issue Feb 12, 2014 · 11 comments
Closed

HOWTO / Feature Request: Dynamic Room Creation #2

DamonOehlman opened this issue Feb 12, 2014 · 11 comments

Comments

@DamonOehlman
Copy link
Contributor

I can see that for the plugins that have a concept of rooms that rooms are configured in relevant plugin configuration file, with the room id being identified in an INI file section.

Is there any plans to support dynamic room creation through the API. Or alternatively something similar to the way nginx uses the HUP signal to trigger a reload of configuration files?

I'm fine with either way :)

@meetecho
Copy link
Collaborator

That's definitely planned! The plugins that are available now are mostly proof of concepts, and so there's definitely room for improvement. Adding a further message to create rooms, for instance, would be quite trivial.

A dynamic approach is what we're aiming at for all plugins. The idea I have of the streaming plugin, for instance, is something like icecast where you can dynamically allocate a mountpoint and stream to it. I'll keep you posted on updates in that direction.

@meetecho
Copy link
Collaborator

Hi Damon,

I just commited a change that adds a new "create" request to the API of both the Audio Bridge and Video MCU plugins. There are no hooks in the demo examples yet, but I did a quick test and they behave as expected. The syntax of the plugin messages is quite simple and mirrors what can be configured in the INI:

Audio Bridge
{
"request" : "create",
"description" : "My awesome room",
"sampling" : 16000,
"record" : false
}

Video Room:
{
"request" : "create",
"description" : "My awesome videoroom",
"bitrate" : 256000,
"publishers" : 3
}

The only mandatory field in both messages is the request: if the other ones are missing, defaults are used. The response messages in both cases contain a "room" field with the newly created numeric ID.

Let me know if they work for you.

@DamonOehlman
Copy link
Contributor Author

Awesome - thanks mate. Will check it out tomorrow :)

@DamonOehlman
Copy link
Contributor Author

@meetecho Works fantastically. I've added some tests (for the audiobridge plugin at least) to in the rtc-janus module that I'm currently working on:

https://github.com/rtc-io/rtc-janus/blob/master/test/audiobridge.js

@meetecho
Copy link
Collaborator

@DamonOehlman that's amazing! I'm looking forward to your efforts myself as soon as I can!

@warrenjmcdonald
Copy link

@DamonOehlman you beat me to this question. @meetecho Thank you. This will make testing a proof of concept for audio recording quite easy. Looking forward to working with you both on this.

Warren

@meetecho
Copy link
Collaborator

meetecho commented Mar 1, 2014

Hi Warren,

just FYI, the Audio Bridge plugin already has a rough recording mechanism in place. Right now, if enabled (record=yes in the configuration, record=true in the API create request), the mixed audio for each room is saved as an uncompressed WAV in /tmp. The VoiceMail plugin also has a way to record the incoming audio stream to an .opus file instead, something that we'll extend to video and add to the Video MCIU plugin as well in the future.

Hope that helps!

@Will-I4M
Copy link

is there any "destroy" associated command we can use ?
thanks for your reply.

@benwtrent
Copy link
Contributor

yes, you can reference the video room and destroy it through a synchronous command.

@Ajmal1990
Copy link

Can I able to create a room with a specific name like "room 1" ? What is the latest status of dynamic room creation and destroying? No mentions in the docs?

@cacheworks
Copy link

@Ajmal1990
Yes you can, as described in this comment, just change the description;
#2 (comment)

The videoroom plugin API requests are mentioned here; https://janus.conf.meetecho.com/docs/janus__videoroom_8c.html#sfuapi

DmitryYudin added a commit to DmitryYudin/janus-gateway that referenced this issue Dec 28, 2018
mom-informative stack unwind if leak detected in so-module

====================================================================================== default:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603af545c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603afa61a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).

====================================================================================== no_fast_unwind:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d445c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f35537d9646 in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x8646)
    meetecho#3 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#4 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#5 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d961a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#3 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#4 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).
DmitryYudin added a commit to DmitryYudin/janus-gateway that referenced this issue Jan 24, 2019
mom-informative stack unwind if leak detected in so-module

====================================================================================== default:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603af545c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f3603afa61a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).

====================================================================================== no_fast_unwind:
Indirect leak of 128 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d445c  (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c)
    meetecho#2 0x7f35537d9646 in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x8646)
    meetecho#3 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#4 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#5 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    meetecho#1 0x7f35537d961a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a)
    meetecho#2 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269
    meetecho#3 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    meetecho#4 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9)
SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).
@ubonass ubonass mentioned this issue Aug 10, 2020
@mightZhong mightZhong mentioned this issue Feb 3, 2021
pontscho added a commit to pontscho/janus-gateway that referenced this issue Mar 25, 2021
IbrayevRamil added a commit to IbrayevRamil/janus-gateway that referenced this issue Aug 7, 2023
IbrayevRamil added a commit to IbrayevRamil/janus-gateway that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants