mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
libobs: Add obs_get_encoder_codec function
This allows the ability to get the codec of an encoder via its identifier string
This commit is contained in:
parent
0aec530e23
commit
0e398c89be
|
@ -446,6 +446,12 @@ const char *obs_encoder_get_codec(const obs_encoder_t *encoder)
|
|||
return encoder ? encoder->info.codec : NULL;
|
||||
}
|
||||
|
||||
const char *obs_get_encoder_codec(const char *id)
|
||||
{
|
||||
struct obs_encoder_info *info = find_encoder(id);
|
||||
return info ? info->codec : NULL;
|
||||
}
|
||||
|
||||
void obs_encoder_set_scaled_size(obs_encoder_t *encoder, uint32_t width,
|
||||
uint32_t height)
|
||||
{
|
||||
|
|
|
@ -1192,6 +1192,9 @@ EXPORT void obs_encoder_destroy(obs_encoder_t *encoder);
|
|||
EXPORT void obs_encoder_set_name(obs_encoder_t *encoder, const char *name);
|
||||
EXPORT const char *obs_encoder_get_name(const obs_encoder_t *encoder);
|
||||
|
||||
/** Returns the codec of an encoder by the id */
|
||||
EXPORT const char *obs_get_encoder_codec(const char *id);
|
||||
|
||||
/** Returns the codec of the encoder */
|
||||
EXPORT const char *obs_encoder_get_codec(const obs_encoder_t *encoder);
|
||||
|
||||
|
|
Loading…
Reference in a new issue