mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: Better format for force codec debug logs
parent
7a25233b8b
commit
7ddde2fbc4
|
@ -155,29 +155,41 @@ public class SDPMunging {
|
|||
try {
|
||||
if (supportedVideoCodecs.contains(forcedVideoCodec)) {
|
||||
String mungedSdpOffer;
|
||||
log.debug("PARTICIPANT '{}' in Session '{}'. Is Publisher: '{}'. Is Subscriber: '{}'. Is Offer SDP: '{}'. " +
|
||||
"Is Answer SDP: '{}'. Is Reconnecting '{}'. SDP before munging: \n {}", participant.getParticipantPublicId(),
|
||||
|
||||
log.debug("PARTICIPANT '{}' in Session '{}'. Is Publisher: '{}'. Is Subscriber: '{}'."
|
||||
+ " Is Offer SDP: '{}'. Is Answer SDP: '{}'. Is Reconnecting '{}'."
|
||||
+ " SDP before munging: \n {}", participant.getParticipantPublicId(),
|
||||
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting, sdp);
|
||||
|
||||
mungedSdpOffer = this.setCodecPreference(forcedVideoCodec, sdp);
|
||||
log.debug("PARTICIPANT '{}' in Session '{}'. Is Publisher: '{}'. Is Subscriber: '{}'. Is Offer SDP: '{}'. " +
|
||||
"Is Answer SDP: '{}'. Is Reconnecting '{}'. SDP after munging: \n {}", participant.getParticipantPublicId(),
|
||||
|
||||
log.debug("PARTICIPANT '{}' in Session '{}'. Is Publisher: '{}'. Is Subscriber: '{}'."
|
||||
+ " Is Offer SDP: '{}'. Is Answer SDP: '{}'. Is Reconnecting '{}'."
|
||||
+ " SDP after munging: \n {}", participant.getParticipantPublicId(),
|
||||
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting, mungedSdpOffer);
|
||||
|
||||
return mungedSdpOffer;
|
||||
} else {
|
||||
throw new OpenViduException(Code.FORCED_CODEC_NOT_FOUND_IN_SDPOFFER, "Codec not supported by Media Server");
|
||||
}
|
||||
|
||||
} catch (OpenViduException e) {
|
||||
String errorMessage = "Error forcing codec: '" + forcedVideoCodec + "', for PARTICIPANT: '" + participant.getParticipantPublicId()
|
||||
+ "' in Session: '" + session.getSessionId() + "'. Is publishing: '" + isPublisher + "'. Is Subscriber: '" + !isPublisher
|
||||
|
||||
String errorMessage = "Error forcing codec: '" + forcedVideoCodec + "', for PARTICIPANT: '"
|
||||
+ participant.getParticipantPublicId() + "' in Session: '" + session.getSessionId()
|
||||
+ "'. Is publishing: '" + isPublisher + "'. Is Subscriber: '" + !isPublisher
|
||||
+ "'. Is Offer: '" + isOffer + "'. Is Answer: '" + !isOffer + "'. Is Reconnecting: '"
|
||||
+ isReconnecting + "'.\nException: " + e.getMessage() + "\nSDP:\n" + sdp;
|
||||
|
||||
if(!isTranscodingAllowed) {
|
||||
throw new OpenViduException(Code.FORCED_CODEC_NOT_FOUND_IN_SDPOFFER, errorMessage);
|
||||
}
|
||||
log.info("Codec: '{}' is not supported for PARTICIPANT: '{}' in Session: '{}'. Is publishing: '{}'. Is Subscriber: '{}' "
|
||||
+ "Is Offer SDP: '{}'. Is Answer SDP: '{}'. Is Reconnecting: '{}'. Transcoding will be allowed", forcedVideoCodec, participant.getParticipantPublicId(),
|
||||
|
||||
log.info("Codec: '{}' is not supported for PARTICIPANT: '{}' in Session: '{}'. Is publishing: '{}'. "
|
||||
+ "Is Subscriber: '{}' Is Offer SDP: '{}'. Is Answer SDP: '{}'. Is Reconnecting: '{}'."
|
||||
+ " Transcoding will be allowed", forcedVideoCodec, participant.getParticipantPublicId(),
|
||||
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting);
|
||||
|
||||
return sdp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue