Add groupCall.is_rtmp_stream.

This commit is contained in:
levlam 2022-02-22 21:16:10 +03:00
parent 8772984a69
commit 54b143e91d
2 changed files with 12 additions and 5 deletions

View File

@ -2342,6 +2342,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@scheduled_start_date Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 if it is already active or was ended
//@enabled_start_notification True, if the group call is scheduled and the current user will receive a notification when the group call will start
//@is_active True, if the call is active
//@is_rtmp_stream True, if the chat is an RTMP stream instead of an ordinary video chat
//@is_joined True, if the call is joined
//@need_rejoin True, if user was kicked from the call because of network loss and the call needs to be rejoined
//@can_be_managed True, if the current user can manage the group call
@ -2356,7 +2357,7 @@ groupCallRecentSpeaker participant_id:MessageSender is_speaking:Bool = GroupCall
//@record_duration Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on
//@is_video_recorded True, if a video file is being recorded for the call
//@duration Call duration, in seconds; for ended calls only
groupCall id:int32 title:string scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_joined:Bool need_rejoin:Bool can_be_managed:Bool participant_count:int32 loaded_all_participants:Bool recent_speakers:vector<groupCallRecentSpeaker> is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall;
groupCall id:int32 title:string scheduled_start_date:int32 enabled_start_notification:Bool is_active:Bool is_rtmp_stream:Bool is_joined:Bool need_rejoin:Bool can_be_managed:Bool participant_count:int32 loaded_all_participants:Bool recent_speakers:vector<groupCallRecentSpeaker> is_my_video_enabled:Bool is_my_video_paused:Bool can_enable_video:Bool mute_new_participants:Bool can_toggle_mute_new_participants:Bool record_duration:int32 is_video_recorded:Bool duration:int32 = GroupCall;
//@description Describes a group of video synchronization source identifiers @semantics The semantics of sources, one of "SIM" or "FID" @source_ids The list of synchronization source identifiers
groupCallVideoSourceGroup semantics:string source_ids:vector<int32> = GroupCallVideoSourceGroup;

View File

@ -849,6 +849,7 @@ struct GroupCallManager::GroupCall {
string title;
bool is_inited = false;
bool is_active = false;
bool is_rtmp_stream = false;
bool is_joined = false;
bool need_rejoin = false;
bool is_being_left = false;
@ -4136,6 +4137,7 @@ InputGroupCallId GroupCallManager::update_group_call(const tl_object_ptr<telegra
auto group_call = static_cast<const telegram_api::groupCall *>(group_call_ptr.get());
input_group_call_id = InputGroupCallId(group_call->id_, group_call->access_hash_);
call.is_active = true;
call.is_rtmp_stream = group_call->rtmp_stream_;
call.title = group_call->title_;
call.start_subscribed = group_call->schedule_start_subscribed_;
call.mute_new_participants = group_call->join_muted_;
@ -4258,6 +4260,10 @@ InputGroupCallId GroupCallManager::update_group_call(const tl_object_ptr<telegra
*group_call = std::move(call);
need_update = true;
} else {
if (call.is_rtmp_stream != group_call->is_rtmp_stream) {
group_call->is_rtmp_stream = call.is_rtmp_stream;
need_update = true;
}
if ((call.unmuted_video_count != group_call->unmuted_video_count ||
call.unmuted_video_limit != group_call->unmuted_video_limit) &&
call.can_enable_video_version >= group_call->can_enable_video_version) {
@ -4727,10 +4733,10 @@ tl_object_ptr<td_api::groupCall> GroupCallManager::get_group_call_object(
bool is_video_recorded = get_group_call_is_video_recorded(group_call);
return td_api::make_object<td_api::groupCall>(
group_call->group_call_id.get(), get_group_call_title(group_call), scheduled_start_date, start_subscribed,
is_active, is_joined, group_call->need_rejoin, group_call->can_be_managed, group_call->participant_count,
group_call->loaded_all_participants, std::move(recent_speakers), is_my_video_enabled, is_my_video_paused,
can_enable_video, mute_new_participants, can_toggle_mute_new_participants, record_duration, is_video_recorded,
group_call->duration);
is_active, group_call->is_rtmp_stream, is_joined, group_call->need_rejoin, group_call->can_be_managed,
group_call->participant_count, group_call->loaded_all_participants, std::move(recent_speakers),
is_my_video_enabled, is_my_video_paused, can_enable_video, mute_new_participants,
can_toggle_mute_new_participants, record_duration, is_video_recorded, group_call->duration);
}
tl_object_ptr<td_api::updateGroupCall> GroupCallManager::get_update_group_call_object(