Agora Java API Reference for Android

NGIAgoraMediaNode.h
1 #pragma once
2 #include "AgoraRefPtr.h"
3 #include "AgoraBase.h"
4 #include "IAgoraLog.h"
5 #include "NGIAgoraVideoFrame.h"
6 #include "AgoraExtensionVersion.h"
7 #include <api/aosl_ref.h>
8
9 #ifndef OPTIONAL_PROCESSRESULT_SPECIFIER
10 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
11 #define OPTIONAL_PROCESSRESULT_SPECIFIER ProcessResult::
12 #else
13 #define OPTIONAL_PROCESSRESULT_SPECIFIER
14 #endif
15 #endif
16
17 namespace webrtc {
18 struct AudioFrameHandleInfo;
19 } // namespace webrtc
20
21 namespace agora {
22 namespace rtc {
27 class IAudioFilterBase : public RefCountInterface {
28 public:
29 // Return false if filter decide to drop the frame.
30 // Implementation should not change samples_per_channel_/sample_rate_hz_/num_channels_
31 // Implementation should just adapt data of audio frame.
40 virtual bool adaptAudioFrame(const media::base::AudioPcmFrame& inAudioFrame,
41 media::base::AudioPcmFrame& adaptedFrame) = 0;
42
50 virtual int getPreferredSampleRate() = 0;
51
60 virtual int getPreferredChannelNumbers() = 0;
61
62 protected:
63 ~IAudioFilterBase() {}
64 };
65
72 class IAudioFilter : public IAudioFilterBase {
73 public:
80 virtual void setEnabled(bool enable) = 0;
87 virtual bool isEnabled() const = 0;
98 virtual int setProperty(const char* key, const void* buf, int buf_size) = 0;
109 virtual int getProperty(const char* key, void* buf, int buf_size) const = 0;
117 virtual const char * getName() const = 0;
118
127 virtual int getPreferredSampleRate() { return 0; };
128
137 virtual int getPreferredChannelNumbers() { return 0; };
138
139 protected:
140 ~IAudioFilter() {}
141 };
142
143 class IAudioFilterV2 : public IAudioFilter {
144 public:
145 class Control : public RefCountInterface {
146 public:
152 virtual int postEvent(const char* key, const char* value) = 0;
159 virtual void printLog(commons::LOG_LEVEL level, const char* format, ...) = 0;
160 };
161 public:
166 virtual void setExtensionControl(agora::agora_refptr<IAudioFilterV2::Control> control) = 0;
167 };
168
173 class IVideoFilterBase : public RefCountInterface {
174 public:
185 virtual bool adaptVideoFrame(const media::base::VideoFrame& capturedFrame,
186 media::base::VideoFrame& adaptedFrame) = 0;
187 };
188
189 // TODO(Bob): private inherit?
197 class IVideoFilter : public IVideoFilterBase {
198 public:
206 virtual void setEnabled(bool enable) {}
213 virtual bool isEnabled() { return true; }
224 virtual int setProperty(const char* key, const void* buf, size_t buf_size) { return -1; }
235 virtual int getProperty(const char* key, void* buf, size_t buf_size) { return -1; }
243 virtual bool onDataStreamWillStart() { return true; }
248 virtual void onDataStreamWillStop() { }
256 virtual bool isExternal() { return true; }
264 virtual bool isExtensionFilter() { return false; }
265 };
266
273 class IExtensionVideoFilter : public IVideoFilter {
274 public:
275 enum ProcessMode {
276 kSync, // Indicates that video frame data will be exchanged via "adaptVideoFrame"
277 kAsync, // Indicates that video frame data will be exchanged via "pendVideoFrame" & "deliverVideoFrame"
278 };
279
280 enum ProcessResult {
281 kSuccess, // Video frame data is successfully processed
282 kBypass, // Video frame data should bypass the current filter and flow to its successsors
283 kDrop, // Video Frame data should be discarded
284 };
285
293 class Control : public RefCountInterface {
294 public:
301 virtual ProcessResult deliverVideoFrame(agora::agora_refptr<IVideoFrame> frame) = 0;
306 virtual agora::agora_refptr<IVideoFrameMemoryPool> getMemoryPool() = 0;
312 virtual int postEvent(const char* key, const char* value) = 0;
319 virtual void printLog(commons::LOG_LEVEL level, const char* format, ...) = 0;
325 virtual void disableMe(int error, const char* msg) = 0;
326 };
327
335 virtual void getProcessMode(ProcessMode& mode, bool& independent_thread) = 0;
336
344 virtual int start(agora::agora_refptr<Control> control) = 0;
350 virtual int stop() = 0;
359 virtual void getVideoFormatWanted(VideoFrameData::Type& type, RawPixelBuffer::Format& format) = 0;
366 virtual ProcessResult pendVideoFrame(agora::agora_refptr<IVideoFrame> frame) {
367 return OPTIONAL_PROCESSRESULT_SPECIFIER kBypass;
368 }
374 virtual ProcessResult adaptVideoFrame(agora::agora_refptr<IVideoFrame> in, agora::agora_refptr<IVideoFrame>& out) {
375 return OPTIONAL_PROCESSRESULT_SPECIFIER kBypass;
376 }
377 /* Occurs each time needs to get rotation apply.
378 *
379 * @return Determines whether to rotate.
380 * - true: need to rotate.
381 * - false: no rotate.
382 */
383 virtual bool getRotationApplied() { return false; }
384
385 // NOTE: The following two interfaces should never be overriden!
386 virtual bool isExtensionFilter() { return true; }
387 virtual bool adaptVideoFrame(
388 const media::base::VideoFrame& capturedFrame,
389 media::base::VideoFrame& adaptedFrame) {
390 return -ERR_NOT_SUPPORTED;
391 }
392 };
393
394 class ILipSyncFilter : public RefCountInterface {
395 public:
396 enum ProcessResult {
397 kSuccess, // Video frame data is successfully processed
398 kBypass, // Video frame data should bypass the current filter and flow to its successsors
399 kDrop, // Video Frame data should be discarded
400 };
401
402 class Control : public RefCountInterface {
403 public:
409 virtual int postEvent(const char* key, const char* value) = 0;
416 virtual void printLog(commons::LOG_LEVEL level, const char* format, ...) = 0;
422 virtual void disableMe(int error, const char* msg) = 0;
428 virtual void ReportCounter(int32_t counter_id, int32_t value) = 0;
433 virtual int GetStats(int32_t counter_id) = 0;
434 };
435
436 virtual int start(agora::agora_refptr<Control> control) = 0;
437
438 virtual int stop() = 0;
439
440 virtual int setProperty(const char* key, const void* buf, size_t buf_size) { return -1; }
447 virtual ProcessResult convertAudioFrameToFaceInfo(const agora::media::base::AudioPcmFrame& inAudioFrame, char* outFaceInfo) {
448 return kBypass;
449 }
450 };
451
455 class IVideoSinkBase : public RefCountInterface {
456 public:
467 virtual int setProperty(const char* key, const void* buf, int buf_size) { return -1; }
478 virtual int getProperty(const char* key, void* buf, int buf_size) { return -1; }
483 virtual int onFrame(const media::base::VideoFrame& videoFrame) = 0;
488 virtual bool isExternalSink() { return true; }
496 virtual bool onDataStreamWillStart() { return true; }
501 virtual void onDataStreamWillStop() { }
508 virtual bool applyMirror() { return false; }
515 virtual bool applyRotation() { return false; }
516 };
517
518 class IMediaExtensionObserver : public RefCountInterface {
519 public:
520 virtual ~IMediaExtensionObserver() {}
521 virtual void onEventWithContext(const ExtensionContext& context, const char* key, const char* json_value) {}
522 virtual void onExtensionStoppedWithContext(const ExtensionContext& context) {}
523 virtual void onExtensionStartedWithContext(const ExtensionContext& context) {}
524 virtual void onExtensionErrorWithContext(const ExtensionContext& context, int error, const char* message) {}
525 };
526
532 class IAudioPcmDataSender : public RefCountInterface {
533 public:
547 virtual int sendAudioPcmData(
548 const void* audio_data, uint32_t capture_timestamp, int64_t presentation_ms,
549 const size_t samples_per_channel, // for 10ms Data, number_of_samples * 100 = sample_rate
550 const agora::rtc::BYTES_PER_SAMPLE bytes_per_sample, // 2
551 const size_t number_of_channels,
552 const uint32_t sample_rate, aosl_ref_t ares = AOSL_REF_INVALID) = 0; // sample_rate > 8000)
553
554 protected:
555 ~IAudioPcmDataSender() {}
556 };
557
565 class IAudioEncodedFrameSender : public RefCountInterface {
566 public:
579 virtual bool sendEncodedAudioFrame(const uint8_t* payload_data, size_t payload_size,
580 const EncodedAudioFrameInfo& audioFrameInfo, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
581
582 protected:
583 ~IAudioEncodedFrameSender() {}
584 };
585
586 class IAudioEncodedFrameReceiver {
587 public:
596 virtual bool onEncodedAudioFrameReceived (
597 const uint8_t *packet, size_t length, const media::base::AudioEncodedFrameInfo& info) = 0;
598
599 virtual ~IAudioEncodedFrameReceiver() {}
600 };
601
606 class IMediaPacketReceiver {
607 public:
616 virtual bool onMediaPacketReceived(
617 const uint8_t *packet, size_t length, const agora::media::base::PacketOptions& options) = 0;
618
619 virtual ~IMediaPacketReceiver() {}
620 };
621
628 class IMediaControlPacketReceiver {
629 public:
637 virtual bool onMediaControlPacketReceived(uid_t uid, const uint8_t *packet, size_t length) = 0;
638
639 virtual ~IMediaControlPacketReceiver() {}
640 };
641
649 class IMediaPacketSender : public RefCountInterface {
650 public:
662 virtual int sendMediaPacket(const uint8_t *packet, size_t length,
663 const media::base::PacketOptions &options, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
664 protected:
665 ~IMediaPacketSender() {}
666 };
667
675 class IMediaControlPacketSender {
676 public:
689 virtual int sendPeerMediaControlPacket(media::base::user_id_t userId,
690 const uint8_t *packet,
691 size_t length, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
692
703 virtual int sendBroadcastMediaControlPacket(const uint8_t *packet, size_t length, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
704
705 virtual ~IMediaControlPacketSender() {}
706 };
707
712 class IAudioSinkBase : public RefCountInterface {
713 public:
721 virtual bool onAudioFrame(const media::base::AudioPcmFrame& audioFrame) = 0;
722
723 protected:
724 ~IAudioSinkBase() {}
725 };
726
734 class IVideoFrameSender : public RefCountInterface {
735 public:
745 virtual int sendVideoFrame(const media::base::ExternalVideoFrame& videoFrame, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
746
747 protected:
748 ~IVideoFrameSender() {}
749 };
750
758 class IVideoEncodedImageSender : public RefCountInterface {
759 public:
771 virtual bool sendEncodedVideoImage(const uint8_t* imageBuffer, size_t length,
772 const EncodedVideoFrameInfo& videoEncodedFrameInfo, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
773
774 protected:
775 ~IVideoEncodedImageSender() {}
776 };
777
781 class IVideoBeautyFilter : public IVideoFilter {
782 public:
786 struct BeautyOptions {
790 enum LIGHTENING_CONTRAST_LEVEL {
794 LIGHTENING_CONTRAST_LOW = 0,
798 LIGHTENING_CONTRAST_NORMAL,
802 LIGHTENING_CONTRAST_HIGH
803 };
804
809 LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
810
814 float lighteningLevel;
815
820 float smoothnessLevel;
821
826 float rednessLevel;
827
828 BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness,
829 float redness)
830 : lighteningContrastLevel(contrastLevel),
831 lighteningLevel(lightening),
832 smoothnessLevel(smoothness),
833 rednessLevel(redness) {}
834
835 BeautyOptions()
836 : lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL),
837 lighteningLevel(0),
838 smoothnessLevel(0),
839 rednessLevel(0) {}
840 };
851 virtual int setBeautyEffectOptions(bool enabled, BeautyOptions options) = 0;
852 };
853
857 class IVideoRenderer : public IVideoSinkBase {
858 public:
866 virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
875 virtual int setRenderMode(void* view, media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
885 virtual int setMirror(bool mirror, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
896 virtual int setMirror(void* view, bool mirror, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
904 virtual int setView(void* view, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
913 virtual int addView(void* view, const Rectangle& cropArea, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
920 virtual int unsetView(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
927 virtual int removeView(void* view) = 0;
928 };
929
930 static const int kDeviceIdSize = 128;
931
932 class IVideoTrack;
936 class IVideoFrameTransceiver : public RefCountInterface {
937 public:
938 virtual int getTranscodingDelayMs() = 0;
939 virtual int addVideoTrack(agora_refptr<IVideoTrack> track, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
940 virtual int removeVideoTrack(agora_refptr<IVideoTrack> track, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
941 };
942
943 }
944 }
agora::media::base::VideoFrame
Definition: AgoraMediaBase.h:963
agora::rtc::IMediaPacketSender::sendMediaPacket
virtual int sendMediaPacket(const uint8_t *packet, size_t length, const media::base::PacketOptions &options, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoSinkBase::onDataStreamWillStart
virtual bool onDataStreamWillStart()
Definition: NGIAgoraMediaNode.h:496
agora::rtc::IMediaControlPacketReceiver
Definition: NGIAgoraMediaNode.h:628
agora::rtc::ILipSyncFilter::Control::printLog
virtual void printLog(commons::LOG_LEVEL level, const char *format,...)=0
print log to the SDK.
agora::rtc::IVideoRenderer::unsetView
virtual int unsetView(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoFilter::onDataStreamWillStop
virtual void onDataStreamWillStop()
Definition: NGIAgoraMediaNode.h:248
agora::rtc::IAudioEncodedFrameReceiver::onEncodedAudioFrameReceived
virtual bool onEncodedAudioFrameReceived(const uint8_t *packet, size_t length, const media::base::AudioEncodedFrameInfo &info)=0
agora::rtc::IVideoSinkBase::applyRotation
virtual bool applyRotation()
Definition: NGIAgoraMediaNode.h:515
agora::rtc::IVideoBeautyFilter
Definition: NGIAgoraMediaNode.h:781
agora::rtc::IAudioFilterBase
Definition: NGIAgoraMediaNode.h:27
agora::rtc::IVideoFilterBase::adaptVideoFrame
virtual bool adaptVideoFrame(const media::base::VideoFrame &capturedFrame, media::base::VideoFrame &adaptedFrame)=0
agora::rtc::IVideoTrack
Definition: NGIAgoraVideoTrack.h:97
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::rtc::IVideoFrameTransceiver
Definition: NGIAgoraMediaNode.h:936
agora::rtc::IAudioFilterBase::adaptAudioFrame
virtual bool adaptAudioFrame(const media::base::AudioPcmFrame &inAudioFrame, media::base::AudioPcmFrame &adaptedFrame)=0
agora::rtc::IExtensionVideoFilter::isExtensionFilter
virtual bool isExtensionFilter()
Definition: NGIAgoraMediaNode.h:386
agora::rtc::IVideoRenderer::setRenderMode
virtual int setRenderMode(void *view, media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoFilter::setProperty
virtual int setProperty(const char *key, const void *buf, size_t buf_size)
Definition: NGIAgoraMediaNode.h:224
agora::rtc::IVideoFilter::isExtensionFilter
virtual bool isExtensionFilter()
Definition: NGIAgoraMediaNode.h:264
agora::rtc::Rectangle
Definition: AgoraBase.h:2221
agora::rtc::IVideoSinkBase
Definition: NGIAgoraMediaNode.h:455
agora::rtc::IVideoSinkBase::applyMirror
virtual bool applyMirror()
Definition: NGIAgoraMediaNode.h:508
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1640
agora::rtc::IVideoFilter::onDataStreamWillStart
virtual bool onDataStreamWillStart()
Definition: NGIAgoraMediaNode.h:243
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::EncodedAudioFrameInfo
Definition: AgoraBase.h:1479
agora::rtc::IMediaControlPacketSender::sendBroadcastMediaControlPacket
virtual int sendBroadcastMediaControlPacket(const uint8_t *packet, size_t length, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IAudioFilterV2::Control::postEvent
virtual int postEvent(const char *key, const char *value)=0
Post an event and notify the end users.
agora::rtc::IAudioPcmDataSender
Definition: NGIAgoraMediaNode.h:532
agora::rtc::ILipSyncFilter::convertAudioFrameToFaceInfo
virtual ProcessResult convertAudioFrameToFaceInfo(const agora::media::base::AudioPcmFrame &inAudioFrame, char *outFaceInfo)
Definition: NGIAgoraMediaNode.h:447
agora::rtc::IVideoRenderer::removeView
virtual int removeView(void *view)=0
agora::rtc::IMediaControlPacketReceiver::onMediaControlPacketReceived
virtual bool onMediaControlPacketReceived(uid_t uid, const uint8_t *packet, size_t length)=0
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, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::ILipSyncFilter
Definition: NGIAgoraMediaNode.h:394
agora::rtc::ExtensionContext
Definition: AgoraMediaBase.h:41
agora::rtc::IVideoEncodedImageSender
Definition: NGIAgoraMediaNode.h:758
agora::rtc::IAudioEncodedFrameSender::sendEncodedAudioFrame
virtual bool sendEncodedAudioFrame(const uint8_t *payload_data, size_t payload_size, const EncodedAudioFrameInfo &audioFrameInfo, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IExtensionVideoFilter::adaptVideoFrame
virtual bool adaptVideoFrame(const media::base::VideoFrame &capturedFrame, media::base::VideoFrame &adaptedFrame)
Definition: NGIAgoraMediaNode.h:387
agora::rtc::IAudioFilter::setProperty
virtual int setProperty(const char *key, const void *buf, int buf_size)=0
agora::rtc::IVideoRenderer::setRenderMode
virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IAudioFilter::isEnabled
virtual bool isEnabled() const =0
agora::rtc::IMediaPacketSender
Definition: NGIAgoraMediaNode.h:649
agora::rtc::IAudioFilter
Definition: NGIAgoraMediaNode.h:72
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::media::base::ExternalVideoFrame
Definition: AgoraMediaBase.h:770
agora::rtc::IAudioFilterBase::getPreferredSampleRate
virtual int getPreferredSampleRate()=0
agora::rtc::IVideoSinkBase::setProperty
virtual int setProperty(const char *key, const void *buf, int buf_size)
Definition: NGIAgoraMediaNode.h:467
agora::rtc::ILipSyncFilter::Control::GetStats
virtual int GetStats(int32_t counter_id)=0
get stats to the SDK.
agora::rtc::IVideoSinkBase::onDataStreamWillStop
virtual void onDataStreamWillStop()
Definition: NGIAgoraMediaNode.h:501
agora::rtc::IAudioFilterV2::setExtensionControl
virtual void setExtensionControl(agora::agora_refptr< IAudioFilterV2::Control > control)=0
AgoraSDK set IAudioFilterV2::Control to filter.
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::IAudioEncodedFrameReceiver
Definition: NGIAgoraMediaNode.h:586
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_HIGH
@ LIGHTENING_CONTRAST_HIGH
Definition: NGIAgoraMediaNode.h:802
agora::rtc::IAudioFilterV2::Control
Definition: NGIAgoraMediaNode.h:145
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.
agora::rtc::IAudioEncodedFrameSender
Definition: NGIAgoraMediaNode.h:565
agora::media::base::PacketOptions
Definition: AgoraMediaBase.h:322
agora::rtc::IAudioFilterBase::getPreferredChannelNumbers
virtual int getPreferredChannelNumbers()=0
agora::rtc::IVideoSinkBase::onFrame
virtual int onFrame(const media::base::VideoFrame &videoFrame)=0
agora::rtc::IVideoFilterBase
Definition: NGIAgoraMediaNode.h:173
agora::rtc::IVideoRenderer::setMirror
virtual int setMirror(bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoFrameSender::sendVideoFrame
virtual int sendVideoFrame(const media::base::ExternalVideoFrame &videoFrame, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoRenderer::addView
virtual int addView(void *view, const Rectangle &cropArea, aosl_ref_t ares=AOSL_REF_INVALID)=0
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:374
agora::rtc::IMediaPacketReceiver
Definition: NGIAgoraMediaNode.h:606
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_LEVEL
LIGHTENING_CONTRAST_LEVEL
Definition: NGIAgoraMediaNode.h:790
agora::rtc::IAudioFilterV2::Control::printLog
virtual void printLog(commons::LOG_LEVEL level, const char *format,...)=0
print log to the SDK.
agora::rtc::IVideoRenderer
Definition: NGIAgoraMediaNode.h:857
agora::rtc::IVideoEncodedImageSender::sendEncodedVideoImage
virtual bool sendEncodedVideoImage(const uint8_t *imageBuffer, size_t length, const EncodedVideoFrameInfo &videoEncodedFrameInfo, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IMediaControlPacketSender::sendPeerMediaControlPacket
virtual int sendPeerMediaControlPacket(media::base::user_id_t userId, const uint8_t *packet, size_t length, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoRenderer::setMirror
virtual int setMirror(void *view, bool mirror, aosl_ref_t ares=AOSL_REF_INVALID)=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::IAudioFilterV2
Definition: NGIAgoraMediaNode.h:143
agora::rtc::IExtensionVideoFilter::Control
Definition: NGIAgoraMediaNode.h:293
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:366
agora::rtc::IVideoBeautyFilter::BeautyOptions::rednessLevel
float rednessLevel
Definition: NGIAgoraMediaNode.h:826
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_LOW
@ LIGHTENING_CONTRAST_LOW
Definition: NGIAgoraMediaNode.h:794
agora::rtc::IAudioSinkBase
Definition: NGIAgoraMediaNode.h:712
agora::rtc::IAudioSinkBase::onAudioFrame
virtual bool onAudioFrame(const media::base::AudioPcmFrame &audioFrame)=0
agora::rtc::IVideoFrameSender
Definition: NGIAgoraMediaNode.h:734
agora::rtc::IExtensionVideoFilter
Definition: NGIAgoraMediaNode.h:273
agora::rtc::IAudioFilter::getPreferredChannelNumbers
virtual int getPreferredChannelNumbers()
Definition: NGIAgoraMediaNode.h:137
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::ILipSyncFilter::Control::ReportCounter
virtual void ReportCounter(int32_t counter_id, int32_t value)=0
report counter to the SDK.
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IVideoFilter::getProperty
virtual int getProperty(const char *key, void *buf, size_t buf_size)
Definition: NGIAgoraMediaNode.h:235
agora::rtc::ILipSyncFilter::Control::postEvent
virtual int postEvent(const char *key, const char *value)=0
Post an event and notify the end users.
agora::rtc::IMediaPacketReceiver::onMediaPacketReceived
virtual bool onMediaPacketReceived(const uint8_t *packet, size_t length, const agora::media::base::PacketOptions &options)=0
agora::rtc::IVideoFilter::isEnabled
virtual bool isEnabled()
Definition: NGIAgoraMediaNode.h:213
agora::rtc::IVideoFilter::setEnabled
virtual void setEnabled(bool enable)
Definition: NGIAgoraMediaNode.h:206
agora::rtc::IVideoBeautyFilter::BeautyOptions::smoothnessLevel
float smoothnessLevel
Definition: NGIAgoraMediaNode.h:820
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::setEnabled
virtual void setEnabled(bool enable)=0
agora::media::base::AudioEncodedFrameInfo
Definition: AgoraMediaBase.h:336
agora::rtc::IVideoBeautyFilter::setBeautyEffectOptions
virtual int setBeautyEffectOptions(bool enabled, BeautyOptions options)=0
agora::rtc::IVideoBeautyFilter::BeautyOptions::lighteningLevel
float lighteningLevel
Definition: NGIAgoraMediaNode.h:814
agora::rtc::IVideoFilter::isExternal
virtual bool isExternal()
Definition: NGIAgoraMediaNode.h:256
agora::rtc::IAudioFilter::getPreferredSampleRate
virtual int getPreferredSampleRate()
Definition: NGIAgoraMediaNode.h:127
agora::rtc::IMediaControlPacketSender
Definition: NGIAgoraMediaNode.h:675
agora::rtc::IVideoBeautyFilter::BeautyOptions::lighteningContrastLevel
LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel
Definition: NGIAgoraMediaNode.h:809
agora::rtc::IVideoBeautyFilter::BeautyOptions::LIGHTENING_CONTRAST_NORMAL
@ LIGHTENING_CONTRAST_NORMAL
Definition: NGIAgoraMediaNode.h:798
agora::rtc::ILipSyncFilter::Control
Definition: NGIAgoraMediaNode.h:402
agora::rtc::IExtensionVideoFilter::Control::printLog
virtual void printLog(commons::LOG_LEVEL level, const char *format,...)=0
print log to the SDK.
agora::media::base::AudioPcmFrame
Definition: AgoraMediaBase.h:351
agora::rtc::IVideoRenderer::setView
virtual int setView(void *view, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IAudioFilter::getProperty
virtual int getProperty(const char *key, void *buf, int buf_size) const =0
agora::rtc::IMediaExtensionObserver
Definition: NGIAgoraMediaNode.h:518
agora::rtc::IVideoFilter
Definition: NGIAgoraMediaNode.h:197
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::IVideoSinkBase::isExternalSink
virtual bool isExternalSink()
Definition: NGIAgoraMediaNode.h:488
agora::rtc::IVideoBeautyFilter::BeautyOptions
Definition: NGIAgoraMediaNode.h:786
agora::rtc::IAudioFilter::getName
virtual const char * getName() const =0
agora::rtc::IVideoSinkBase::getProperty
virtual int getProperty(const char *key, void *buf, int buf_size)
Definition: NGIAgoraMediaNode.h:478
agora::rtc::IExtensionVideoFilter::Control::postEvent
virtual int postEvent(const char *key, const char *value)=0
Post an event and notify the end users.