libobs: Add obs_encoder_video_tex_active()
This commit is contained in:
parent
9e3d0eb31b
commit
3b1a66f632
2 changed files with 16 additions and 0 deletions
|
|
@ -2068,3 +2068,16 @@ void obs_encoder_group_destroy(obs_encoder_group_t *group)
|
|||
|
||||
obs_encoder_group_actually_destroy(group);
|
||||
}
|
||||
|
||||
bool obs_encoder_video_tex_active(const obs_encoder_t *encoder,
|
||||
enum video_format format)
|
||||
{
|
||||
struct obs_core_video_mix *mix = get_mix_for_video(encoder->media);
|
||||
|
||||
if (format == VIDEO_FORMAT_NV12)
|
||||
return mix->using_nv12_tex;
|
||||
if (format == VIDEO_FORMAT_P010)
|
||||
return mix->using_p010_tex;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2300,6 +2300,9 @@ EXPORT video_t *obs_encoder_video(const obs_encoder_t *encoder);
|
|||
*/
|
||||
EXPORT video_t *obs_encoder_parent_video(const obs_encoder_t *encoder);
|
||||
|
||||
/** Returns if the encoder's video output context supports shared textures for the specified video format. */
|
||||
EXPORT bool obs_encoder_video_tex_active(const obs_encoder_t *encoder, enum video_format format);
|
||||
|
||||
/**
|
||||
* Returns the audio output context used with this encoder, or NULL if not
|
||||
* a audio context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue