jim-nvenc.h 815 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #define WIN32_LEAN_AND_MEAN
  3. #include <windows.h>
  4. #include <obs-module.h>
  5. #include "external/nvEncodeAPI.h"
  6. #include "jim-nvenc-ver.h"
  7. typedef NVENCSTATUS(NVENCAPI *NV_CREATE_INSTANCE_FUNC)(
  8. NV_ENCODE_API_FUNCTION_LIST *);
  9. extern const char *nv_error_name(NVENCSTATUS err);
  10. extern NV_ENCODE_API_FUNCTION_LIST nv;
  11. extern NV_CREATE_INSTANCE_FUNC nv_create_instance;
  12. extern bool init_nvenc(obs_encoder_t *encoder);
  13. bool nv_fail2(obs_encoder_t *encoder, void *session, const char *format, ...);
  14. bool nv_failed2(obs_encoder_t *encoder, void *session, NVENCSTATUS err,
  15. const char *func, const char *call);
  16. #define nv_fail(encoder, format, ...) \
  17. nv_fail2(encoder, enc->session, format, ##__VA_ARGS__)
  18. #define nv_failed(encoder, err, func, call) \
  19. nv_failed2(encoder, enc->session, err, func, call)