Revision ae62ca8f

View differences:

plugins/janus_videoroom.c
248 248
static struct janus_json_parameter rtp_forward_parameters[] = {
249 249
	{"room", JSON_INTEGER, JANUS_JSON_PARAM_REQUIRED | JANUS_JSON_PARAM_POSITIVE},
250 250
	{"publisher_id", JSON_INTEGER, JANUS_JSON_PARAM_REQUIRED | JANUS_JSON_PARAM_POSITIVE},
251
	{"vid_port", JSON_INTEGER, JANUS_JSON_PARAM_POSITIVE},
252
	{"au_port", JSON_INTEGER, JANUS_JSON_PARAM_POSITIVE},
251
	{"video_port", JSON_INTEGER, JANUS_JSON_PARAM_POSITIVE},
252
	{"audio_port", JSON_INTEGER, JANUS_JSON_PARAM_POSITIVE},
253 253
	{"host", JSON_STRING, JANUS_JSON_PARAM_REQUIRED}
254 254
};
255 255
static struct janus_json_parameter stop_rtp_forward_parameters[] = {
......
1789 1789
				json_t *fl = json_object();
1790 1790
				guint32 rpk = GPOINTER_TO_UINT(key_f);
1791 1791
				rtp_forwarder *rpv = value_f;
1792
				json_object_set_new(fl, "ip" , json_string(inet_ntoa(rpv->serv_addr.sin_addr)));
1792
				json_object_set_new(fl, "ip", json_string(inet_ntoa(rpv->serv_addr.sin_addr)));
1793 1793
				if(rpv->is_video > 0) {
1794
					json_object_set_new(fl, "video_stream_id" , json_integer(rpk));
1795
					json_object_set_new(fl, "port" , json_integer(ntohs(rpv->serv_addr.sin_port)));
1796
                		} else {
1797
					json_object_set_new(fl, "audio_stream_id" , json_integer(rpk));
1798
					json_object_set_new(fl, "port" , json_integer(ntohs(rpv->serv_addr.sin_port)));
1794
					json_object_set_new(fl, "video_stream_id", json_integer(rpk));
1795
					json_object_set_new(fl, "port", json_integer(ntohs(rpv->serv_addr.sin_port)));
1796
				} else {
1797
					json_object_set_new(fl, "audio_stream_id", json_integer(rpk));
1798
					json_object_set_new(fl, "port", json_integer(ntohs(rpv->serv_addr.sin_port)));
1799 1799
				}
1800
			json_array_append_new(flist, fl);
1800
				json_array_append_new(flist, fl);
1801 1801
			}		
1802 1802
			janus_mutex_unlock(&p->rtp_forwarders_mutex);
1803 1803
			json_object_set_new(pl, "rtp_forwarder", flist);
......
1962 1962
		rtp_header *rtp = (rtp_header *)buf;
1963 1963
		rtp->type = video ? participant->video_pt : participant->audio_pt;
1964 1964
		rtp->ssrc = htonl(video ? participant->video_ssrc : participant->audio_ssrc);
1965
		/* Forward RTP to the appropriate port for the rtp_forwarders associated wih this publisher, if there are any */
1965
		/* Forward RTP to the appropriate port for the rtp_forwarders associated with this publisher, if there are any */
1966 1966
		GHashTableIter iter;
1967 1967
		gpointer value;
1968 1968
		g_hash_table_iter_init(&iter, participant->rtp_forwarders);

Also available in: Unified diff