123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #pragma once
- #include <stdio.h>
- #include "idatastruct.h"
- #ifdef _WIN32
- #ifdef LIBMEDIAPLAYER_EXPORTS
- #define LIBMEDIAPLAYER_API __declspec(dllexport)
- #else
- #define LIBMEDIAPLAYER_API __declspec(dllimport)
- #endif
- # elif ( defined(__GNUC__) && __GNUC__ >= 4 )
- #define LIBMEDIAPLAYER_API __attribute__((visibility("default")))
- #else // RVC_OS_WIN
- #define LIBMEDIAPLAYER_API
- #endif // RVC_OS_WIN
- class libmediaplayer_impl;
- class LIBMEDIAPLAYER_API Clibmediaplayer
- {
- public:
- Clibmediaplayer(CMediaHostApi* pHostApi);
- ~Clibmediaplayer();
- int PlayLocalAudio(const char* pAudioNames);
- void Close();
- bool checkIsPlay();
- bool checkIsStop();
- int PlayMedia(CMediaPlayConfig& config);
- void SetVolume(int nVolume);
- void PlayVideoNotice(int nWndX, int nWndY, int nWndWidth, int nWndHeight, const char* pVideoName);
- bool IsFileValid(const char* pVideoName);
- private:
- libmediaplayer_impl* m_pImpl;
- };
- extern "C" LIBMEDIAPLAYER_API int mediaplayer_init();
- extern "C" LIBMEDIAPLAYER_API int mediaplayer_term();
|