IMP(低代码音视频工厂)SDK v1.5.0
IMP SDK API Reference Manual for Windows Platforms
live_event_listener.h
1// Copyright (c) 2019 The Alibaba DingTalk Authors. All rights reserved.
2
3#pragma once
4
5#include <cstdint>
6#include <functional>
7#include <memory>
8#include <string>
9
10namespace alibaba { namespace meta {
11
12struct LiveCommonEventModel;
13
18public:
19 virtual ~LiveEventListener() {}
20
25 virtual void OnLiveCreated(const LiveCommonEventModel & event) = 0;
26
31 virtual void OnLiveStarted(const LiveCommonEventModel & event) = 0;
32
37 virtual void OnLiveStopped(const LiveCommonEventModel & event) = 0;
38
43
48 virtual void OnPlayerEvent(int32_t event) = 0;
49
55 virtual void OnPlayerError(int32_t error_code, const std::string & error_message) = 0;
56};
57
58using LiveEventListenerPtr = std::shared_ptr<LiveEventListener>;
59using LiveEventListenerWeakPtr = std::weak_ptr<LiveEventListener>;
60
61} } // namespace alibaba::meta
直播事件监听
Definition: live_event_listener.h:17
virtual void OnLiveStarted(const LiveCommonEventModel &event)=0
直播开始事件
virtual void OnLiveCreated(const LiveCommonEventModel &event)=0
直播创建
virtual void OnPlayerError(int32_t error_code, const std::string &error_message)=0
播放报错回调,错误枚举参考AVPErrorCode.h
virtual void OnLiveStopped(const LiveCommonEventModel &event)=0
直播结束
virtual void OnPlayerEvent(int32_t event)=0
播放事件回调,事件枚举参考AVPDef.h
virtual void OnPlayerVideoFirstFrameRender()=0
首帧渲染回调
直播通用事件结构体
Definition: live_common_event_model.h:13