]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core, mod_verto] double udp buffer for audio, add verto command for video refresh
authorAnthony Minessale <anthm@signalwire.com>
Wed, 5 Aug 2020 01:39:11 +0000 (01:39 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:01:00 +0000 (22:01 +0300)
src/mod/endpoints/mod_verto/mod_verto.c
src/switch_rtp.c

index fb5c26bd5098a2e7642b8e57539d4099ecf7fead..8f8c1ca92672f7733c12a2ba69638b8d01f08892 100644 (file)
@@ -3323,8 +3323,11 @@ static switch_bool_t verto__modify_func(const char *method, cJSON *params, jsock
 
        if ((session = switch_core_session_locate(call_id))) {
                tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
-               
-               if (!strcasecmp(action, "updateMedia")) {
+
+               if (!strcasecmp(action, "videoRefresh")) {
+                       switch_core_media_gen_key_frame(tech_pvt->session);
+                       switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_REFRESH_REQ);
+               } else if (!strcasecmp(action, "updateMedia")) {
                        const char *sdp = NULL;
                        uint8_t match = 0, p = 0;
 
index 02b79362e7970a093d7b0a8c5a07863c15f0672d..1880bbb19cb36e14f780b3df294beb040824982c 100644 (file)
@@ -2921,10 +2921,13 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
                goto done;
        }
 
-       //if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
-       //      switch_socket_opt_set(new_sock, SWITCH_SO_RCVBUF, 1572864);
-       //      switch_socket_opt_set(new_sock, SWITCH_SO_SNDBUF, 1572864);
-       //}
+       if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
+               switch_socket_opt_set(new_sock, SWITCH_SO_RCVBUF, 1572864);
+               switch_socket_opt_set(new_sock, SWITCH_SO_SNDBUF, 1572864);
+       } else {
+               switch_socket_opt_set(new_sock, SWITCH_SO_RCVBUF, 851968);
+               switch_socket_opt_set(new_sock, SWITCH_SO_SNDBUF, 851968);
+       }
 
        if (switch_socket_bind(new_sock, rtp_session->local_addr) != SWITCH_STATUS_SUCCESS) {
                char *em = switch_core_sprintf(rtp_session->pool, "Bind Error! %s:%d", host, port);