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

[1.x] It cannot get the info about "audiolevel_ext_id""videoorient_ext_id""playoutdelay_ext_id" of remote publisher #3252

Open
jamken opened this issue Aug 6, 2023 · 2 comments
Labels
enhancement multistream Related to Janus 1.x

Comments

@jamken
Copy link

jamken commented Aug 6, 2023

What version of Janus is this happening on?
v1.1.4 about cascade featre

Have you tested a more recent version of Janus too?
Yes

Was this working before?
No

Is there a gdb or libasan trace of the issue?
No

Additional context

hi, @lminiero

I am the maintainer of Janus-cloud (https://github.com/OpenSight/janus-cloud), which is a orchestrator of Janus-gateway. When I try to support the cascade feature for Janus-gateway, I found I don't know about"audiolevel_ext_id""videoorient_ext_id""playoutdelay_ext_id" info of remote publisher when invoking "add_remote_publisher" and "update_remote_publisher" request. The other stream's info, like type, code, mid, can be retrieved from the reply of the "publish" request for the original publisher. So, maybe Janus-gateway can add these stream's info ("audiolevel_ext_id""videoorient_ext_id""playoutdelay_ext_id" ) to the reply of "publish/configure" request of the normal publisher in next version. The current code which return the publisher's stream info is like below:

       while(temp) {
              ......
					temp = temp->next;
					/* Add to the info we send back to the publisher */
					json_t *info = json_object();
					json_object_set_new(info, "type", json_string(janus_videoroom_media_str(ps->type)));
					json_object_set_new(info, "mindex", json_integer(ps->mindex));
					json_object_set_new(info, "mid", json_string(ps->mid));
					if(ps->disabled) {
						json_object_set_new(info, "disabled", json_true());
					} else {
						if(ps->description)
							json_object_set_new(info, "description", json_string(ps->description));
						if(ps->type == JANUS_VIDEOROOM_MEDIA_AUDIO) {
							json_object_set_new(info, "codec", json_string(janus_audiocodec_name(ps->acodec)));
							if(ps->acodec == JANUS_AUDIOCODEC_OPUS) {
								if(ps->opusstereo)
									json_object_set_new(info, "stereo", json_true());
								if(ps->opusfec)
									json_object_set_new(info, "fec", json_true());
								if(ps->opusdtx)
									json_object_set_new(info, "dtx", json_true());
							}
						} else if(ps->type == JANUS_VIDEOROOM_MEDIA_VIDEO) {
							json_object_set_new(info, "codec", json_string(janus_videocodec_name(ps->vcodec)));
							if(ps->vcodec == JANUS_VIDEOCODEC_H264 && ps->h264_profile != NULL)
								json_object_set_new(info, "h264_profile", json_string(ps->h264_profile));
							else if(ps->vcodec == JANUS_VIDEOCODEC_VP9 && ps->vp9_profile != NULL)
								json_object_set_new(info, "vp9_profile", json_string(ps->vp9_profile));
							if(ps->simulcast)
								json_object_set_new(info, "simulcast", json_true());
							if(ps->svc)
								json_object_set_new(info, "svc", json_true());
						}
					}
					json_array_append_new(media, info);
				}


If Janus-gateway can return "audiolevel_ext_id""videoorient_ext_id""playoutdelay_ext_id" for the normal publisher, it's more convenient for orchestrator to create the remote publisher. Thanks

@jamken jamken added the multistream Related to Janus 1.x label Aug 6, 2023
@lminiero
Copy link
Member

lminiero commented Aug 9, 2023

The whole team is on vacation, we'll have a look when we're back in a few weeks.

@lminiero
Copy link
Member

This sounds like a useful feature. Feel free to submit a pull request with the changes you'd need, and I'll have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement multistream Related to Janus 1.x
Projects
None yet
Development

No branches or pull requests

3 participants