8#ifndef zego_api_mediaplayer_h
9#define zego_api_mediaplayer_h
16#include "TargetConditionals.h"
PublishChannelIndex
Definition: zego-api-defines.h:976
@ PUBLISH_CHN_AUX
Definition: zego-api-defines.h:978
ZegoVideoViewMode
Definition: zego-api-defines.h:80
ZEGOAVKIT_API void SetMediaPlayerFileReader(ZegoMediaPlayerFileReader *reader, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetView(void *view, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void AttachToPublishChannel(AV::PublishChannelIndex channel=AV::PUBLISH_CHN_AUX, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
指定某个播放器绑定到推流通道,注意不能为主路,当前复制播放器音频到辅路只支持channel 1,推荐设置到channel 1。
ZEGOAVKIT_API void Load(const char *path, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void DestroyPlayer(ZegoMediaPlayerIndex index)
ZEGOAVKIT_API void SetAudioDataCallback(IZegoMediaPlayerAudioDataCallback *callback, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API ZegoMediaPlayerMediaInfo GetMediaInfo(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void Start(const char *path, bool repeat, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetBackgroundColor(int color, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableRepeatMode(bool enable, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API long GetCurrentDuration(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API const char * GetMetaDataValue(const char *key, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
通过键值获取保存在媒体文件中的元数据信息
ZEGOAVKIT_API long GetDuration(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API long GetCurrentRenderingDuration(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetSoundInfoCallback(IZegoMediaPlayerSoundInfoCallback *callback, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
设置声音信息回调,包括声浪、频谱。
ZegoMediaPlayerIndex
Definition: zego-api-mediaplayer-defines.h:37
@ ZegoMediaPlayerIndexFirst
Definition: zego-api-mediaplayer-defines.h:38
ZEGOAVKIT_API long SetAudioStream(long streamIndex, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetAudioTrackMode(ZegoMediaPlayerAudioTrackMode mode, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableAccurateSeek(bool enable, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableLiveAudioEffect(bool enable, ZegoLiveAudioEffectMode mode, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
开启现场音效
ZEGOAVKIT_API void SetPlayerType(ZegoMediaPlayerType type, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetActiveAudioChannel(ZegoMediaPlayerAudioChannel channel, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void CreatePlayer(ZegoMediaPlayerType type, ZegoMediaPlayerIndex index)
ZegoMediaPlayerAudioTrackMode
Definition: zego-api-mediaplayer-defines.h:52
ZegoMediaPlayerVideoPixelFormat
Definition: zego-api-mediaplayer-defines.h:25
ZEGOAVKIT_API void EnableViewMirror(bool enable, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
开启画面镜像
ZEGOAVKIT_API bool GetPlaybackStatistics(ZegoMediaPlayerStatisticsInfo &stat, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
获取播放器当前播放统计信息
ZEGOAVKIT_API bool GetOnlineResourceCacheStat(int *timeInMS, int *sizeInByte, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void UpdatePosition(const float position[3], ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
更新媒体播放器(音频源)位置
ZEGOAVKIT_API void SetPlayMediaStreamType(ZegoMediaStreamType type, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
设置媒体播放器播放的媒体流类型,用于仅播放音频流或者视频流的场景
ZEGOAVKIT_API void SetVolume(int volume, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZegoMediaPlayerAudioChannel
Definition: zego-api-mediaplayer-defines.h:45
ZEGOAVKIT_API int GetPlayVolume(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableStatusMonitor(bool enable, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
开启播放器启异常状态监控
ZEGOAVKIT_API int GetPublishVolume(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetPublishVolume(int volume, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API bool RequireHWDecoder(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetAccurateSeekTimeout(long timeoutInMS, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetVideoDataWithIndexCallback(IZegoMediaPlayerVideoDataWithIndexCallback *callback, ZegoMediaPlayerVideoPixelFormat format, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetPlaySpeed(float speed, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetBufferThreshold(int thresholdInMS, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZegoMediaPlayerType
Definition: zego-api-mediaplayer-defines.h:19
ZegoLiveAudioEffectMode
Live audio effect mode.
Definition: zego-api-mediaplayer-defines.h:99
ZEGOAVKIT_API void SetLoopCount(int loopCount, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetPlayVolume(int volume, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void LoadCopyrightedMusic(const char *resourceID, long startPosition, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void InitWithType(ZegoMediaPlayerType type, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SeekTo(long duration, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetBlockDataCallback(IZegoMediaPlayerBlockDataCallback *callback, int blockSize, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetOnlineResourceCache(int timeInMS, int sizeInByte, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetEventWithIndexCallback(IZegoMediaPlayerEventWithIndexCallback *callback, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void Resume(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetHttpHeaders(ZegoMediaPlayerHttpHeader *headers, int headerSize, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void Stop(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetMediaSideInfoCallback(IZegoMediaPlayerMediaSideInfoCallback *callback, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void ClearView(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void TakeSnapshot(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API bool SetProcessInterval(long interval, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableAudioChannelKeyShift(ZegoMediaPlayerAudioChannel channel, bool enable, float keyShiftValue, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableFrequencySpectrumMonitor(bool enable, unsigned int timeInMS=200, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
是否开启频谱监听
ZEGOAVKIT_API void SetAudioChannelKeyShift(ZegoMediaPlayerAudioChannel channel, float keyShiftValue, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void MuteLocal(bool mute, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableLocalCache(bool enable, const char *cache_dir, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
开启本地缓存文件
ZEGOAVKIT_API void Pause(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetAudioPublishStream(long streamIndex, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void SetViewMode(AV::ZegoVideoViewMode mode, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZegoMediaStreamType
Definition: zego-api-mediaplayer-defines.h:116
ZEGOAVKIT_API void SetLoadResourceTimeout(int timeoutInMS, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void EnableSoundLevelMonitor(bool enable, unsigned int timeInMS=200, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
是否开启声浪监听
ZEGOAVKIT_API long GetAudioStreamCount(ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
ZEGOAVKIT_API void StartCopyrightedMusic(const char *resourceID, long startPosition, ZegoMediaPlayerIndex index=ZegoMediaPlayerIndexFirst)
Definition: AVDefines.h:17
Definition: zego-api-defines.h:1545
#define ZEGOAVKIT_API
Definition: zego-api-defines.h:59