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 {
|
try {
|
||||||
if (supportedVideoCodecs.contains(forcedVideoCodec)) {
|
if (supportedVideoCodecs.contains(forcedVideoCodec)) {
|
||||||
String mungedSdpOffer;
|
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);
|
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting, sdp);
|
||||||
|
|
||||||
mungedSdpOffer = this.setCodecPreference(forcedVideoCodec, 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);
|
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting, mungedSdpOffer);
|
||||||
|
|
||||||
return mungedSdpOffer;
|
return mungedSdpOffer;
|
||||||
} else {
|
} else {
|
||||||
throw new OpenViduException(Code.FORCED_CODEC_NOT_FOUND_IN_SDPOFFER, "Codec not supported by Media Server");
|
throw new OpenViduException(Code.FORCED_CODEC_NOT_FOUND_IN_SDPOFFER, "Codec not supported by Media Server");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (OpenViduException e) {
|
} 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: '"
|
+ "'. Is Offer: '" + isOffer + "'. Is Answer: '" + !isOffer + "'. Is Reconnecting: '"
|
||||||
+ isReconnecting + "'.\nException: " + e.getMessage() + "\nSDP:\n" + sdp;
|
+ isReconnecting + "'.\nException: " + e.getMessage() + "\nSDP:\n" + sdp;
|
||||||
|
|
||||||
if(!isTranscodingAllowed) {
|
if(!isTranscodingAllowed) {
|
||||||
throw new OpenViduException(Code.FORCED_CODEC_NOT_FOUND_IN_SDPOFFER, errorMessage);
|
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);
|
session.getSessionId(), isPublisher, !isPublisher, isOffer, !isOffer, isReconnecting);
|
||||||
|
|
||||||
return sdp;
|
return sdp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue