Move serverCodecModeSupport into SERVER_INFORMATION struct

This commit is contained in:
Cameron Gutman 2023-07-02 23:54:04 -05:00
parent effba1a16f
commit 9ad56cdd8e
2 changed files with 5 additions and 6 deletions

View File

@ -65,9 +65,6 @@ typedef struct _STREAM_CONFIGURATION {
// See VIDEO_FORMAT constants below.
int supportedVideoFormats;
// Specifies the 'ServerCodecModeSupport' from the /serverinfo response.
int serverCodecModeSupport;
// Specifies the percentage that the specified bitrate will be adjusted
// when an HEVC stream will be delivered. This allows clients to opt to
// reduce bandwidth when HEVC is chosen as the video codec rather than
@ -490,7 +487,6 @@ typedef struct _CONNECTION_LISTENER_CALLBACKS {
// Use this function to zero the connection callbacks when allocated on the stack or heap
void LiInitializeConnectionCallbacks(PCONNECTION_LISTENER_CALLBACKS clCallbacks);
typedef struct _SERVER_INFORMATION {
// Server host name or IP address in text form
const char* address;
@ -503,6 +499,9 @@ typedef struct _SERVER_INFORMATION {
// Text inside 'sessionUrl0' tag in /resume and /launch (if present)
const char* rtspSessionUrl;
// Specifies the 'ServerCodecModeSupport' from the /serverinfo response.
int serverCodecModeSupport;
} SERVER_INFORMATION, *PSERVER_INFORMATION;
// Use this function to zero the server information when allocated on the stack or heap

View File

@ -905,7 +905,7 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) {
}
if ((StreamConfig.supportedVideoFormats & VIDEO_FORMAT_MASK_AV1) && strstr(response.payload, "AV1/90000")) {
if ((StreamConfig.serverCodecModeSupport & SCM_AV1_MAIN10) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_AV1_MAIN10)) {
if ((serverInfo->serverCodecModeSupport & SCM_AV1_MAIN10) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_AV1_MAIN10)) {
NegotiatedVideoFormat = VIDEO_FORMAT_AV1_MAIN10;
}
else {
@ -925,7 +925,7 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) {
// server can support HEVC. For some reason, they still set the MIME type of the HEVC
// format to H264, so we can't just look for the HEVC MIME type. What we'll do instead is
// look for the base 64 encoded VPS NALU prefix that is unique to the HEVC bitstream.
if ((StreamConfig.serverCodecModeSupport & SCM_HEVC_MAIN10) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_H265_MAIN10)) {
if ((serverInfo->serverCodecModeSupport & SCM_HEVC_MAIN10) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_H265_MAIN10)) {
NegotiatedVideoFormat = VIDEO_FORMAT_H265_MAIN10;
}
else {