FS-7514: refresh req on vlc channel
This commit is contained in:
parent
78efac8154
commit
d33e5659f6
|
@ -114,6 +114,7 @@ struct vlc_video_context {
|
|||
int height;
|
||||
int force_width;
|
||||
int force_height;
|
||||
int video_refresh_req;
|
||||
};
|
||||
|
||||
typedef struct vlc_video_context vlc_video_context_t;
|
||||
|
@ -345,6 +346,11 @@ static void vlc_video_channel_unlock_callback(void *data, void *id, void *const
|
|||
context->last_video_ts = now;
|
||||
}
|
||||
|
||||
if (context->video_refresh_req > 0) {
|
||||
flag |= SFF_WAIT_KEY_FRAME;
|
||||
context->video_refresh_req--;
|
||||
}
|
||||
|
||||
switch_core_codec_encode_video(codec, context->img, frame->data, &encoded_data_len, &flag);
|
||||
|
||||
while(encoded_data_len) {
|
||||
|
@ -1465,6 +1471,9 @@ static switch_status_t vlc_receive_message(switch_core_session_t *session, switc
|
|||
break;
|
||||
case SWITCH_MESSAGE_INDICATE_JITTER_BUFFER:
|
||||
break;
|
||||
case SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ:
|
||||
tech_pvt->context->video_refresh_req = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue