Browse Source

libobs: Add warning if created encoder is deprecated

derrod 1 year ago
parent
commit
dac13eb144
1 changed files with 7 additions and 0 deletions
  1. 7 0
      libobs/obs-encoder.c

+ 7 - 0
libobs/obs-encoder.c

@@ -122,6 +122,13 @@ create_encoder(const char *id, enum obs_encoder_type type, const char *name,
 	}
 
 	blog(LOG_DEBUG, "encoder '%s' (%s) created", name, id);
+
+	if (ei->caps & OBS_ENCODER_CAP_DEPRECATED) {
+		blog(LOG_WARNING,
+		     "Encoder ID '%s' is deprecated and may be removed in a future version.",
+		     id);
+	}
+
 	return encoder;
 }