Agora RTC Objective-C API Reference Refactor

IAgoraRtmpStreamingService.h
Go to the documentation of this file.
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
16 namespace agora {
17 namespace rtc {
18
22 enum RTMP_CHANNEL_EVENT
23 {
27 RTMP_CHANNEL_EVENT_DISCONNECT = 0,
31 RTMP_CHANNEL_EVENT_LEAVE_CHANNEL = 1,
35 RTMP_CHANNEL_EVENT_BANNED_BY_SERVER = 2
36 };
40 class IRtmpStreamingObserver {
41 public:
56 virtual void onRtmpStreamingStateChanged(const char* url, RTMP_STREAM_PUBLISH_STATE state,
57 RTMP_STREAM_PUBLISH_ERROR_TYPE errCode) {
58 (void)url;
59 (void)state;
60 (void)errCode;
61 }
62
70 virtual void onRtmpStreamingEvent(const char* url, RTMP_STREAMING_EVENT eventCode) {
71 (void)url;
72 (void)eventCode;
73 }
84 virtual void onTranscodingUpdated() {}
85 };
89 class IRtmpStreamingService : public RefCountInterface {
90 public:
91
112 virtual int startRtmpStreamWithoutTranscoding(const char* url) = 0;
113
135 virtual int startRtmpStreamWithTranscoding(const char* url, const LiveTranscoding& transcoding) = 0;
136
146 virtual int updateRtmpTranscoding(const LiveTranscoding& transcoding) = 0;
165 virtual int stopRtmpStream(const char* url) = 0;
166
174 virtual int registerObserver(IRtmpStreamingObserver* observer) = 0;
182 virtual int unregisterObserver(IRtmpStreamingObserver* observer) = 0;
183
184 protected:
185 ~IRtmpStreamingService() {}
186 };
187
188
189
190
191 } // namespace rtc
192 } // namespace agora
agora::rtc::IRtmpStreamingObserver::onTranscodingUpdated
virtual void onTranscodingUpdated()
Definition: IAgoraRtmpStreamingService.h:84
AgoraBase.h
agora::rtc::IRtmpStreamingService::updateRtmpTranscoding
virtual int updateRtmpTranscoding(const LiveTranscoding &transcoding)=0
agora::rtc::LiveTranscoding
Definition: AgoraBase.h:3648
agora::rtc::RTMP_CHANNEL_EVENT
RTMP_CHANNEL_EVENT
Definition: IAgoraRtmpStreamingService.h:23
agora::rtc::IRtmpStreamingObserver::onRtmpStreamingStateChanged
virtual void onRtmpStreamingStateChanged(const char *url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_ERROR_TYPE errCode)
Definition: IAgoraRtmpStreamingService.h:56
agora::rtc::RTMP_STREAM_PUBLISH_ERROR_TYPE
RTMP_STREAM_PUBLISH_ERROR_TYPE
Definition: AgoraBase.h:3377
agora::rtc::IRtmpStreamingObserver::onRtmpStreamingEvent
virtual void onRtmpStreamingEvent(const char *url, RTMP_STREAMING_EVENT eventCode)
Definition: IAgoraRtmpStreamingService.h:70
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IRtmpStreamingService::stopRtmpStream
virtual int stopRtmpStream(const char *url)=0
agora::rtc::RTMP_CHANNEL_EVENT_BANNED_BY_SERVER
@ RTMP_CHANNEL_EVENT_BANNED_BY_SERVER
Definition: IAgoraRtmpStreamingService.h:35
NGIAgoraRtcConnection.h
agora::rtc::IRtmpStreamingService::startRtmpStreamWithoutTranscoding
virtual int startRtmpStreamWithoutTranscoding(const char *url)=0
agora::rtc::IRtmpStreamingService::registerObserver
virtual int registerObserver(IRtmpStreamingObserver *observer)=0
agora::rtc::RTMP_STREAMING_EVENT
RTMP_STREAMING_EVENT
Definition: AgoraBase.h:3448
agora::rtc::IRtmpStreamingService::startRtmpStreamWithTranscoding
virtual int startRtmpStreamWithTranscoding(const char *url, const LiveTranscoding &transcoding)=0
AgoraRefPtr.h
agora::rtc::IRtmpStreamingService::unregisterObserver
virtual int unregisterObserver(IRtmpStreamingObserver *observer)=0
agora::rtc::RTMP_CHANNEL_EVENT_DISCONNECT
@ RTMP_CHANNEL_EVENT_DISCONNECT
Definition: IAgoraRtmpStreamingService.h:27
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IRtmpStreamingService::~IRtmpStreamingService
~IRtmpStreamingService()
Definition: IAgoraRtmpStreamingService.h:185
agora::rtc::IRtmpStreamingObserver
Definition: IAgoraRtmpStreamingService.h:40
agora::rtc::IRtmpStreamingService
Definition: IAgoraRtmpStreamingService.h:89
agora::rtc::RTMP_CHANNEL_EVENT_LEAVE_CHANNEL
@ RTMP_CHANNEL_EVENT_LEAVE_CHANNEL
Definition: IAgoraRtmpStreamingService.h:31
IAgoraService.h
agora::rtc::RTMP_STREAM_PUBLISH_STATE
RTMP_STREAM_PUBLISH_STATE
Definition: AgoraBase.h:3345