libmediaplayer.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <stdio.h>
  3. #include "idatastruct.h"
  4. #ifdef _WIN32
  5. #ifdef LIBMEDIAPLAYER_EXPORTS
  6. #define LIBMEDIAPLAYER_API __declspec(dllexport)
  7. #else
  8. #define LIBMEDIAPLAYER_API __declspec(dllimport)
  9. #endif
  10. # elif ( defined(__GNUC__) && __GNUC__ >= 4 )
  11. #define LIBMEDIAPLAYER_API __attribute__((visibility("default")))
  12. #else // RVC_OS_WIN
  13. #define LIBMEDIAPLAYER_API
  14. #endif // RVC_OS_WIN
  15. class libmediaplayer_impl; // ге╫с
  16. class LIBMEDIAPLAYER_API Clibmediaplayer
  17. {
  18. public:
  19. Clibmediaplayer(CMediaHostApi* pHostApi);
  20. ~Clibmediaplayer();
  21. int PlayVideo(const char* pVideoDir, const char* pNamePrefix = NULL, int nVideoCount = 1);
  22. int PlayLocalAudio(const char* pAudioNames);
  23. int PlayLocalVideo(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight);
  24. void Close();
  25. bool checkIsPlay();
  26. bool checkIsStop();
  27. int PlayMedia(CMediaPlayConfig& config);
  28. void SetVolume(int nVolume);
  29. void PlaySalesRecordVideo(int nWndX, int nWndY, int nWndWidth, int nWndHeight, const char* pVideoDir, const char* pNamePrefix = NULL, int nVideoCount = 1);
  30. private:
  31. libmediaplayer_impl* m_pImpl;
  32. };
  33. extern "C" LIBMEDIAPLAYER_API int mediaplayer_init();
  34. extern "C" LIBMEDIAPLAYER_API int mediaplayer_term();