obs-outputs.c 444 B

123456789101112131415161718192021222324252627282930
  1. #include <obs-module.h>
  2. #ifdef _WIN32
  3. #define WIN32_LEAN_AND_MEAN
  4. #include <winsock2.h>
  5. #endif
  6. OBS_DECLARE_MODULE()
  7. extern struct obs_output_info rtmp_output_info;
  8. bool obs_module_load(uint32_t libobs_ver)
  9. {
  10. #ifdef _WIN32
  11. WSADATA wsad;
  12. WSAStartup(MAKEWORD(2, 2), &wsad);
  13. #endif
  14. obs_register_output(&rtmp_output_info);
  15. UNUSED_PARAMETER(libobs_ver);
  16. return true;
  17. }
  18. #ifdef _WIN32
  19. void obs_module_unload(void)
  20. {
  21. WSACleanup();
  22. }
  23. #endif