Refactor reference frame invalidation checks into one function

This commit is contained in:
Cameron Gutman
2017-11-30 23:14:11 -08:00
parent 26fe1cb22c
commit 069f1475b6
4 changed files with 10 additions and 9 deletions

View File

@@ -80,6 +80,12 @@ int extractVersionQuadFromString(const char* string, int* quad) {
return 0;
}
int isReferenceFrameInvalidationEnabled(void) {
LC_ASSERT(NegotiatedVideoFormat != 0);
return ((NegotiatedVideoFormat & VIDEO_FORMAT_MASK_H264) && (VideoCallbacks.capabilities & CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC)) ||
((NegotiatedVideoFormat & VIDEO_FORMAT_MASK_H265) && (VideoCallbacks.capabilities & CAPABILITY_REFERENCE_FRAME_INVALIDATION_HEVC));
}
void LiInitializeStreamConfiguration(PSTREAM_CONFIGURATION streamConfig) {
memset(streamConfig, 0, sizeof(*streamConfig));
}