Agora Java API Reference for Android

IAgoraH265Transcoder.h
1 //
2 // Agora Media SDK
3 //
4 // Copyright (c) 2022 Agora IO. All rights reserved.
5 //
6
7 #pragma once
8
9 #include "AgoraBase.h"
10 #include "AgoraMediaBase.h"
11
12 namespace agora{
13 namespace rtc{
14
18 enum H265_TRANSCODE_RESULT {
22 H265_TRANSCODE_RESULT_UNKNOWN = -1,
26 H265_TRANSCODE_RESULT_SUCCESS = 0,
30 H265_TRANSCODE_RESULT_REQUEST_INVALID = 1,
34 H265_TRANSCODE_RESULT_UNAUTHORIZED = 2,
38 H265_TRANSCODE_RESULT_TOKEN_EXPIRED = 3,
42 H265_TRANSCODE_RESULT_FORBIDDEN = 4,
46 H265_TRANSCODE_RESULT_NOT_FOUND = 5,
50 H265_TRANSCODE_RESULT_CONFLICTED = 6,
54 H265_TRANSCODE_RESULT_NOT_SUPPORTED = 7,
58 H265_TRANSCODE_RESULT_TOO_OFTEN = 8,
62 H265_TRANSCODE_RESULT_SERVER_INTERNAL_ERROR = 9,
66 H265_TRANSCODE_RESULT_SERVICE_UNAVAILABLE = 10
67 };
68
72 class IH265TranscoderObserver {
73 public:
74 virtual ~IH265TranscoderObserver() {};
75
87 virtual void onEnableTranscode(H265_TRANSCODE_RESULT result) = 0;
88
101 virtual void onQueryChannel(H265_TRANSCODE_RESULT result, const char* originChannel, const char* transcodeChannel) = 0;
102
113 virtual void onTriggerTranscode(H265_TRANSCODE_RESULT result) = 0;
114
115 };
116
120 class IH265Transcoder : public RefCountInterface {
121 public:
131 virtual int enableTranscode(const char *token, const char *channel, uid_t uid) = 0;
132
142 virtual int queryChannel(const char *token, const char *channel, uid_t uid) = 0;
143
153 virtual int triggerTranscode(const char* token, const char* channel, uid_t uid) = 0;
161 virtual int registerTranscoderObserver(IH265TranscoderObserver *observer) = 0;
169 virtual int unregisterTranscoderObserver(IH265TranscoderObserver *observer) = 0;
170
171
172 protected:
173 virtual ~IH265Transcoder() {};
174
175 };
176
177 } // namespace rtc
178 } // namespace agora
agora::rtc::IH265Transcoder::queryChannel
virtual int queryChannel(const char *token, const char *channel, uid_t uid)=0
agora::rtc::IH265Transcoder::unregisterTranscoderObserver
virtual int unregisterTranscoderObserver(IH265TranscoderObserver *observer)=0
agora::rtc::IH265Transcoder::enableTranscode
virtual int enableTranscode(const char *token, const char *channel, uid_t uid)=0
agora::rtc::IH265TranscoderObserver::onTriggerTranscode
virtual void onTriggerTranscode(H265_TRANSCODE_RESULT result)=0
agora::rtc::IH265TranscoderObserver::onEnableTranscode
virtual void onEnableTranscode(H265_TRANSCODE_RESULT result)=0
agora::rtc::IH265Transcoder
Definition: IAgoraH265Transcoder.h:120
agora::rtc::IH265TranscoderObserver
Definition: IAgoraH265Transcoder.h:72
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IH265Transcoder::registerTranscoderObserver
virtual int registerTranscoderObserver(IH265TranscoderObserver *observer)=0
agora::rtc::IH265Transcoder::triggerTranscode
virtual int triggerTranscode(const char *token, const char *channel, uid_t uid)=0
agora::rtc::IH265TranscoderObserver::onQueryChannel
virtual void onQueryChannel(H265_TRANSCODE_RESULT result, const char *originChannel, const char *transcodeChannel)=0