mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-29 04:15:00 +00:00
Initialize SreenIndexIsPinnedToFb to -1. Adds debugging for xsig tokens
This commit is contained in:
@@ -90,5 +90,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
public bool HandIsRaisedFb { get; set; }
|
||||
public bool IsPinnedFb { get; set; }
|
||||
public int ScreenIndexIsPinnedToFb { get; set; }
|
||||
|
||||
public Participant()
|
||||
{
|
||||
// Initialize to -1 (no screen)
|
||||
ScreenIndexIsPinnedToFb = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -530,28 +530,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
// make sure to update the values when the EISC comes online
|
||||
trilist.OnlineStatusChange += (sender, args) =>
|
||||
{
|
||||
if (sender.IsOnline)
|
||||
{
|
||||
UpdateParticipantsXSig(codec, trilist, joinMap);
|
||||
}
|
||||
};
|
||||
|
||||
// set actions and update the values when the list changes
|
||||
codec.Participants.ParticipantsListHasChanged += (sender, args) =>
|
||||
{
|
||||
string participantsXSig;
|
||||
|
||||
if (codec.Participants.CurrentParticipants.Count == 0)
|
||||
{
|
||||
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
|
||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants);
|
||||
|
||||
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
|
||||
|
||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||
|
||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||
UpdateParticipantsXSig(codec, trilist, joinMap);
|
||||
};
|
||||
}
|
||||
|
||||
private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
string participantsXSig;
|
||||
|
||||
if (codec.Participants.CurrentParticipants.Count == 0)
|
||||
{
|
||||
participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length);
|
||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
|
||||
|
||||
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
|
||||
|
||||
trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the actions for each participant in the list
|
||||
/// </summary>
|
||||
@@ -615,19 +630,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
Debug.Console(2, this,
|
||||
@"Updating Participant on xsig:
|
||||
Name: {0} (s{8})
|
||||
AudioMute: {1} (d{9})
|
||||
VideoMute: {2} (d{10})
|
||||
CanMuteVideo: {3} ({d11})
|
||||
IsHost: {4} (d{12})
|
||||
HandIsRaised: {5} (d{13})
|
||||
IsPinned: {6} (d{14})
|
||||
ScreenIndexIsPinnedTo: {7} (a{15})
|
||||
Name: {0} (s{9})
|
||||
AudioMute: {1} (d{10})
|
||||
VideoMute: {2} (d{11})
|
||||
CanMuteVideo: {3} (d{12})
|
||||
CanUMuteVideo: {4} (d{13})
|
||||
IsHost: {5} (d{14})
|
||||
HandIsRaised: {6} (d{15})
|
||||
IsPinned: {7} (d{16})
|
||||
ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
",
|
||||
participant.Name,
|
||||
participant.AudioMuteFb,
|
||||
participant.VideoMuteFb,
|
||||
participant.CanMuteVideo,
|
||||
participant.CanUnmuteVideo,
|
||||
participant.IsHost,
|
||||
participant.HandIsRaisedFb,
|
||||
participant.IsPinnedFb,
|
||||
@@ -653,6 +670,8 @@ ScreenIndexIsPinnedTo: {7} (a{15})
|
||||
tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
|
||||
tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb);
|
||||
|
||||
Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes()));
|
||||
|
||||
//serials
|
||||
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
|
||||
|
||||
@@ -688,7 +707,12 @@ ScreenIndexIsPinnedTo: {7} (a{15})
|
||||
analogIndex += maxAnalogs;
|
||||
}
|
||||
|
||||
return GetXSigString(tokenArray);
|
||||
var returnString = GetXSigString(tokenArray);
|
||||
|
||||
//Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString)));
|
||||
|
||||
|
||||
return returnString;
|
||||
}
|
||||
|
||||
private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
|
||||
Reference in New Issue
Block a user