Agora RTC Objective-C API Reference Refactor

NGIAgoraMediaNode.h
Go to the documentation of this file.
1 #pragma once
2 #include "AgoraRefPtr.h"
3 #include "AgoraBase.h"
4 #include "IAgoraLog.h"
5 #include "NGIAgoraVideoFrame.h"
6 #include "AgoraExtensionVersion.h"
7
8 #ifndef OPTIONAL_PROCESSRESULT_SPECIFIER
9 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
10 #define OPTIONAL_PROCESSRESULT_SPECIFIER ProcessResult::
11 #else
12 #define OPTIONAL_PROCESSRESULT_SPECIFIER
13 #endif
14 #endif
15
16 namespace webrtc {
17 struct AudioFrameHandleInfo;
18 } // namespace webrtc
19
20 namespace agora {
21 namespace rtc {
26 class IAudioFilterBase : public RefCountInterface {
27 public:
28 // Return false if filter decide to drop the frame.
29 // Implementation should not change samples_per_channel_/sample_rate_hz_/num_channels_
30 // Implementation should just adapt data of audio frame.
39 virtual bool adaptAudioFrame(const media::base::AudioPcmFrame& inAudioFrame,
40 media::base::AudioPcmFrame& adaptedFrame) = 0;
41
49 virtual int getPreferredSampleRate() = 0;
50
59 virtual int getPreferredChannelNumbers() = 0;
60
61 protected:
62 ~IAudioFilterBase() {}
63 };
64
71 class IAudioFilter : public IAudioFilterBase {
72 public:
79 virtual void setEnabled(bool enable) = 0;
86 virtual bool isEnabled() const = 0;
97 virtual int setProperty(const char* key, const void* buf, int buf_size) = 0;
108 virtual int getProperty(const char* key, void* buf, int buf_size) const = 0;
116 virtual const char * getName() const = 0;
117
126 virtual int getPreferredSampleRate() { return 0; };
127
136 virtual int getPreferredChannelNumbers() { return 0; };
137
138 protected:
139 ~IAudioFilter() {}
140 };
141
146 class IVideoFilterBase : public RefCountInterface {
147 public:
158 virtual bool adaptVideoFrame(const media::base::VideoFrame& capturedFrame,
159 media::base::VideoFrame& adaptedFrame) = 0;
160 };
161
162 // TODO(Bob): private inherit?
170 class IVideoFilter : public IVideoFilterBase {
171 public:
179 virtual void setEnabled(bool enable) {}
186 virtual bool isEnabled() { return true; }
197 virtual int setProperty(const char* key, const void* buf, size_t buf_size) { return -1; }
208 virtual int getProperty(const char* key, void* buf, size_t buf_size) { return -1; }
216 virtual bool onDataStreamWillStart() { return true; }
221 virtual void onDataStreamWillStop() { }
229 virtual bool isExternal() { return true; }
237 virtual bool isExtensionFilter() { return false; }
238 };
239
246 class IExtensionVideoFilter : public IVideoFilter {
247 public:
248 enum ProcessMode {
249 kSync, // Indicates that video frame data will be exchanged via "adaptVideoFrame"
250 kAsync, // Indicates that video frame data will be exchanged via "pendVideoFrame" & "deliverVideoFrame"
251 };
252
253 enum ProcessResult {
254 kSuccess, // Video frame data is successfully processed
255 kBypass, // Video frame data should bypass the current filter and flow to its successsors
256 kDrop, // Video Frame data should be discarded
257 };
258
266 class Control : public RefCountInterface {
267 public:
274 virtual ProcessResult deliverVideoFrame(agora::agora_refptr<IVideoFrame> frame) = 0;
279 virtual agora::agora_refptr<IVideoFrameMemoryPool> getMemoryPool() = 0;
285 virtual int postEvent(const char* key, const char* value) = 0;
292 virtual void printLog(commons::LOG_LEVEL level, const char* format, ...) = 0;
298 virtual void disableMe(int error, const char* msg) = 0;
299 };
300
311 virtual void getProcessMode(ProcessMode& mode, bool& independent_thread) = 0;
319 virtual int start(agora::agora_refptr<Control> control) = 0;
325 virtual int stop() = 0;
334 virtual void getVideoFormatWanted(VideoFrameData::Type& type, RawPixelBuffer::Format& format) = 0;
341 virtual ProcessResult pendVideoFrame(agora::agora_refptr<IVideoFrame> frame) {
342 return OPTIONAL_PROCESSRESULT_SPECIFIER kBypass;
343 }
349 virtual ProcessResult adaptVideoFrame(agora::agora_refptr<IVideoFrame> in, agora::agora_refptr<IVideoFrame>& out) {
350 return OPTIONAL_PROCESSRESULT_SPECIFIER kBypass;
351 }
352 /* Occurs each time needs to get rotation apply.
353 *
354 * @return Determines whether to rotate.
355 * - true: need to rotate.
356 * - false: no rotate.
357 */
358 virtual bool getRotationApplied() { return false; }
359
360 // NOTE: The following two interfaces should never be overriden!
361 virtual bool isExtensionFilter() { return true; }
362 virtual bool adaptVideoFrame(
363 const media::base::VideoFrame& capturedFrame,
364 media::base::VideoFrame& adaptedFrame) {
365 return -ERR_NOT_SUPPORTED;
366 }
367 };
368
369 class ILipSyncFilter : public RefCountInterface {
370 public:
371 enum ProcessResult {
372 kSuccess, // Video frame data is successfully processed
373 kBypass, // Video frame data should bypass the current filter and flow to its successsors
374 kDrop, // Video Frame data should be discarded
375 };
376
377 class Control : public RefCountInterface {
378 public:
384 virtual int postEvent(const char* key, const char* value) = 0;
391 virtual void printLog(commons::LOG_LEVEL level, const char* format, ...) = 0;
397 virtual void disableMe(int error, const char* msg) = 0;
403 virtual void ReportCounter(int32_t counter_id, int32_t value) = 0;
408 virtual int GetStats(int32_t counter_id) = 0;
409 };
410
411 virtual int start(agora::agora_refptr<Control> control) = 0;
412
413 virtual int stop() = 0;
414
415 virtual int setProperty(const char* key, const void* buf, size_t buf_size) { return -1; }
422 virtual ProcessResult convertAudioFrameToFaceInfo(const agora::media::base::AudioPcmFrame& inAudioFrame, char* outFaceInfo) {
423 return kBypass;
424 }
425 };
426
430 class IVideoSinkBase : public RefCountInterface {
431 public:
442 virtual int setProperty(const char* key, const void* buf, int buf_size) { return -1; }
453 virtual int getProperty(const char* key, void* buf, int buf_size) { return -1; }
458 virtual int onFrame(const media::base::VideoFrame& videoFrame) = 0;
463 virtual bool isExternalSink() { return true; }
471 virtual bool onDataStreamWillStart() { return true; }
476 virtual void onDataStreamWillStop() { }
483 virtual bool applyMirror() { return false; }
490 virtual bool applyRotation() { return false; }
491 };
492
493 class IMediaExtensionObserver : public RefCountInterface {
494 public:
495 virtual ~IMediaExtensionObserver() {}
496 virtual void onEvent(const char* provider, const char* extension, const char* key, const char* json_value) {}
497 virtual void onExtensionStopped(const char* provider, const char* extension) {}
498 virtual void onExtensionStarted(const char* provider, const char* extension) {}
499 virtual void onExtensionError(const char* provider, const char* extension, int error, const char* message) {}
500 };
501
507 class IAudioPcmDataSender : public RefCountInterface {
508 public:
522 virtual int sendAudioPcmData(
523 const void* audio_data, uint32_t capture_timestamp, int64_t presentation_ms,
524 const size_t samples_per_channel, // for 10ms Data, number_of_samples * 100 = sample_rate
525 const agora::rtc::BYTES_PER_SAMPLE bytes_per_sample, // 2
526 const size_t number_of_channels,
527 const uint32_t sample_rate) = 0; // sample_rate > 8000)
528
529 protected:
530 ~IAudioPcmDataSender() {}
531 };
532
540 class IAudioEncodedFrameSender : public RefCountInterface {
541 public:
554 virtual bool sendEncodedAudioFrame(const uint8_t* payload_data, size_t payload_size,
555 const EncodedAudioFrameInfo& audioFrameInfo) = 0;
556
557 protected:
558 ~IAudioEncodedFrameSender() {}
559 };
560
561 class IAudioEncodedFrameReceiver {
562 public:
571 virtual bool onEncodedAudioFrameReceived (
572 const uint8_t *packet, size_t length, const media::base::AudioEncodedFrameInfo& info) = 0;
573
574 virtual ~IAudioEncodedFrameReceiver() {}
575 };
576
581 class IMediaPacketReceiver {
582 public:
591 virtual bool onMediaPacketReceived(
592 const uint8_t *packet, size_t length, const agora::media::base::PacketOptions& options) = 0;
593
594 virtual ~IMediaPacketReceiver() {}
595 };
596
603 class IMediaControlPacketReceiver {
604 public:
612 virtual bool onMediaControlPacketReceived(uid_t uid, const uint8_t *packet, size_t length) = 0;
613
614 virtual ~IMediaControlPacketReceiver() {}
615 };
616
624 class IMediaPacketSender : public RefCountInterface {
625 public:
637 virtual int sendMediaPacket(const uint8_t *packet, size_t length,
638 const media::base::PacketOptions &options) = 0;
639 protected:
640 ~IMediaPacketSender() {}
641 };
642
650 class IMediaControlPacketSender {
651 public:
664 virtual int sendPeerMediaControlPacket(media::base::user_id_t userId,
665 const uint8_t *packet,
666 size_t length) = 0;
667
678 virtual int sendBroadcastMediaControlPacket(const uint8_t *packet, size_t length) = 0;
679
680 virtual ~IMediaControlPacketSender() {}
681 };
682
687 class IAudioSinkBase : public RefCountInterface {
688 public:
696 virtual bool onAudioFrame(const media::base::AudioPcmFrame& audioFrame) = 0;
697
698 protected:
699 ~IAudioSinkBase() {}
700 };
701
709 class IVideoFrameSender : public RefCountInterface {
710 public:
720 virtual int sendVideoFrame(const media::base::ExternalVideoFrame& videoFrame) = 0;
721
722 protected:
723 ~IVideoFrameSender() {}
724 };
725
733 class IVideoEncodedImageSender : public RefCountInterface {
734 public:
746 virtual bool sendEncodedVideoImage(const uint8_t* imageBuffer, size_t length,
747 const EncodedVideoFrameInfo& videoEncodedFrameInfo) = 0;
748
749 protected:
750 ~IVideoEncodedImageSender() {}
751 };
752
756 class IVideoBeautyFilter : public IVideoFilter {
757 public:
761 struct BeautyOptions {
765 enum LIGHTENING_CONTRAST_LEVEL {
769 LIGHTENING_CONTRAST_LOW = 0,
773 LIGHTENING_CONTRAST_NORMAL,
777 LIGHTENING_CONTRAST_HIGH
778 };
779
784 LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
785
789 float lighteningLevel;
790
795 float smoothnessLevel;
796
801 float rednessLevel;
802
803 BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness,
804 float redness)
805 : lighteningContrastLevel(contrastLevel),
806 lighteningLevel(lightening),
807 smoothnessLevel(smoothness),
808 rednessLevel(redness) {}
809
810 BeautyOptions()
811 : lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL),
812 lighteningLevel(0),
813 smoothnessLevel(0),
814 rednessLevel(0) {}
815 };
826 virtual int setBeautyEffectOptions(bool enabled, BeautyOptions options) = 0;
827 };
828
832 class IVideoRenderer : public IVideoSinkBase {
833 public:
841 virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode) = 0;
850 virtual int setRenderMode(void* view, media::base::RENDER_MODE_TYPE renderMode) = 0;
851
858 virtual int setRotation(agora::rtc::VIDEO_ORIENTATION rotation) = 0;
865 virtual int setRotation(void* view, agora::rtc::VIDEO_ORIENTATION rotation) = 0;
866
876 virtual int setMirror(bool mirror) = 0;
887 virtual int setMirror(void* view, bool mirror) = 0;
895 virtual int setView(void* view) = 0;
904 virtual int addView(void* view, const Rectangle& cropArea) = 0;
911 virtual int unsetView() = 0;
918 virtual int removeView(void* view) = 0;
919 };
920
921 static const int kDeviceIdSize = 128;
922
923 class IVideoTrack;
927 class IVideoFrameTransceiver : public RefCountInterface {
928 public:
929 virtual int getTranscodingDelayMs() = 0;
930 virtual int addVideoTrack(agora_refptr<IVideoTrack> track) = 0;
931 virtual int removeVideoTrack(agora_refptr<IVideoTrack> track) = 0;
932 };
933
934 }
935 }
agora::rtc::IVideoRenderer::addView
virtual int addView(void *view, const Rectangle &cropArea)=0
agora::media::base::VideoFrame
Definition: AgoraMediaBase.h:827
agora::rtc::IExtensionVideoFilter::start
virtual int start(agora::agora_refptr< Control > control)=0
SDK will invoke this API before feeding video frame data to the filter. Filter can perform its initia...
agora::rtc::IAudioSinkBase::~IAudioSinkBase
~IAudioSinkBase()
Definition: NGIAgoraMediaNode.h:699
agora::rtc::ILipSyncFilter::kBypass
@ kBypass
Definition: NGIAgoraMediaNode.h:373
agora::rtc::IMediaExtensionObserver::onExtensionStarted
virtual void onExtensionStarted(const char *provider, const char *extension)
Definition: NGIAgoraMediaNode.h:498
agora::rtc::IMediaControlPacketReceiver
Definition: NGIAgoraMediaNode.h:603
agora::rtc::IExtensionVideoFilter::kSync
@ kSync
Definition: NGIAgoraMediaNode.h:249
agora::rtc::BeautyOptions
Definition: AgoraBase.h:4297
agora::rtc::IExtensionVideoFilter::Control::disableMe
virtual void disableMe(int error, const char *msg)=0
Ask SDK to disable the current filter if a fatal error is detected.
agora::rtc::IVideoFrameSender::~IVideoFrameSender
~IVideoFrameSender()
Definition: NGIAgoraMediaNode.h:723
agora::rtc::IVideoSinkBase::getProperty
virtual int getProperty(const char *key, void *buf, int buf_size)
Definition: NGIAgoraMediaNode.h:453
agora::rtc::IAudioFilter::getProperty
virtual int getProperty(const char *key, void *buf, int buf_size) const =0
agora::rtc::IVideoFilter::setEnabled
virtual void setEnabled(bool enable)
Definition: NGIAgoraMediaNode.h:179
agora::rtc::IVideoFilter::isExtensionFilter
virtual bool isExtensionFilter()
Definition: NGIAgoraMediaNode.h:237
AgoraBase.h
agora::rtc::IAudioFilterBase::~IAudioFilterBase
~IAudioFilterBase()
Definition: NGIAgoraMediaNode.h:62
agora::rtc::IVideoBeautyFilter
Definition: NGIAgoraMediaNode.h:756
agora::rtc::IAudioFilterBase
Definition: NGIAgoraMediaNode.h:26
agora::rtc::IVideoTrack
Definition: NGIAgoraVideoTrack.h:37
agora::rtc::IVideoFrameTransceiver::getTranscodingDelayMs
virtual int getTranscodingDelayMs()=0
agora::rtc::uid_t
unsigned int uid_t
Definition: AgoraMediaBase.h:29
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::rtc::IVideoFrameTransceiver
Definition: NGIAgoraMediaNode.h:927
agora::rtc::IVideoSinkBase::setProperty
virtual int setProperty(const char *key, const void *buf, int buf_size)
Definition: NGIAgoraMediaNode.h:442
agora::rtc::IExtensionVideoFilter::pendVideoFrame
virtual ProcessResult pendVideoFrame(agora::agora_refptr< IVideoFrame > frame)
SDK will invoke this API to send video frame to the filter if process mode is "Async"....
Definition: NGIAgoraMediaNode.h:341
agora::rtc::IMediaControlPacketReceiver::onMediaControlPacketReceived
virtual bool onMediaControlPacketReceived(uid_t uid, const uint8_t *packet, size_t length)=0
agora::rtc::IAudioFilterBase::getPreferredSampleRate
virtual int getPreferredSampleRate()=0
agora::rtc::IVideoSinkBase::isExternalSink
virtual bool isExternalSink()
Definition: NGIAgoraMediaNode.h:463
webrtc
Definition: NGIAgoraMediaNode.h:16
agora::rtc::IVideoSinkBase::applyMirror
virtual bool applyMirror()
Definition: NGIAgoraMediaNode.h:483
agora::rtc::IVideoFrameTransceiver::addVideoTrack
virtual int addVideoTrack(agora_refptr< IVideoTrack > track)=0
agora::rtc::IVideoFilter::setProperty
virtual int setProperty(const char *key, const void *buf, size_t buf_size)
Definition: NGIAgoraMediaNode.h:197
AgoraExtensionVersion.h
agora::rtc::Rectangle
Definition: AgoraBase.h:2008
agora::rtc::IExtensionVideoFilter::Control::getMemoryPool
virtual agora::agora_refptr< IVideoFrameMemoryPool > getMemoryPool()=0
Filter can invoke this function to get the IVideoFrameMemoryPool object if a new IVideoFrame data obj...
agora::rtc::IMediaControlPacketReceiver::~IMediaControlPacketReceiver
virtual ~IMediaControlPacketReceiver()
Definition: NGIAgoraMediaNode.h:614
agora::rtc::IVideoRenderer::unsetView
virtual int unsetView()=0
agora::rtc::IAudioEncodedFrameSender::~IAudioEncodedFrameSender
~IAudioEncodedFrameSender()
Definition: NGIAgoraMediaNode.h:558
agora::rtc::IVideoSinkBase
Definition: NGIAgoraMediaNode.h:430
agora::rtc::IExtensionVideoFilter::kAsync
@ kAsync
Definition: NGIAgoraMediaNode.h:250
agora::rtc::IMediaExtensionObserver::onExtensionStopped
virtual void onExtensionStopped(const char *provider, const char *extension)
Definition: NGIAgoraMediaNode.h:497
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1565
agora::rtc::ILipSyncFilter::kSuccess
@ kSuccess
Definition: NGIAgoraMediaNode.h:372
agora::rtc::IExtensionVideoFilter::adaptVideoFrame
virtual ProcessResult adaptVideoFrame(agora::agora_refptr< IVideoFrame > in, agora::agora_refptr< IVideoFrame > &out)
SDK will invoke this API to send video frame to the filter if process mode is "Sync".
Definition: NGIAgoraMediaNode.h:349
agora::rtc::EncodedAudioFrameInfo
Definition: AgoraBase.h:1439
agora::rtc::IVideoRenderer::setView
virtual int setView(void *view)=0
agora::rtc::IMediaControlPacketSender::sendBroadcastMediaControlPacket
virtual int sendBroadcastMediaControlPacket(const uint8_t *packet, size_t length)=0
agora::rtc::IMediaPacketReceiver::~IMediaPacketReceiver
virtual ~IMediaPacketReceiver()
Definition: NGIAgoraMediaNode.h:594
agora::rtc::IVideoSinkBase::onDataStreamWillStop
virtual void onDataStreamWillStop()
Definition: NGIAgoraMediaNode.h:476
agora::rtc::IVideoSinkBase::onFrame
virtual int onFrame(const media::base::VideoFrame &videoFrame)=0
agora::rtc::IMediaPacketSender::sendMediaPacket
virtual int sendMediaPacket(const uint8_t *packet, size_t length, const media::base::PacketOptions &options)=0
agora::rtc::IAudioPcmDataSender
Definition: NGIAgoraMediaNode.h:507
agora::rtc::IExtensionVideoFilter::isExtensionFilter
virtual bool isExtensionFilter()
Definition: NGIAgoraMediaNode.h:361
agora::rtc::IExtensionVideoFilter::Control::printLog
virtual void printLog(commons::LOG_LEVEL level, const char *format,...)=0
print log to the SDK.
agora::rtc::IAudioFilter::getName
virtual const char * getName() const =0
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_LOW
@ LIGHTENING_CONTRAST_LOW
Definition: NGIAgoraMediaNode.h:769
agora::rtc::IExtensionVideoFilter::Control::postEvent
virtual int postEvent(const char *key, const char *value)=0
Post an event and notify the end users.
agora::rtc::IMediaExtensionObserver::onExtensionError
virtual void onExtensionError(const char *provider, const char *extension, int error, const char *message)
Definition: NGIAgoraMediaNode.h:499
agora::rtc::IVideoBeautyFilter::BeautyOptions::rednessLevel
float rednessLevel
Definition: NGIAgoraMediaNode.h:801
agora::rtc::ILipSyncFilter
Definition: NGIAgoraMediaNode.h:369
agora::rtc::IAudioFilter::~IAudioFilter
~IAudioFilter()
Definition: NGIAgoraMediaNode.h:139
agora::rtc::IVideoEncodedImageSender
Definition: NGIAgoraMediaNode.h:733
agora::rtc::IVideoFilter::getProperty
virtual int getProperty(const char *key, void *buf, size_t buf_size)
Definition: NGIAgoraMediaNode.h:208
agora::rtc::IVideoEncodedImageSender::sendEncodedVideoImage
virtual bool sendEncodedVideoImage(const uint8_t *imageBuffer, size_t length, const EncodedVideoFrameInfo &videoEncodedFrameInfo)=0
agora::rtc::ILipSyncFilter::Control::ReportCounter
virtual void ReportCounter(int32_t counter_id, int32_t value)=0
report counter to the SDK.
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IVideoFrameTransceiver::removeVideoTrack
virtual int removeVideoTrack(agora_refptr< IVideoTrack > track)=0
agora::rtc::IExtensionVideoFilter::getVideoFormatWanted
virtual void getVideoFormatWanted(VideoFrameData::Type &type, RawPixelBuffer::Format &format)=0
SDK will invoke this API every time before sending data to the filter. Filter can desigante the type ...
agora::rtc::ILipSyncFilter::convertAudioFrameToFaceInfo
virtual ProcessResult convertAudioFrameToFaceInfo(const agora::media::base::AudioPcmFrame &inAudioFrame, char *outFaceInfo)
Definition: NGIAgoraMediaNode.h:422
agora::rtc::IAudioFilterBase::getPreferredChannelNumbers
virtual int getPreferredChannelNumbers()=0
agora::rtc::ILipSyncFilter::stop
virtual int stop()=0
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_LEVEL
LIGHTENING_CONTRAST_LEVEL
Definition: NGIAgoraMediaNode.h:765
agora::rtc::IMediaControlPacketSender::~IMediaControlPacketSender
virtual ~IMediaControlPacketSender()
Definition: NGIAgoraMediaNode.h:680
agora::rtc::IMediaPacketSender
Definition: NGIAgoraMediaNode.h:624
agora::rtc::IAudioFilter
Definition: NGIAgoraMediaNode.h:71
agora::rtc::ILipSyncFilter::Control::postEvent
virtual int postEvent(const char *key, const char *value)=0
Post an event and notify the end users.
agora::media::base::ExternalVideoFrame
Definition: AgoraMediaBase.h:662
agora::rtc::IExtensionVideoFilter::ProcessResult
ProcessResult
Definition: NGIAgoraMediaNode.h:253
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_NORMAL
@ LIGHTENING_CONTRAST_NORMAL
Definition: NGIAgoraMediaNode.h:773
OPTIONAL_PROCESSRESULT_SPECIFIER
#define OPTIONAL_PROCESSRESULT_SPECIFIER
Definition: NGIAgoraMediaNode.h:12
agora::rtc::IAudioSinkBase::onAudioFrame
virtual bool onAudioFrame(const media::base::AudioPcmFrame &audioFrame)=0
agora::rtc::IVideoEncodedImageSender::~IVideoEncodedImageSender
~IVideoEncodedImageSender()
Definition: NGIAgoraMediaNode.h:750
NGIAgoraVideoFrame.h
agora::commons::LOG_LEVEL
OPTIONAL_ENUM_CLASS LOG_LEVEL
Definition: IAgoraLog.h:33
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_HIGH
@ LIGHTENING_CONTRAST_HIGH
Definition: NGIAgoraMediaNode.h:777
agora::rtc::ILipSyncFilter::kDrop
@ kDrop
Definition: NGIAgoraMediaNode.h:374
agora::rtc::IVideoBeautyFilter::BeautyOptions::BeautyOptions
BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness, float redness)
Definition: NGIAgoraMediaNode.h:803
agora::rtc::IAudioEncodedFrameReceiver
Definition: NGIAgoraMediaNode.h:561
agora::rtc::RawPixelBuffer::Format
OPTIONAL_ENUM_CLASS Format
Definition: NGIAgoraVideoFrame.h:51
agora::rtc::IAudioEncodedFrameSender
Definition: NGIAgoraMediaNode.h:540
agora::rtc::IVideoRenderer::setRenderMode
virtual int setRenderMode(void *view, media::base::RENDER_MODE_TYPE renderMode)=0
agora::rtc::kDeviceIdSize
static const int kDeviceIdSize
Definition: NGIAgoraMediaNode.h:921
agora::rtc::IVideoRenderer::setMirror
virtual int setMirror(bool mirror)=0
agora::media::base::PacketOptions
Definition: AgoraMediaBase.h:418
agora::rtc::ILipSyncFilter::Control::printLog
virtual void printLog(commons::LOG_LEVEL level, const char *format,...)=0
print log to the SDK.
agora::rtc::ILipSyncFilter::ProcessResult
ProcessResult
Definition: NGIAgoraMediaNode.h:371
agora::rtc::IVideoFilterBase
Definition: NGIAgoraMediaNode.h:146
agora::rtc::IVideoSinkBase::onDataStreamWillStart
virtual bool onDataStreamWillStart()
Definition: NGIAgoraMediaNode.h:471
agora::rtc::IMediaPacketReceiver
Definition: NGIAgoraMediaNode.h:581
agora::rtc::IVideoFilter::isExternal
virtual bool isExternal()
Definition: NGIAgoraMediaNode.h:229
agora::rtc::IVideoRenderer::setRotation
virtual int setRotation(agora::rtc::VIDEO_ORIENTATION rotation)=0
agora::rtc::IVideoRenderer::removeView
virtual int removeView(void *view)=0
agora::media::base::RENDER_MODE_TYPE
RENDER_MODE_TYPE
Definition: AgoraMediaBase.h:609
agora::media::base::user_id_t
const char * user_id_t
Definition: AgoraMediaBase.h:410
agora::rtc::IVideoRenderer
Definition: NGIAgoraMediaNode.h:832
agora::rtc::IVideoFilter::isEnabled
virtual bool isEnabled()
Definition: NGIAgoraMediaNode.h:186
agora::rtc::IAudioPcmDataSender::sendAudioPcmData
virtual int sendAudioPcmData(const void *audio_data, uint32_t capture_timestamp, int64_t presentation_ms, const size_t samples_per_channel, const agora::rtc::BYTES_PER_SAMPLE bytes_per_sample, const size_t number_of_channels, const uint32_t sample_rate)=0
agora::rtc::IVideoBeautyFilter::BeautyOptions::lighteningContrastLevel
LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel
Definition: NGIAgoraMediaNode.h:784
agora::rtc::IAudioPcmDataSender::~IAudioPcmDataSender
~IAudioPcmDataSender()
Definition: NGIAgoraMediaNode.h:530
IAgoraLog.h
agora::rtc::IMediaPacketSender::~IMediaPacketSender
~IMediaPacketSender()
Definition: NGIAgoraMediaNode.h:640
agora::rtc::IAudioFilter::getPreferredSampleRate
virtual int getPreferredSampleRate()
Definition: NGIAgoraMediaNode.h:126
agora::rtc::IExtensionVideoFilter::kBypass
@ kBypass
Definition: NGIAgoraMediaNode.h:255
agora::rtc::VIDEO_ORIENTATION
VIDEO_ORIENTATION
Definition: AgoraBase.h:935
agora::rtc::IExtensionVideoFilter::kDrop
@ kDrop
Definition: NGIAgoraMediaNode.h:256
agora::rtc::IExtensionVideoFilter::Control
Definition: NGIAgoraMediaNode.h:266
agora::rtc::BYTES_PER_SAMPLE
BYTES_PER_SAMPLE
Definition: AgoraMediaBase.h:166
AgoraRefPtr.h
agora::rtc::IVideoBeautyFilter::BeautyOptions::smoothnessLevel
float smoothnessLevel
Definition: NGIAgoraMediaNode.h:795
agora::rtc::IExtensionVideoFilter::getRotationApplied
virtual bool getRotationApplied()
Definition: NGIAgoraMediaNode.h:358
agora::rtc::IAudioFilter::setProperty
virtual int setProperty(const char *key, const void *buf, int buf_size)=0
agora::rtc::ILipSyncFilter::Control::GetStats
virtual int GetStats(int32_t counter_id)=0
get stats to the SDK.
agora::rtc::IAudioSinkBase
Definition: NGIAgoraMediaNode.h:687
agora::rtc::IVideoFrameSender
Definition: NGIAgoraMediaNode.h:709
agora::rtc::IMediaControlPacketSender::sendPeerMediaControlPacket
virtual int sendPeerMediaControlPacket(media::base::user_id_t userId, const uint8_t *packet, size_t length)=0
agora::rtc::IExtensionVideoFilter
Definition: NGIAgoraMediaNode.h:246
agora::rtc::IVideoBeautyFilter::BeautyOptions::BeautyOptions
BeautyOptions()
Definition: NGIAgoraMediaNode.h:810
agora::rtc::IVideoFilter::onDataStreamWillStop
virtual void onDataStreamWillStop()
Definition: NGIAgoraMediaNode.h:221
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IVideoRenderer::setMirror
virtual int setMirror(void *view, bool mirror)=0
agora::rtc::IExtensionVideoFilter::getProcessMode
virtual void getProcessMode(ProcessMode &mode, bool &independent_thread)=0
SDK will invoke this API first to get the filter's requested process mode ProcessMode and threading m...
agora::rtc::IVideoSinkBase::applyRotation
virtual bool applyRotation()
Definition: NGIAgoraMediaNode.h:490
agora::rtc::IVideoFilter::onDataStreamWillStart
virtual bool onDataStreamWillStart()
Definition: NGIAgoraMediaNode.h:216
agora::rtc::IAudioFilterBase::adaptAudioFrame
virtual bool adaptAudioFrame(const media::base::AudioPcmFrame &inAudioFrame, media::base::AudioPcmFrame &adaptedFrame)=0
agora::rtc::IAudioFilter::isEnabled
virtual bool isEnabled() const =0
agora::rtc::ILipSyncFilter::setProperty
virtual int setProperty(const char *key, const void *buf, size_t buf_size)
Definition: NGIAgoraMediaNode.h:415
agora::rtc::IExtensionVideoFilter::Control::deliverVideoFrame
virtual ProcessResult deliverVideoFrame(agora::agora_refptr< IVideoFrame > frame)=0
Filter can invoke this function to deliver the processed frame to SDK if the Process Mode is designat...
agora::rtc::IAudioFilter::getPreferredChannelNumbers
virtual int getPreferredChannelNumbers()
Definition: NGIAgoraMediaNode.h:136
agora::media::base::AudioEncodedFrameInfo
Definition: AgoraMediaBase.h:434
agora::rtc::ILipSyncFilter::Control::disableMe
virtual void disableMe(int error, const char *msg)=0
Ask SDK to disable the current filter if a fatal error is detected.
agora::rtc::IMediaControlPacketSender
Definition: NGIAgoraMediaNode.h:650
agora::rtc::IVideoFilterBase::adaptVideoFrame
virtual bool adaptVideoFrame(const media::base::VideoFrame &capturedFrame, media::base::VideoFrame &adaptedFrame)=0
agora::rtc::ILipSyncFilter::Control
Definition: NGIAgoraMediaNode.h:377
agora::rtc::IExtensionVideoFilter::kSuccess
@ kSuccess
Definition: NGIAgoraMediaNode.h:254
agora::media::base::AudioPcmFrame
Definition: AgoraMediaBase.h:451
agora::rtc::IVideoFrameSender::sendVideoFrame
virtual int sendVideoFrame(const media::base::ExternalVideoFrame &videoFrame)=0
agora::rtc::IVideoRenderer::setRenderMode
virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode)=0
agora::rtc::ILipSyncFilter::start
virtual int start(agora::agora_refptr< Control > control)=0
agora::rtc::IMediaExtensionObserver::~IMediaExtensionObserver
virtual ~IMediaExtensionObserver()
Definition: NGIAgoraMediaNode.h:495
agora::rtc::IVideoBeautyFilter::BeautyOptions::lighteningLevel
float lighteningLevel
Definition: NGIAgoraMediaNode.h:789
agora::rtc::IAudioEncodedFrameReceiver::~IAudioEncodedFrameReceiver
virtual ~IAudioEncodedFrameReceiver()
Definition: NGIAgoraMediaNode.h:574
agora::rtc::IAudioFilter::setEnabled
virtual void setEnabled(bool enable)=0
agora::rtc::IAudioEncodedFrameReceiver::onEncodedAudioFrameReceived
virtual bool onEncodedAudioFrameReceived(const uint8_t *packet, size_t length, const media::base::AudioEncodedFrameInfo &info)=0
agora::ERR_NOT_SUPPORTED
@ ERR_NOT_SUPPORTED
Definition: AgoraBase.h:466
agora::rtc::IExtensionVideoFilter::stop
virtual int stop()=0
SDK will invoke this API when the data stream is about to stop. Filter can perform cleanup jobs in th...
agora::rtc::IMediaExtensionObserver::onEvent
virtual void onEvent(const char *provider, const char *extension, const char *key, const char *json_value)
Definition: NGIAgoraMediaNode.h:496
agora::rtc::IMediaExtensionObserver
Definition: NGIAgoraMediaNode.h:493
agora::rtc::IAudioEncodedFrameSender::sendEncodedAudioFrame
virtual bool sendEncodedAudioFrame(const uint8_t *payload_data, size_t payload_size, const EncodedAudioFrameInfo &audioFrameInfo)=0
agora::rtc::IVideoFilter
Definition: NGIAgoraMediaNode.h:170
agora::rtc::IVideoRenderer::setRotation
virtual int setRotation(void *view, agora::rtc::VIDEO_ORIENTATION rotation)=0
agora::rtc::IVideoBeautyFilter::BeautyOptions
Definition: NGIAgoraMediaNode.h:761
agora::rtc::VideoFrameData::Type
OPTIONAL_ENUM_CLASS Type
Definition: NGIAgoraVideoFrame.h:159
agora::rtc::IExtensionVideoFilter::adaptVideoFrame
virtual bool adaptVideoFrame(const media::base::VideoFrame &capturedFrame, media::base::VideoFrame &adaptedFrame)
Definition: NGIAgoraMediaNode.h:362
agora::rtc::IExtensionVideoFilter::ProcessMode
ProcessMode
Definition: NGIAgoraMediaNode.h:248
agora::rtc::IMediaPacketReceiver::onMediaPacketReceived
virtual bool onMediaPacketReceived(const uint8_t *packet, size_t length, const agora::media::base::PacketOptions &options)=0