NERoom SDK V1.32.0
载入中...
搜索中...
未找到
live_ctrl_interface.h
浏览该文件的文档.
1// Copyright (c) 2022 NetEase, Inc. All rights reserved.
2// Use of this source code is governed by a MIT license that can be
3// found in the LICENSE file.
4
11#ifndef LIVE_CTRL_INTERFACE_H
12#define LIVE_CTRL_INTERFACE_H
13
14#include "base_ctrl_interface.h"
15#include "base_type_defines.h"
16#include "error_code_defines.h"
17
18namespace neroom {
19
28
36
44
52
57 std::string url;
58 int width = 0;
59 int height = 0;
60 int x = 0;
61 int y = 0;
63
78
81 0;
83 int width = 0;
84 int height = 0;
85 std::vector<NERoomLiveStreamUserTranscoding> userTranscodingList;
87
98
111
116public:
122
123public:
127 virtual ~INERoomLiveController() = default;
128
134
141 virtual void startLive(const NERoomLiveRequest& live, const NECallback<NERoomLiveInfo>& callback) = 0;
142
149 virtual void updateLive(const NERoomLiveRequest& live, const NEUpdateLiveCallback& callback) = 0;
150
156 virtual void stopLive(const NEStopLiveCallback& callback) = 0;
157
164 virtual void addLiveStreamTask(const NERoomLiveStreamTaskInfo& taskInfo, const NEEmptyCallback& callback) = 0;
165
172 virtual void updateLiveStreamTask(const NERoomLiveStreamTaskInfo& taskInfo, const NEEmptyCallback& callback) = 0;
173
180 virtual void removeLiveStreamTask(const std::string& taskId, const NEEmptyCallback& callback) = 0;
181
186 virtual void getBackgroundInfo(const NEGetLiveBackgroundInfoCallback& callback) const = 0;
187
194};
195
196} // namespace neroom
197#endif // LIVE_CTRL_INTERFACE_H
基础控制器头文件
基本类型定义头文件
virtual void updateBackgroundInfo(const NERoomLiveBackgroundParam &info, const NEUpdateLiveBackgroundCallback &callback)=0
更新直播背景信息
NECallback< NERoomLiveBackgroundInfo > NEGetLiveBackgroundInfoCallback
NECallback< time_t > NEUpdateLiveBackgroundCallback
virtual void getBackgroundInfo(const NEGetLiveBackgroundInfoCallback &callback) const =0
获取直播背景信息
virtual void updateLiveStreamTask(const NERoomLiveStreamTaskInfo &taskInfo, const NEEmptyCallback &callback)=0
更新房间推流任务
virtual NERoomLiveInfo getLiveInfo()=0
获取当前直播信息
virtual ~INERoomLiveController()=default
析构函数
virtual void updateLive(const NERoomLiveRequest &live, const NEUpdateLiveCallback &callback)=0
更新直播
virtual void startLive(const NERoomLiveRequest &live, const NECallback< NERoomLiveInfo > &callback)=0
开始直播
virtual void removeLiveStreamTask(const std::string &taskId, const NEEmptyCallback &callback)=0
删除房间推流任务
virtual void addLiveStreamTask(const NERoomLiveStreamTaskInfo &taskInfo, const NEEmptyCallback &callback)=0
添加房间推流任务
virtual void stopLive(const NEStopLiveCallback &callback)=0
停止直播
错误码定义头文件
enum neroom::tagNERoomLiveStreamAudioSampleRate NERoomLiveStreamAudioSampleRate
音频推流采样率
struct neroom::tagNERoomLiveConfig NERoomLiveConfig
推流任务信息
enum neroom::tagNERoomLiveStreamAudioCodecProfile NERoomLiveStreamAudioCodecProfile
音频编码规格
tagNERoomLiveStreamVideoScaleMode
直播推流视频和画布的调节属性
struct tagNERoomLiveInfo :NERoomLiveRequest { std::string taskId; std::string pushUrl; std::string pullHlsUrl; std::string pullHttpUrl; std::string pullRtmpUrl; std::string pullRtsUrl; NERoomLiveState state=kNERoomLiveStateInvalid; } NERoomLiveInfo
直播信息
struct neroom::tagNERoomLiveStreamLayout NERoomLiveStreamLayout
enum neroom::tagNERoomLiveStreamMode NERoomLiveStreamMode
直播推流模式
struct neroom::tagNERoomLiveStreamUserTranscoding NERoomLiveStreamUserTranscoding
直播成员布局
enum neroom::tagNERoomLiveStreamVideoScaleMode NERoomLiveStreamVideoScaleMode
直播推流视频和画布的调节属性
std::function< void(int, const std::string &, const TResultParam &...)> NECallback
通用回调
struct neroom::tagNERoomLiveStreamImageInfo NERoomLiveStreamImageInfo
图片布局
tagNERoomLiveStreamMode
直播推流模式
tagNERoomLiveStreamAudioCodecProfile
音频编码规格
struct tagNERoomLiveRequest { std::string title; std::string password; NERoomLiveLayout liveLayout=kNERoomLiveLayoutNone; std::vector< std::string > userUuidList; std::string extentionConfig; bool enableThirdParties=false; } NERoomLiveRequest
直播基础信息
NECallback<> NEEmptyCallback
struct neroom::tagNERoomLiveStreamTaskInfo NERoomLiveStreamTaskInfo
推流任务信息
tagNERoomLiveStreamAudioSampleRate
音频推流采样率
NERoomLiveStreamAudioCodecProfile audioCodecProfile
NERoomLiveStreamAudioSampleRate sampleRate
std::vector< NERoomLiveStreamUserTranscoding > userTranscodingList
NERoomLiveStreamImageInfo * backgroundImg