Agora C++ API Reference for All Platforms
Loading...
Searching...
No Matches
IAgoraRtmpStreamingService.h
1
2// Copyright (c) 2019 Agora.io. All rights reserved
3
4// This program is confidential and proprietary to Agora.io.
5// And may not be copied, reproduced, modified, disclosed to others, published
6// or used, in whole or in part, without the express prior written permission
7// of Agora.io.
8
9#pragma once // NOLINT(build/header_guard)
10
11#include "AgoraBase.h"
12#include "AgoraRefPtr.h"
13#include "IAgoraService.h"
14#include "NGIAgoraRtcConnection.h"
15#include <api/cpp/aosl_ares_class.h>
16
17namespace agora {
18namespace rtc {
19
38
42public:
57 virtual void onRtmpStreamingStateChanged(const char* url, RTMP_STREAM_PUBLISH_STATE state,
59 (void)url;
60 (void)state;
61 (void)reason;
62 }
63
71 virtual void onRtmpStreamingEvent(const char* url, RTMP_STREAMING_EVENT eventCode) {
72 (void)url;
73 (void)eventCode;
74 }
75
85 virtual void onTranscodingUpdated() {}
86};
87
91 public:
92
113 virtual int startRtmpStreamWithoutTranscoding(const char* url, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
114
136 virtual int startRtmpStreamWithTranscoding(const char* url, const LiveTranscoding& transcoding, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
137
147 virtual int updateRtmpTranscoding(const LiveTranscoding& transcoding, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
166 virtual int stopRtmpStream(const char* url, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
167
175 virtual int registerObserver(IRtmpStreamingObserver* observer, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
183 virtual int unregisterObserver(IRtmpStreamingObserver* observer) = 0;
184
185 protected:
187};
188
189
190
191
192} // namespace rtc
193} // namespace agora
Definition AgoraRefPtr.h:31
Definition IAgoraRtmpStreamingService.h:41
virtual void onTranscodingUpdated()
Definition IAgoraRtmpStreamingService.h:85
virtual void onRtmpStreamingStateChanged(const char *url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_REASON reason)
Definition IAgoraRtmpStreamingService.h:57
virtual void onRtmpStreamingEvent(const char *url, RTMP_STREAMING_EVENT eventCode)
Definition IAgoraRtmpStreamingService.h:71
Definition IAgoraRtmpStreamingService.h:90
virtual int startRtmpStreamWithTranscoding(const char *url, const LiveTranscoding &transcoding, aosl_ref_t ares=AOSL_REF_INVALID)=0
~IRtmpStreamingService()
Definition IAgoraRtmpStreamingService.h:186
virtual int updateRtmpTranscoding(const LiveTranscoding &transcoding, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int unregisterObserver(IRtmpStreamingObserver *observer)=0
virtual int startRtmpStreamWithoutTranscoding(const char *url, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int stopRtmpStream(const char *url, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int registerObserver(IRtmpStreamingObserver *observer, aosl_ref_t ares=AOSL_REF_INVALID)=0
Definition AgoraExtensions.h:5
RTMP_CHANNEL_EVENT
Definition IAgoraRtmpStreamingService.h:24
@ RTMP_CHANNEL_EVENT_BANNED_BY_SERVER
Definition IAgoraRtmpStreamingService.h:36
@ RTMP_CHANNEL_EVENT_LEAVE_CHANNEL
Definition IAgoraRtmpStreamingService.h:32
@ RTMP_CHANNEL_EVENT_DISCONNECT
Definition IAgoraRtmpStreamingService.h:28
RTMP_STREAMING_EVENT
Definition AgoraBase.h:4118
RTMP_STREAM_PUBLISH_REASON
Definition AgoraBase.h:4035
RTMP_STREAM_PUBLISH_STATE
Definition AgoraBase.h:3992
Definition AgoraAtomicOps.h:21
Definition AgoraBase.h:4332