Agora C++ API Reference for All Platforms

AgoraMediaBase.h
1 // Agora Engine SDK
2 //
3 // Created by Sting Feng in 2017-11.
4 // Copyright (c) 2017 Agora.io. All rights reserved.
5
6 #pragma once // NOLINT(build/header_guard)
7
8 #include <cstring>
9 #include <stdint.h>
10 #include <limits>
11 #include <stddef.h>
12
13 #ifndef OPTIONAL_ENUM_SIZE_T
14 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
15 #define OPTIONAL_ENUM_SIZE_T enum : size_t
16 #else
17 #define OPTIONAL_ENUM_SIZE_T enum
18 #endif
19 #endif
20
21 #if !defined(__APPLE__)
22 #define __deprecated
23 #endif
24
25 namespace agora {
26 namespace rtc {
27
28 typedef unsigned int uid_t;
29 typedef unsigned int track_id_t;
30 typedef unsigned int conn_id_t;
31 typedef unsigned int video_track_id_t;
32
33 static const unsigned int INVALID_TRACK_ID = 0xffffffff;
34 static const unsigned int DEFAULT_CONNECTION_ID = 0;
35 static const unsigned int DUMMY_CONNECTION_ID = (std::numeric_limits<unsigned int>::max)();
36
37 struct EncodedVideoFrameInfo;
41 struct ExtensionContext {
47 bool isValid;
52 uid_t uid;
56 const char *providerName;
60 const char *extensionName;
61 ExtensionContext():isValid(false), uid(0), providerName(NULL), extensionName(NULL) {}
62 };
63
64
68 enum VIDEO_SOURCE_TYPE {
71 VIDEO_SOURCE_CAMERA_PRIMARY = 0,
72 VIDEO_SOURCE_CAMERA = VIDEO_SOURCE_CAMERA_PRIMARY,
75 VIDEO_SOURCE_CAMERA_SECONDARY = 1,
78 VIDEO_SOURCE_SCREEN_PRIMARY = 2,
79 VIDEO_SOURCE_SCREEN = VIDEO_SOURCE_SCREEN_PRIMARY,
82 VIDEO_SOURCE_SCREEN_SECONDARY = 3,
85 VIDEO_SOURCE_CUSTOM = 4,
88 VIDEO_SOURCE_MEDIA_PLAYER = 5,
91 VIDEO_SOURCE_RTC_IMAGE_PNG = 6,
94 VIDEO_SOURCE_RTC_IMAGE_JPEG = 7,
97 VIDEO_SOURCE_RTC_IMAGE_GIF = 8,
100 VIDEO_SOURCE_REMOTE = 9,
103 VIDEO_SOURCE_TRANSCODED = 10,
104
107 VIDEO_SOURCE_CAMERA_THIRD = 11,
110 VIDEO_SOURCE_CAMERA_FOURTH = 12,
113 VIDEO_SOURCE_SCREEN_THIRD = 13,
116 VIDEO_SOURCE_SCREEN_FOURTH = 14,
119 VIDEO_SOURCE_SPEECH_DRIVEN = 15,
120
121 VIDEO_SOURCE_UNKNOWN = 100
122 };
123
127 enum AUDIO_SOURCE_TYPE {
130 AUDIO_SOURCE_MICROPHONE = 0,
133 AUDIO_SOURCE_CUSTOM = 1,
136 AUDIO_SOURCE_MEDIA_PLAYER = 2,
139 AUDIO_SOURCE_LOOPBACK_RECORDING = 3,
142 AUDIO_SOURCE_MIXED_STREAM = 4,
145 AUDIO_SOURCE_REMOTE_USER = 5,
148 AUDIO_SOURCE_REMOTE_CHANNEL = 6,
149
150 AUDIO_SOURCE_UNKNOWN = 100
151 };
152
156 enum AudioRoute {
160 ROUTE_DEFAULT = -1,
164 ROUTE_HEADSET = 0,
168 ROUTE_EARPIECE = 1,
172 ROUTE_HEADSETNOMIC = 2,
176 ROUTE_SPEAKERPHONE = 3,
180 ROUTE_LOUDSPEAKER = 4,
184 ROUTE_BLUETOOTH_DEVICE_HFP = 5,
188 ROUTE_USB = 6,
192 ROUTE_HDMI = 7,
196 ROUTE_DISPLAYPORT = 8,
200 ROUTE_AIRPLAY = 9,
204 ROUTE_BLUETOOTH_DEVICE_A2DP = 10,
205 };
206
210 enum BYTES_PER_SAMPLE {
214 TWO_BYTES_PER_SAMPLE = 2,
215 };
216
217 struct AudioParameters {
218 int sample_rate;
219 size_t channels;
220 size_t frames_per_buffer;
221
222 AudioParameters() : sample_rate(0), channels(0), frames_per_buffer(0) {}
223 };
224
228 enum RAW_AUDIO_FRAME_OP_MODE_TYPE {
232 RAW_AUDIO_FRAME_OP_MODE_READ_ONLY = 0,
233
238 RAW_AUDIO_FRAME_OP_MODE_READ_WRITE = 2,
239 };
240
241 } // namespace rtc
242
243 namespace media {
247 enum MEDIA_SOURCE_TYPE {
251 AUDIO_PLAYOUT_SOURCE = 0,
255 AUDIO_RECORDING_SOURCE = 1,
259 PRIMARY_CAMERA_SOURCE = 2,
263 SECONDARY_CAMERA_SOURCE = 3,
267 PRIMARY_SCREEN_SOURCE = 4,
271 SECONDARY_SCREEN_SOURCE = 5,
275 CUSTOM_VIDEO_SOURCE = 6,
279 MEDIA_PLAYER_SOURCE = 7,
283 RTC_IMAGE_PNG_SOURCE = 8,
287 RTC_IMAGE_JPEG_SOURCE = 9,
291 RTC_IMAGE_GIF_SOURCE = 10,
295 REMOTE_VIDEO_SOURCE = 11,
299 TRANSCODED_VIDEO_SOURCE = 12,
303 SPEECH_DRIVEN_VIDEO_SOURCE = 13,
307 UNKNOWN_MEDIA_SOURCE = 100
308 };
311 #define MAX_CONTENT_INSPECT_MODULE_COUNT 32
312 enum CONTENT_INSPECT_RESULT {
313 CONTENT_INSPECT_NEUTRAL = 1,
314 CONTENT_INSPECT_SEXY = 2,
315 CONTENT_INSPECT_PORN = 3,
316 };
317
318 enum CONTENT_INSPECT_TYPE {
322 CONTENT_INSPECT_INVALID = 0,
327 CONTENT_INSPECT_MODERATION __deprecated = 1,
331 CONTENT_INSPECT_SUPERVISION = 2,
335 CONTENT_INSPECT_IMAGE_MODERATION = 3
336 };
337
338 struct ContentInspectModule {
342 CONTENT_INSPECT_TYPE type;
346 unsigned int interval;
347 ContentInspectModule() {
348 type = CONTENT_INSPECT_INVALID;
349 interval = 0;
350 }
351 };
354 struct ContentInspectConfig {
355 const char* extraInfo;
359 const char* serverConfig;
363 ContentInspectModule modules[MAX_CONTENT_INSPECT_MODULE_COUNT];
366 int moduleCount;
367 ContentInspectConfig& operator=(const ContentInspectConfig& rth) {
368 extraInfo = rth.extraInfo;
369 serverConfig = rth.serverConfig;
370 moduleCount = rth.moduleCount;
371 memcpy(&modules, &rth.modules, MAX_CONTENT_INSPECT_MODULE_COUNT * sizeof(ContentInspectModule));
372 return *this;
373 }
374 ContentInspectConfig() : extraInfo(NULL), serverConfig(NULL), moduleCount(0) {}
375 };
376
377 namespace base {
378
379 typedef void* view_t;
380
381 typedef const char* user_id_t;
382
383 static const uint8_t kMaxCodecNameLength = 50;
384
389 struct PacketOptions {
393 uint32_t timestamp;
394 // Audio level indication.
395 uint8_t audioLevelIndication;
396 PacketOptions() : timestamp(0), audioLevelIndication(127) {}
397 };
398
403 struct AudioEncodedFrameInfo {
407 uint64_t sendTs;
411 uint8_t codec;
412 AudioEncodedFrameInfo() : sendTs(0), codec(0) {}
413 };
414
418 struct AudioPcmFrame {
422 OPTIONAL_ENUM_SIZE_T{
423 // Stereo, 32 kHz, 60 ms (2 * 32 * 60)
431 kMaxDataSizeSamples = 3840,
433 kMaxDataSizeBytes = kMaxDataSizeSamples * sizeof(int16_t),
434 };
435
438 int64_t capture_timestamp;
441 size_t samples_per_channel_;
444 int sample_rate_hz_;
447 size_t num_channels_;
450 rtc::BYTES_PER_SAMPLE bytes_per_sample;
452 int16_t data_[kMaxDataSizeSamples];
453
458 bool is_stereo_;
459
460 AudioPcmFrame& operator=(const AudioPcmFrame& src) {
461 if (this == &src) {
462 return *this;
463 }
464
465 capture_timestamp = src.capture_timestamp;
466 samples_per_channel_ = src.samples_per_channel_;
467 sample_rate_hz_ = src.sample_rate_hz_;
468 bytes_per_sample = src.bytes_per_sample;
469 num_channels_ = src.num_channels_;
470 is_stereo_ = src.is_stereo_;
471
472 size_t length = src.samples_per_channel_ * src.num_channels_;
473 if (length > kMaxDataSizeSamples) {
474 length = kMaxDataSizeSamples;
475 }
476
477 memcpy(data_, src.data_, length * sizeof(int16_t));
478
479 return *this;
480 }
481
482 AudioPcmFrame()
483 : capture_timestamp(0),
484 samples_per_channel_(0),
485 sample_rate_hz_(0),
486 num_channels_(0),
487 bytes_per_sample(rtc::TWO_BYTES_PER_SAMPLE),
488 is_stereo_(false) {
489 memset(data_, 0, sizeof(data_));
490 }
491
492 AudioPcmFrame(const AudioPcmFrame& src)
493 : capture_timestamp(src.capture_timestamp),
494 samples_per_channel_(src.samples_per_channel_),
495 sample_rate_hz_(src.sample_rate_hz_),
496 num_channels_(src.num_channels_),
497 bytes_per_sample(src.bytes_per_sample),
498 is_stereo_(src.is_stereo_) {
499 size_t length = src.samples_per_channel_ * src.num_channels_;
500 if (length > kMaxDataSizeSamples) {
501 length = kMaxDataSizeSamples;
502 }
503
504 memcpy(this->data_, src.data_, length * sizeof(int16_t));
505 }
506 };
507
510 enum AUDIO_DUAL_MONO_MODE {
512 AUDIO_DUAL_MONO_STEREO = 0,
514 AUDIO_DUAL_MONO_L = 1,
516 AUDIO_DUAL_MONO_R = 2,
518 AUDIO_DUAL_MONO_MIX = 3
519 };
520
524 enum VIDEO_PIXEL_FORMAT {
528 VIDEO_PIXEL_DEFAULT = 0,
532 VIDEO_PIXEL_I420 = 1,
536 VIDEO_PIXEL_BGRA = 2,
540 VIDEO_PIXEL_NV21 = 3,
544 VIDEO_PIXEL_RGBA = 4,
548 VIDEO_PIXEL_NV12 = 8,
552 VIDEO_TEXTURE_2D = 10,
556 VIDEO_TEXTURE_OES = 11,
557 /*
558 12: pixel format for iOS CVPixelBuffer NV12
559 */
560 VIDEO_CVPIXEL_NV12 = 12,
561 /*
562 13: pixel format for iOS CVPixelBuffer I420
563 */
564 VIDEO_CVPIXEL_I420 = 13,
565 /*
566 14: pixel format for iOS CVPixelBuffer BGRA
567 */
568 VIDEO_CVPIXEL_BGRA = 14,
572 VIDEO_CVPIXEL_P010 = 15,
576 VIDEO_PIXEL_I422 = 16,
581 VIDEO_TEXTURE_ID3D11TEXTURE2D = 17,
586 VIDEO_PIXEL_I010 = 18,
587 };
588
592 enum RENDER_MODE_TYPE {
597 RENDER_MODE_HIDDEN = 1,
603 RENDER_MODE_FIT = 2,
608 RENDER_MODE_ADAPTIVE __deprecated = 3,
609 };
610
614 enum CAMERA_VIDEO_SOURCE_TYPE {
618 CAMERA_SOURCE_FRONT = 0,
622 CAMERA_SOURCE_BACK = 1,
626 VIDEO_SOURCE_UNSPECIFIED = 2,
627 };
628
633 class IVideoFrameMetaInfo {
634 public:
635 enum META_INFO_KEY {
636 KEY_FACE_CAPTURE = 0,
637 };
638 virtual ~IVideoFrameMetaInfo(){};
639 virtual const char* getMetaInfoStr(META_INFO_KEY key) const = 0;
640 };
641
642 struct ColorSpace {
643 enum PrimaryID {
644 // The indices are equal to the values specified in T-REC H.273 Table 2.
645 PRIMARYID_BT709 = 1,
646 PRIMARYID_UNSPECIFIED = 2,
647 PRIMARYID_BT470M = 4,
648 PRIMARYID_BT470BG = 5,
649 PRIMARYID_SMPTE170M = 6, // Identical to BT601
650 PRIMARYID_SMPTE240M = 7,
651 PRIMARYID_FILM = 8,
652 PRIMARYID_BT2020 = 9,
653 PRIMARYID_SMPTEST428 = 10,
654 PRIMARYID_SMPTEST431 = 11,
655 PRIMARYID_SMPTEST432 = 12,
656 PRIMARYID_JEDECP22 = 22, // Identical to EBU3213-E
657 };
658
659 enum RangeID {
660 // The indices are equal to the values specified at
661 // https://www.webmproject.org/docs/container/#colour for the element Range.
662 RANGEID_INVALID = 0,
663 // Limited Rec. 709 color range with RGB values ranging from 16 to 235.
664 RANGEID_LIMITED = 1,
665 // Full RGB color range with RGB valees from 0 to 255.
666 RANGEID_FULL = 2,
667 // Range is defined by MatrixCoefficients/TransferCharacteristics.
668 RANGEID_DERIVED = 3,
669 };
670
671 enum MatrixID {
672 // The indices are equal to the values specified in T-REC H.273 Table 4.
673 MATRIXID_RGB = 0,
674 MATRIXID_BT709 = 1,
675 MATRIXID_UNSPECIFIED = 2,
676 MATRIXID_FCC = 4,
677 MATRIXID_BT470BG = 5,
678 MATRIXID_SMPTE170M = 6,
679 MATRIXID_SMPTE240M = 7,
680 MATRIXID_YCOCG = 8,
681 MATRIXID_BT2020_NCL = 9,
682 MATRIXID_BT2020_CL = 10,
683 MATRIXID_SMPTE2085 = 11,
684 MATRIXID_CDNCLS = 12,
685 MATRIXID_CDCLS = 13,
686 MATRIXID_BT2100_ICTCP = 14,
687 };
688
689 enum TransferID {
690 // The indices are equal to the values specified in T-REC H.273 Table 3.
691 TRANSFERID_BT709 = 1,
692 TRANSFERID_UNSPECIFIED = 2,
693 TRANSFERID_GAMMA22 = 4,
694 TRANSFERID_GAMMA28 = 5,
695 TRANSFERID_SMPTE170M = 6,
696 TRANSFERID_SMPTE240M = 7,
697 TRANSFERID_LINEAR = 8,
698 TRANSFERID_LOG = 9,
699 TRANSFERID_LOG_SQRT = 10,
700 TRANSFERID_IEC61966_2_4 = 11,
701 TRANSFERID_BT1361_ECG = 12,
702 TRANSFERID_IEC61966_2_1 = 13,
703 TRANSFERID_BT2020_10 = 14,
704 TRANSFERID_BT2020_12 = 15,
705 TRANSFERID_SMPTEST2084 = 16,
706 TRANSFERID_SMPTEST428 = 17,
707 TRANSFERID_ARIB_STD_B67 = 18,
708 };
709
710 PrimaryID primaries;
711 TransferID transfer;
712 MatrixID matrix;
713 RangeID range;
714
715 ColorSpace()
716 : primaries(PRIMARYID_UNSPECIFIED), transfer(TRANSFERID_UNSPECIFIED),
717 matrix(MATRIXID_UNSPECIFIED), range(RANGEID_INVALID) {}
718
719 bool validate() const {
720 return primaries != PRIMARYID_UNSPECIFIED || transfer != TRANSFERID_UNSPECIFIED ||
721 matrix != MATRIXID_UNSPECIFIED ||
722 range != RANGEID_INVALID;
723 }
724 };
725
729 struct Hdr10MetadataInfo {
733 uint16_t redPrimaryX;
737 uint16_t redPrimaryY;
741 uint16_t greenPrimaryX;
745 uint16_t greenPrimaryY;
749 uint16_t bluePrimaryX;
753 uint16_t bluePrimaryY;
757 uint16_t whitePointX;
761 uint16_t whitePointY;
765 unsigned int maxMasteringLuminance;
769 unsigned int minMasteringLuminance;
773 uint16_t maxContentLightLevel;
777 uint16_t maxFrameAverageLightLevel;
778
779 Hdr10MetadataInfo()
780 : redPrimaryX(0),
781 redPrimaryY(0),
782 greenPrimaryX(0),
783 greenPrimaryY(0),
784 bluePrimaryX(0),
785 bluePrimaryY(0),
786 whitePointX(0),
787 whitePointY(0),
788 maxMasteringLuminance(0),
789 minMasteringLuminance(0),
790 maxContentLightLevel(0),
791 maxFrameAverageLightLevel(0){}
792
793 bool validate() const {
794 return maxContentLightLevel >= 0 && maxContentLightLevel <= 20000 &&
795 maxFrameAverageLightLevel >= 0 &&
796 maxFrameAverageLightLevel <= 20000;
797 }
798 };
799
803 enum ALPHA_STITCH_MODE {
807 NO_ALPHA_STITCH = 0,
811 ALPHA_STITCH_UP = 1,
815 ALPHA_STITCH_BELOW = 2,
819 ALPHA_STITCH_LEFT = 3,
823 ALPHA_STITCH_RIGHT = 4,
824 };
825
826
830 struct ExternalVideoFrame {
831 ExternalVideoFrame()
832 : type(VIDEO_BUFFER_RAW_DATA),
833 format(VIDEO_PIXEL_DEFAULT),
834 buffer(NULL),
835 stride(0),
836 height(0),
837 cropLeft(0),
838 cropTop(0),
839 cropRight(0),
840 cropBottom(0),
841 rotation(0),
842 timestamp(0),
843 eglContext(NULL),
844 eglType(EGL_CONTEXT10),
845 textureId(0),
846 fenceObject(0),
847 metadataBuffer(NULL),
848 metadataSize(0),
849 alphaBuffer(NULL),
850 fillAlphaBuffer(false),
851 alphaStitchMode(NO_ALPHA_STITCH),
852 d3d11Texture2d(NULL),
853 textureSliceIndex(0){}
854
858 enum EGL_CONTEXT_TYPE {
862 EGL_CONTEXT10 = 0,
866 EGL_CONTEXT14 = 1,
867 };
868
872 enum VIDEO_BUFFER_TYPE {
876 VIDEO_BUFFER_RAW_DATA = 1,
880 VIDEO_BUFFER_ARRAY = 2,
884 VIDEO_BUFFER_TEXTURE = 3,
885 };
886
890 VIDEO_BUFFER_TYPE type;
894 VIDEO_PIXEL_FORMAT format;
895
899 void* buffer;
904 int stride;
908 int height;
913 int cropLeft;
918 int cropTop;
923 int cropRight;
928 int cropBottom;
933 int rotation;
941 long long timestamp;
948 void* eglContext;
952 EGL_CONTEXT_TYPE eglType;
957 int textureId;
962 long long fenceObject;
966 float matrix[16];
971 uint8_t* metadataBuffer;
976 int metadataSize;
982 uint8_t* alphaBuffer;
987 bool fillAlphaBuffer;
997 ALPHA_STITCH_MODE alphaStitchMode;
998
1002 void *d3d11Texture2d;
1003
1007 int textureSliceIndex;
1008
1012 Hdr10MetadataInfo hdr10MetadataInfo;
1013
1017 ColorSpace colorSpace;
1018 };
1019
1023 struct VideoFrame {
1024 VideoFrame():
1025 type(VIDEO_PIXEL_DEFAULT),
1026 width(0),
1027 height(0),
1028 yStride(0),
1029 uStride(0),
1030 vStride(0),
1031 yBuffer(NULL),
1032 uBuffer(NULL),
1033 vBuffer(NULL),
1034 rotation(0),
1035 renderTimeMs(0),
1036 avsync_type(0),
1037 metadata_buffer(NULL),
1038 metadata_size(0),
1039 sharedContext(0),
1040 textureId(0),
1041 d3d11Texture2d(NULL),
1042 alphaBuffer(NULL),
1043 alphaStitchMode(NO_ALPHA_STITCH),
1044 pixelBuffer(NULL),
1045 metaInfo(NULL){
1046 memset(matrix, 0, sizeof(matrix));
1047 }
1051 VIDEO_PIXEL_FORMAT type;
1055 int width;
1059 int height;
1063 int yStride;
1067 int uStride;
1071 int vStride;
1075 uint8_t* yBuffer;
1079 uint8_t* uBuffer;
1083 uint8_t* vBuffer;
1087 int rotation;
1094 int64_t renderTimeMs;
1098 int avsync_type;
1103 uint8_t* metadata_buffer;
1108 int metadata_size;
1112 void* sharedContext;
1116 int textureId;
1121 void* d3d11Texture2d;
1125 float matrix[16];
1131 uint8_t* alphaBuffer;
1141 ALPHA_STITCH_MODE alphaStitchMode;
1145 void* pixelBuffer;
1150 IVideoFrameMetaInfo* metaInfo;
1151
1155 Hdr10MetadataInfo hdr10MetadataInfo;
1156
1160 ColorSpace colorSpace;
1161 };
1162
1166 class IVideoFrameObserver {
1167 public:
1176 virtual void onFrame(const VideoFrame* frame) = 0;
1177 virtual ~IVideoFrameObserver() {}
1178 virtual bool isExternal() { return true; }
1179 virtual VIDEO_PIXEL_FORMAT getVideoFormatPreference() { return VIDEO_PIXEL_DEFAULT; }
1180 };
1181
1182 enum MEDIA_PLAYER_SOURCE_TYPE {
1188 MEDIA_PLAYER_SOURCE_DEFAULT,
1194 MEDIA_PLAYER_SOURCE_FULL_FEATURED,
1199 MEDIA_PLAYER_SOURCE_SIMPLE,
1200 };
1201
1202 enum VIDEO_MODULE_POSITION {
1203 POSITION_POST_CAPTURER = 1 << 0,
1204 POSITION_PRE_RENDERER = 1 << 1,
1205 POSITION_PRE_ENCODER = 1 << 2,
1206 POSITION_POST_CAPTURER_ORIGIN = 1 << 3,
1207 };
1208
1209 } // namespace base
1210
1213 struct SnapshotConfig {
1221 const char* filePath;
1222
1231 media::base::VIDEO_MODULE_POSITION position;
1232 SnapshotConfig() :filePath(NULL), position(media::base::POSITION_PRE_ENCODER) {}
1233 };
1234
1238 class IAudioPcmFrameSink {
1239 public:
1248 virtual void onFrame(agora::media::base::AudioPcmFrame* frame) = 0;
1249 virtual ~IAudioPcmFrameSink() {}
1250 };
1251
1255 class IAudioFrameObserverBase {
1256 public:
1260 enum AUDIO_FRAME_TYPE {
1264 FRAME_TYPE_PCM16 = 0,
1265 };
1266 enum { MAX_HANDLE_TIME_CNT = 10 };
1270 struct AudioFrame {
1274 AUDIO_FRAME_TYPE type;
1278 int samplesPerChannel;
1282 agora::rtc::BYTES_PER_SAMPLE bytesPerSample;
1288 int channels;
1292 int samplesPerSec;
1299 void* buffer;
1307 int64_t renderTimeMs;
1315 int avsync_type;
1322 int64_t presentationMs;
1326 int audioTrackNumber;
1330 uint32_t rtpTimestamp;
1331
1332 AudioFrame()
1333 : type(FRAME_TYPE_PCM16),
1334 samplesPerChannel(0),
1335 bytesPerSample(rtc::TWO_BYTES_PER_SAMPLE),
1336 channels(0),
1337 samplesPerSec(0),
1338 buffer(NULL),
1339 renderTimeMs(0),
1340 avsync_type(0),
1341 presentationMs(0),
1342 audioTrackNumber(0),
1343 rtpTimestamp(0) {}
1344 };
1345
1346 enum AUDIO_FRAME_POSITION {
1347 AUDIO_FRAME_POSITION_NONE = 0x0000,
1350 AUDIO_FRAME_POSITION_PLAYBACK = 0x0001,
1353 AUDIO_FRAME_POSITION_RECORD = 0x0002,
1356 AUDIO_FRAME_POSITION_MIXED = 0x0004,
1359 AUDIO_FRAME_POSITION_BEFORE_MIXING = 0x0008,
1362 AUDIO_FRAME_POSITION_EAR_MONITORING = 0x0010,
1363 };
1364
1365 struct AudioParams {
1374 int sample_rate;
1375
1376 /* The number of audio channels, which can be set as either of the following values:
1377
1378 - `1`: Mono (Default)
1379 - `2`: Stereo
1380 */
1381 int channels;
1382
1383 /* The use mode of the audio data. See AgoraAudioRawFrameOperationMode.
1384 */
1385 rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE mode;
1386
1390 int samples_per_call;
1391
1392 AudioParams()
1393 : sample_rate(0),
1394 channels(0),
1395 mode(rtc::RAW_AUDIO_FRAME_OP_MODE_READ_ONLY),
1396 samples_per_call(0) {}
1397 AudioParams(int samplerate, int channel, rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE type,
1398 int samplesPerCall)
1399 : sample_rate(samplerate),
1400 channels(channel),
1401 mode(type),
1402 samples_per_call(samplesPerCall) {}
1403 };
1404
1405 public:
1406 virtual ~IAudioFrameObserverBase() {}
1407
1416 virtual bool onRecordAudioFrame(const char* channelId, AudioFrame& audioFrame) = 0;
1425 virtual bool onPlaybackAudioFrame(const char* channelId, AudioFrame& audioFrame) = 0;
1434 virtual bool onMixedAudioFrame(const char* channelId, AudioFrame& audioFrame) = 0;
1442 virtual bool onEarMonitoringAudioFrame(AudioFrame& audioFrame) = 0;
1452 virtual bool onPlaybackAudioFrameBeforeMixing(const char* channelId, base::user_id_t userId,
1453 AudioFrame& audioFrame) {
1454 (void)channelId;
1455 (void)userId;
1456 (void)audioFrame;
1457 return true;
1458 }
1459
1482 virtual int getObservedAudioFramePosition() = 0;
1483
1495 virtual AudioParams getPlaybackAudioParams() = 0;
1496
1507 virtual AudioParams getRecordAudioParams() = 0;
1508
1519 virtual AudioParams getMixedAudioParams() = 0;
1520
1531 virtual AudioParams getEarMonitoringAudioParams() = 0;
1532 };
1533
1537 class IAudioFrameObserver : public IAudioFrameObserverBase {
1538 public:
1539 using IAudioFrameObserverBase::onPlaybackAudioFrameBeforeMixing;
1549 virtual bool onPlaybackAudioFrameBeforeMixing(const char* channelId, rtc::uid_t uid,
1550 AudioFrame& audioFrame) = 0;
1551 };
1552
1553 struct AudioSpectrumData {
1557 const float* audioSpectrumData;
1561 int dataLength;
1562
1563 AudioSpectrumData() : audioSpectrumData(NULL), dataLength(0) {}
1564 AudioSpectrumData(const float* data, int length) : audioSpectrumData(data), dataLength(length) {}
1565 };
1566
1567 struct UserAudioSpectrumInfo {
1571 agora::rtc::uid_t uid;
1575 struct AudioSpectrumData spectrumData;
1576
1577 UserAudioSpectrumInfo() : uid(0) {}
1578
1579 UserAudioSpectrumInfo(agora::rtc::uid_t uid, const float* data, int length)
1580 : uid(uid), spectrumData(data, length) {}
1581 };
1582
1586 class IAudioSpectrumObserver {
1587 public:
1588 virtual ~IAudioSpectrumObserver() {}
1589
1603 virtual bool onLocalAudioSpectrum(const AudioSpectrumData& data) = 0;
1623 virtual bool onRemoteAudioSpectrum(const UserAudioSpectrumInfo* spectrums,
1624 unsigned int spectrumNumber) = 0;
1625 };
1626
1630 class IVideoEncodedFrameObserver {
1631 public:
1642 virtual bool onEncodedVideoFrameReceived(
1643 rtc::uid_t uid, const uint8_t* imageBuffer, size_t length,
1644 const rtc::EncodedVideoFrameInfo& videoEncodedFrameInfo) = 0;
1645
1646 virtual ~IVideoEncodedFrameObserver() {}
1647 };
1648
1652 class IVideoFrameObserver {
1653 public:
1654 typedef media::base::VideoFrame VideoFrame;
1658 enum VIDEO_FRAME_PROCESS_MODE {
1664 PROCESS_MODE_READ_ONLY, // Observer works as a pure renderer and will not modify the original
1665 // frame.
1671 PROCESS_MODE_READ_WRITE, // Observer works as a filter that will process the video frame and
1672 // affect the following frame processing in SDK.
1673 };
1674
1675 public:
1676 virtual ~IVideoFrameObserver() {}
1677
1700 virtual bool onCaptureVideoFrame(agora::rtc::VIDEO_SOURCE_TYPE sourceType,
1701 VideoFrame& videoFrame) = 0;
1702
1726 virtual bool onPreEncodeVideoFrame(agora::rtc::VIDEO_SOURCE_TYPE sourceType,
1727 VideoFrame& videoFrame) = 0;
1728
1752 virtual bool onMediaPlayerVideoFrame(VideoFrame& videoFrame, int mediaPlayerId) = 0;
1753
1773 virtual bool onRenderVideoFrame(const char* channelId, rtc::uid_t remoteUid,
1774 VideoFrame& videoFrame) = 0;
1775
1776 virtual bool onTranscodedVideoFrame(VideoFrame& videoFrame) = 0;
1777
1787 virtual VIDEO_FRAME_PROCESS_MODE getVideoFrameProcessMode() { return PROCESS_MODE_READ_ONLY; }
1788
1804 virtual base::VIDEO_PIXEL_FORMAT getVideoFormatPreference() { return base::VIDEO_PIXEL_DEFAULT; }
1805
1821 virtual bool getRotationApplied() { return false; }
1822
1839 virtual bool getMirrorApplied() { return false; }
1840
1863 virtual uint32_t getObservedFramePosition() {
1864 return base::POSITION_POST_CAPTURER | base::POSITION_PRE_RENDERER;
1865 }
1866
1874 virtual bool isExternal() { return true; }
1875 };
1876
1880 enum EXTERNAL_VIDEO_SOURCE_TYPE {
1884 VIDEO_FRAME = 0,
1888 ENCODED_VIDEO_FRAME,
1889 };
1890
1896 enum MediaRecorderContainerFormat {
1900 FORMAT_MP4 = 1,
1901 };
1907 enum MediaRecorderStreamType {
1911 STREAM_TYPE_AUDIO = 0x01,
1915 STREAM_TYPE_VIDEO = 0x02,
1919 STREAM_TYPE_BOTH = STREAM_TYPE_AUDIO | STREAM_TYPE_VIDEO,
1920 };
1926 enum RecorderState {
1930 RECORDER_STATE_ERROR = -1,
1934 RECORDER_STATE_START = 2,
1938 RECORDER_STATE_STOP = 3,
1939 };
1945 enum RecorderReasonCode {
1949 RECORDER_REASON_NONE = 0,
1953 RECORDER_REASON_WRITE_FAILED = 1,
1958 RECORDER_REASON_NO_STREAM = 2,
1962 RECORDER_REASON_OVER_MAX_DURATION = 3,
1966 RECORDER_REASON_CONFIG_CHANGED = 4,
1967 };
1973 struct MediaRecorderConfiguration {
1982 const char* storagePath;
1987 MediaRecorderContainerFormat containerFormat;
1991 MediaRecorderStreamType streamType;
1995 int maxDurationMs;
2002 int recorderInfoUpdateInterval;
2006 int width;
2010 int height;
2014 int fps;
2018 int sample_rate;
2022 int channel_num;
2026 agora::rtc::VIDEO_SOURCE_TYPE videoSourceType;
2027
2028 MediaRecorderConfiguration()
2029 : storagePath(NULL),
2030 containerFormat(FORMAT_MP4),
2031 streamType(STREAM_TYPE_BOTH),
2032 maxDurationMs(120000),
2033 recorderInfoUpdateInterval(0),
2034 width(1280),
2035 height(720),
2036 fps(30),
2037 sample_rate(48000),
2038 channel_num(1),
2039 videoSourceType(rtc::VIDEO_SOURCE_CAMERA_PRIMARY) {}
2040 MediaRecorderConfiguration(const char* path, MediaRecorderContainerFormat format,
2041 MediaRecorderStreamType type, int duration, int interval)
2042 : storagePath(path),
2043 containerFormat(format),
2044 streamType(type),
2045 maxDurationMs(duration),
2046 recorderInfoUpdateInterval(interval),
2047 width(1280),
2048 height(720),
2049 fps(30),
2050 sample_rate(48000),
2051 channel_num(1),
2052 videoSourceType(rtc::VIDEO_SOURCE_CAMERA_PRIMARY) {}
2053 };
2054
2055 class IFaceInfoObserver {
2056 public:
2064 virtual bool onFaceInfo(const char* outFaceInfo) = 0;
2065
2066 virtual ~IFaceInfoObserver() {}
2067 };
2068
2074 struct RecorderInfo {
2078 const char* fileName;
2082 unsigned int durationMs;
2086 unsigned int fileSize;
2087
2088 RecorderInfo() : fileName(NULL), durationMs(0), fileSize(0) {}
2089 RecorderInfo(const char* name, unsigned int dur, unsigned int size)
2090 : fileName(name), durationMs(dur), fileSize(size) {}
2091 };
2092
2093 class IMediaRecorderObserver {
2094 public:
2109 virtual void onRecorderStateChanged(const char* channelId, rtc::uid_t uid, RecorderState state,
2110 RecorderReasonCode reason) = 0;
2127 virtual void onRecorderInfoUpdated(const char* channelId, rtc::uid_t uid,
2128 const RecorderInfo& info) = 0;
2129
2130 virtual ~IMediaRecorderObserver() {}
2131 };
2132
2133 } // namespace media
2134 } // namespace agora
agora::rtc::AudioParameters::sample_rate
int sample_rate
Definition: AgoraMediaBase.h:218
agora::media::PRIMARY_SCREEN_SOURCE
@ PRIMARY_SCREEN_SOURCE
Definition: AgoraMediaBase.h:267
agora::media::base::VIDEO_PIXEL_NV21
@ VIDEO_PIXEL_NV21
Definition: AgoraMediaBase.h:540
agora::media::base::AudioPcmFrame::AudioPcmFrame
AudioPcmFrame()
Definition: AgoraMediaBase.h:482
agora::rtc::VIDEO_SOURCE_MEDIA_PLAYER
@ VIDEO_SOURCE_MEDIA_PLAYER
Definition: AgoraMediaBase.h:88
agora::media::base::VIDEO_SOURCE_UNSPECIFIED
@ VIDEO_SOURCE_UNSPECIFIED
Definition: AgoraMediaBase.h:626
agora::media::IVideoFrameObserver::PROCESS_MODE_READ_ONLY
@ PROCESS_MODE_READ_ONLY
Definition: AgoraMediaBase.h:1664
agora::media::base::ColorSpace::MATRIXID_BT470BG
@ MATRIXID_BT470BG
Definition: AgoraMediaBase.h:677
agora::media::base::VideoFrame
Definition: AgoraMediaBase.h:1023
agora::media::base::ExternalVideoFrame::cropBottom
int cropBottom
Definition: AgoraMediaBase.h:928
agora::rtc::AUDIO_SOURCE_REMOTE_CHANNEL
@ AUDIO_SOURCE_REMOTE_CHANNEL
Definition: AgoraMediaBase.h:148
agora::media::IAudioFrameObserverBase::AudioParams::channels
int channels
Definition: AgoraMediaBase.h:1381
agora::rtc::VIDEO_SOURCE_SCREEN
@ VIDEO_SOURCE_SCREEN
Definition: AgoraMediaBase.h:79
agora::rtc::VIDEO_SOURCE_UNKNOWN
@ VIDEO_SOURCE_UNKNOWN
Definition: AgoraMediaBase.h:121
agora::media::base::Hdr10MetadataInfo::redPrimaryY
uint16_t redPrimaryY
Definition: AgoraMediaBase.h:737
agora::media::MEDIA_PLAYER_SOURCE
@ MEDIA_PLAYER_SOURCE
Definition: AgoraMediaBase.h:279
agora::rtc::VIDEO_SOURCE_CAMERA
@ VIDEO_SOURCE_CAMERA
Definition: AgoraMediaBase.h:72
agora::media::base::VideoFrame::metadata_size
int metadata_size
Definition: AgoraMediaBase.h:1108
agora::media::base::POSITION_PRE_RENDERER
@ POSITION_PRE_RENDERER
Definition: AgoraMediaBase.h:1204
agora::media::base::ColorSpace::MatrixID
MatrixID
Definition: AgoraMediaBase.h:671
agora::media::CONTENT_INSPECT_INVALID
@ CONTENT_INSPECT_INVALID
Definition: AgoraMediaBase.h:322
agora::media::SnapshotConfig::filePath
const char * filePath
Definition: AgoraMediaBase.h:1221
agora::media::SnapshotConfig::SnapshotConfig
SnapshotConfig()
Definition: AgoraMediaBase.h:1232
agora::media::base::ColorSpace::TRANSFERID_BT2020_12
@ TRANSFERID_BT2020_12
Definition: AgoraMediaBase.h:704
agora::media::base::ColorSpace::PRIMARYID_SMPTEST432
@ PRIMARYID_SMPTEST432
Definition: AgoraMediaBase.h:655
agora::media::AudioSpectrumData::audioSpectrumData
const float * audioSpectrumData
Definition: AgoraMediaBase.h:1557
agora::media::IAudioFrameObserverBase::onEarMonitoringAudioFrame
virtual bool onEarMonitoringAudioFrame(AudioFrame &audioFrame)=0
agora::rtc::ExtensionContext::providerName
const char * providerName
Definition: AgoraMediaBase.h:56
agora::media::base::ExternalVideoFrame::matrix
float matrix[16]
Definition: AgoraMediaBase.h:966
agora::media::base::POSITION_POST_CAPTURER_ORIGIN
@ POSITION_POST_CAPTURER_ORIGIN
Definition: AgoraMediaBase.h:1206
agora::media::ContentInspectConfig::ContentInspectConfig
ContentInspectConfig()
Definition: AgoraMediaBase.h:374
agora::media::base::ColorSpace::MATRIXID_BT709
@ MATRIXID_BT709
Definition: AgoraMediaBase.h:674
agora::media::base::VIDEO_PIXEL_FORMAT
VIDEO_PIXEL_FORMAT
Definition: AgoraMediaBase.h:524
agora::media::IAudioPcmFrameSink
Definition: AgoraMediaBase.h:1238
agora::rtc::VIDEO_SOURCE_CAMERA_SECONDARY
@ VIDEO_SOURCE_CAMERA_SECONDARY
Definition: AgoraMediaBase.h:75
agora::media::IMediaRecorderObserver
Definition: AgoraMediaBase.h:2093
agora::media::base::ColorSpace::MATRIXID_CDCLS
@ MATRIXID_CDCLS
Definition: AgoraMediaBase.h:685
agora::media::IAudioFrameObserverBase
Definition: AgoraMediaBase.h:1255
agora::media::base::ColorSpace::PRIMARYID_FILM
@ PRIMARYID_FILM
Definition: AgoraMediaBase.h:651
agora::media::base::ExternalVideoFrame::colorSpace
ColorSpace colorSpace
Definition: AgoraMediaBase.h:1017
agora::media::ContentInspectConfig::modules
ContentInspectModule modules[MAX_CONTENT_INSPECT_MODULE_COUNT]
Definition: AgoraMediaBase.h:363
agora::media::base::VideoFrame::uStride
int uStride
Definition: AgoraMediaBase.h:1067
agora::rtc::AudioParameters::AudioParameters
AudioParameters()
Definition: AgoraMediaBase.h:222
agora::media::RECORDER_STATE_STOP
@ RECORDER_STATE_STOP
Definition: AgoraMediaBase.h:1938
agora::media::IAudioFrameObserverBase::AudioFrame::rtpTimestamp
uint32_t rtpTimestamp
Definition: AgoraMediaBase.h:1330
agora::rtc::AudioParameters::channels
size_t channels
Definition: AgoraMediaBase.h:219
agora::media::IMediaRecorderObserver::~IMediaRecorderObserver
virtual ~IMediaRecorderObserver()
Definition: AgoraMediaBase.h:2130
agora::media::base::ColorSpace::MATRIXID_CDNCLS
@ MATRIXID_CDNCLS
Definition: AgoraMediaBase.h:684
agora::media::IAudioFrameObserverBase::FRAME_TYPE_PCM16
@ FRAME_TYPE_PCM16
Definition: AgoraMediaBase.h:1264
agora::media::IAudioFrameObserverBase::AudioFrame::audioTrackNumber
int audioTrackNumber
Definition: AgoraMediaBase.h:1326
agora::media::UNKNOWN_MEDIA_SOURCE
@ UNKNOWN_MEDIA_SOURCE
Definition: AgoraMediaBase.h:307
agora::media::VIDEO_FRAME
@ VIDEO_FRAME
Definition: AgoraMediaBase.h:1884
agora::media::SPEECH_DRIVEN_VIDEO_SOURCE
@ SPEECH_DRIVEN_VIDEO_SOURCE
Definition: AgoraMediaBase.h:303
agora::media::base::VideoFrame::alphaBuffer
uint8_t * alphaBuffer
Definition: AgoraMediaBase.h:1131
agora::media::base::IVideoFrameObserver::getVideoFormatPreference
virtual VIDEO_PIXEL_FORMAT getVideoFormatPreference()
Definition: AgoraMediaBase.h:1179
agora::media::base::kMaxCodecNameLength
static const uint8_t kMaxCodecNameLength
Definition: AgoraMediaBase.h:383
agora::media::IFaceInfoObserver
Definition: AgoraMediaBase.h:2055
agora::media::base::MEDIA_PLAYER_SOURCE_TYPE
MEDIA_PLAYER_SOURCE_TYPE
Definition: AgoraMediaBase.h:1182
agora::media::base::MEDIA_PLAYER_SOURCE_DEFAULT
@ MEDIA_PLAYER_SOURCE_DEFAULT
Definition: AgoraMediaBase.h:1188
agora::media::PRIMARY_CAMERA_SOURCE
@ PRIMARY_CAMERA_SOURCE
Definition: AgoraMediaBase.h:259
agora::media::base::ColorSpace::MATRIXID_SMPTE2085
@ MATRIXID_SMPTE2085
Definition: AgoraMediaBase.h:683
agora::media::base::CAMERA_SOURCE_FRONT
@ CAMERA_SOURCE_FRONT
Definition: AgoraMediaBase.h:618
agora::media::base::VideoFrame::height
int height
Definition: AgoraMediaBase.h:1059
agora::media::base::ColorSpace::validate
bool validate() const
Definition: AgoraMediaBase.h:719
agora::media::base::AudioPcmFrame::data_
int16_t data_[kMaxDataSizeSamples]
Definition: AgoraMediaBase.h:452
agora::media::IAudioFrameObserverBase::onRecordAudioFrame
virtual bool onRecordAudioFrame(const char *channelId, AudioFrame &audioFrame)=0
agora::media::base::IVideoFrameMetaInfo::getMetaInfoStr
virtual const char * getMetaInfoStr(META_INFO_KEY key) const =0
agora::media::base::Hdr10MetadataInfo::Hdr10MetadataInfo
Hdr10MetadataInfo()
Definition: AgoraMediaBase.h:779
agora::media::MediaRecorderConfiguration::maxDurationMs
int maxDurationMs
Definition: AgoraMediaBase.h:1995
agora::media::MediaRecorderConfiguration::MediaRecorderConfiguration
MediaRecorderConfiguration(const char *path, MediaRecorderContainerFormat format, MediaRecorderStreamType type, int duration, int interval)
Definition: AgoraMediaBase.h:2040
agora::media::IAudioSpectrumObserver
Definition: AgoraMediaBase.h:1586
agora::media::base::ALPHA_STITCH_LEFT
@ ALPHA_STITCH_LEFT
Definition: AgoraMediaBase.h:819
agora::media::AudioSpectrumData::AudioSpectrumData
AudioSpectrumData(const float *data, int length)
Definition: AgoraMediaBase.h:1564
agora::media::base::POSITION_POST_CAPTURER
@ POSITION_POST_CAPTURER
Definition: AgoraMediaBase.h:1203
agora::rtc::AUDIO_SOURCE_MEDIA_PLAYER
@ AUDIO_SOURCE_MEDIA_PLAYER
Definition: AgoraMediaBase.h:136
agora::rtc::AudioParameters
Definition: AgoraMediaBase.h:217
agora::media::base::ColorSpace::MATRIXID_BT2020_CL
@ MATRIXID_BT2020_CL
Definition: AgoraMediaBase.h:682
agora::media::IAudioFrameObserverBase::AudioFrame::renderTimeMs
int64_t renderTimeMs
Definition: AgoraMediaBase.h:1307
agora::media::base::ColorSpace::transfer
TransferID transfer
Definition: AgoraMediaBase.h:711
agora::media::base::ColorSpace::RANGEID_FULL
@ RANGEID_FULL
Definition: AgoraMediaBase.h:666
agora::media::IAudioFrameObserverBase::AudioParams::mode
rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE mode
Definition: AgoraMediaBase.h:1385
agora::media::base::RENDER_MODE_FIT
@ RENDER_MODE_FIT
Definition: AgoraMediaBase.h:603
agora::media::TRANSCODED_VIDEO_SOURCE
@ TRANSCODED_VIDEO_SOURCE
Definition: AgoraMediaBase.h:299
agora::media::base::VideoFrame::VideoFrame
VideoFrame()
Definition: AgoraMediaBase.h:1024
agora::media::base::ExternalVideoFrame::VIDEO_BUFFER_RAW_DATA
@ VIDEO_BUFFER_RAW_DATA
Definition: AgoraMediaBase.h:876
agora::media::IAudioFrameObserverBase::getPlaybackAudioParams
virtual AudioParams getPlaybackAudioParams()=0
agora::media::base::ColorSpace::RANGEID_LIMITED
@ RANGEID_LIMITED
Definition: AgoraMediaBase.h:664
agora::media::base::CAMERA_SOURCE_BACK
@ CAMERA_SOURCE_BACK
Definition: AgoraMediaBase.h:622
agora::media::base::ExternalVideoFrame::buffer
void * buffer
Definition: AgoraMediaBase.h:899
agora::media::IAudioFrameObserverBase::AudioFrame::channels
int channels
Definition: AgoraMediaBase.h:1288
agora::media::base::VIDEO_TEXTURE_OES
@ VIDEO_TEXTURE_OES
Definition: AgoraMediaBase.h:556
agora::media::IVideoFrameObserver::getVideoFormatPreference
virtual base::VIDEO_PIXEL_FORMAT getVideoFormatPreference()
Definition: AgoraMediaBase.h:1804
agora::media::IAudioFrameObserverBase::AudioFrame::AudioFrame
AudioFrame()
Definition: AgoraMediaBase.h:1332
agora::media::base::ColorSpace::TRANSFERID_GAMMA28
@ TRANSFERID_GAMMA28
Definition: AgoraMediaBase.h:694
agora::rtc::EncodedVideoFrameInfo
Definition: AgoraBase.h:1643
agora::media::base::ExternalVideoFrame::VIDEO_BUFFER_TYPE
VIDEO_BUFFER_TYPE
Definition: AgoraMediaBase.h:872
agora::media::ContentInspectConfig::serverConfig
const char * serverConfig
Definition: AgoraMediaBase.h:359
agora::media::base::IVideoFrameObserver
Definition: AgoraMediaBase.h:1166
agora::media::base::user_id_t
const char * user_id_t
Definition: AgoraMediaBase.h:381
agora::media::STREAM_TYPE_AUDIO
@ STREAM_TYPE_AUDIO
Definition: AgoraMediaBase.h:1911
agora::rtc::ROUTE_HEADSET
@ ROUTE_HEADSET
Definition: AgoraMediaBase.h:164
agora::media::IVideoFrameObserver::getVideoFrameProcessMode
virtual VIDEO_FRAME_PROCESS_MODE getVideoFrameProcessMode()
Definition: AgoraMediaBase.h:1787
agora::media::base::ColorSpace::TRANSFERID_BT709
@ TRANSFERID_BT709
Definition: AgoraMediaBase.h:691
agora::media::base::IVideoFrameMetaInfo::META_INFO_KEY
META_INFO_KEY
Definition: AgoraMediaBase.h:635
agora::media::IVideoFrameObserver
Definition: AgoraMediaBase.h:1652
agora::media::base::AudioPcmFrame::operator=
AudioPcmFrame & operator=(const AudioPcmFrame &src)
Definition: AgoraMediaBase.h:460
agora::media::IAudioFrameObserverBase::AudioFrame
Definition: AgoraMediaBase.h:1270
agora::media::base::VIDEO_TEXTURE_2D
@ VIDEO_TEXTURE_2D
Definition: AgoraMediaBase.h:552
agora::media::base::view_t
void * view_t
Definition: AgoraMediaBase.h:379
agora::media::base::AudioEncodedFrameInfo::codec
uint8_t codec
Definition: AgoraMediaBase.h:411
agora::media::IVideoEncodedFrameObserver::onEncodedVideoFrameReceived
virtual bool onEncodedVideoFrameReceived(rtc::uid_t uid, const uint8_t *imageBuffer, size_t length, const rtc::EncodedVideoFrameInfo &videoEncodedFrameInfo)=0
agora::rtc::VIDEO_SOURCE_SCREEN_SECONDARY
@ VIDEO_SOURCE_SCREEN_SECONDARY
Definition: AgoraMediaBase.h:82
agora::media::base::IVideoFrameObserver::~IVideoFrameObserver
virtual ~IVideoFrameObserver()
Definition: AgoraMediaBase.h:1177
agora::media::MediaRecorderConfiguration::recorderInfoUpdateInterval
int recorderInfoUpdateInterval
Definition: AgoraMediaBase.h:2002
agora::media::IAudioFrameObserver
Definition: AgoraMediaBase.h:1537
agora::media::base::ColorSpace::PRIMARYID_SMPTE170M
@ PRIMARYID_SMPTE170M
Definition: AgoraMediaBase.h:649
agora::media::base::IVideoFrameMetaInfo::~IVideoFrameMetaInfo
virtual ~IVideoFrameMetaInfo()
Definition: AgoraMediaBase.h:638
agora::media::base::ColorSpace::ColorSpace
ColorSpace()
Definition: AgoraMediaBase.h:715
agora::media::base::Hdr10MetadataInfo
Definition: AgoraMediaBase.h:729
agora::media::IAudioFrameObserverBase::getEarMonitoringAudioParams
virtual AudioParams getEarMonitoringAudioParams()=0
agora::media::base::VideoFrame::d3d11Texture2d
void * d3d11Texture2d
Definition: AgoraMediaBase.h:1121
agora::media::base::VideoFrame::rotation
int rotation
Definition: AgoraMediaBase.h:1087
agora::media::base::VideoFrame::alphaStitchMode
ALPHA_STITCH_MODE alphaStitchMode
Definition: AgoraMediaBase.h:1141
agora::rtc::BYTES_PER_SAMPLE
BYTES_PER_SAMPLE
Definition: AgoraMediaBase.h:210
agora::media::base::IVideoFrameObserver::onFrame
virtual void onFrame(const VideoFrame *frame)=0
agora::media::IMediaRecorderObserver::onRecorderStateChanged
virtual void onRecorderStateChanged(const char *channelId, rtc::uid_t uid, RecorderState state, RecorderReasonCode reason)=0
agora::media::base::ColorSpace::PrimaryID
PrimaryID
Definition: AgoraMediaBase.h:643
agora::media::base::MEDIA_PLAYER_SOURCE_FULL_FEATURED
@ MEDIA_PLAYER_SOURCE_FULL_FEATURED
Definition: AgoraMediaBase.h:1194
agora::media::IAudioFrameObserverBase::getMixedAudioParams
virtual AudioParams getMixedAudioParams()=0
agora::media::RECORDER_REASON_NONE
@ RECORDER_REASON_NONE
Definition: AgoraMediaBase.h:1949
agora::rtc::conn_id_t
unsigned int conn_id_t
Definition: AgoraMediaBase.h:30
agora::media::IAudioFrameObserverBase::AudioParams::AudioParams
AudioParams(int samplerate, int channel, rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE type, int samplesPerCall)
Definition: AgoraMediaBase.h:1397
agora::media::base::IVideoFrameObserver::isExternal
virtual bool isExternal()
Definition: AgoraMediaBase.h:1178
agora::media::base::AudioPcmFrame::OPTIONAL_ENUM_SIZE_T
OPTIONAL_ENUM_SIZE_T
Definition: AgoraMediaBase.h:422
agora::media::MediaRecorderConfiguration::sample_rate
int sample_rate
Definition: AgoraMediaBase.h:2018
agora::media::base::ExternalVideoFrame::eglContext
void * eglContext
Definition: AgoraMediaBase.h:948
agora::media::base::VideoFrame::metaInfo
IVideoFrameMetaInfo * metaInfo
Definition: AgoraMediaBase.h:1150
agora::media::base::VIDEO_CVPIXEL_NV12
@ VIDEO_CVPIXEL_NV12
Definition: AgoraMediaBase.h:560
agora::media::base::ExternalVideoFrame::cropRight
int cropRight
Definition: AgoraMediaBase.h:923
agora::media::CUSTOM_VIDEO_SOURCE
@ CUSTOM_VIDEO_SOURCE
Definition: AgoraMediaBase.h:275
agora::media::IAudioFrameObserverBase::getRecordAudioParams
virtual AudioParams getRecordAudioParams()=0
agora::media::RECORDER_REASON_CONFIG_CHANGED
@ RECORDER_REASON_CONFIG_CHANGED
Definition: AgoraMediaBase.h:1966
agora::media::base::ColorSpace::MATRIXID_RGB
@ MATRIXID_RGB
Definition: AgoraMediaBase.h:673
agora::media::base::VideoFrame::textureId
int textureId
Definition: AgoraMediaBase.h:1116
agora::media::base::ExternalVideoFrame::VIDEO_BUFFER_ARRAY
@ VIDEO_BUFFER_ARRAY
Definition: AgoraMediaBase.h:880
agora::rtc::ExtensionContext
Definition: AgoraMediaBase.h:41
agora::media::MediaRecorderConfiguration::videoSourceType
agora::rtc::VIDEO_SOURCE_TYPE videoSourceType
Definition: AgoraMediaBase.h:2026
agora::media::base::ExternalVideoFrame::VIDEO_BUFFER_TEXTURE
@ VIDEO_BUFFER_TEXTURE
Definition: AgoraMediaBase.h:884
agora::media::IAudioFrameObserverBase::AudioFrame::presentationMs
int64_t presentationMs
Definition: AgoraMediaBase.h:1322
agora::rtc::VIDEO_SOURCE_SCREEN_THIRD
@ VIDEO_SOURCE_SCREEN_THIRD
Definition: AgoraMediaBase.h:113
agora::media::base::VideoFrame::avsync_type
int avsync_type
Definition: AgoraMediaBase.h:1098
agora::media::base::ColorSpace::PRIMARYID_SMPTEST431
@ PRIMARYID_SMPTEST431
Definition: AgoraMediaBase.h:654
agora::media::base::ColorSpace::RangeID
RangeID
Definition: AgoraMediaBase.h:659
agora::media::base::Hdr10MetadataInfo::greenPrimaryY
uint16_t greenPrimaryY
Definition: AgoraMediaBase.h:745
agora
Definition: AgoraAtomicOps.h:21
agora::media::base::VideoFrame::matrix
float matrix[16]
Definition: AgoraMediaBase.h:1125
agora::media::base::ExternalVideoFrame::fenceObject
long long fenceObject
Definition: AgoraMediaBase.h:962
agora::media::base::ExternalVideoFrame::cropLeft
int cropLeft
Definition: AgoraMediaBase.h:913
agora::media::RTC_IMAGE_GIF_SOURCE
@ RTC_IMAGE_GIF_SOURCE
Definition: AgoraMediaBase.h:291
agora::rtc::track_id_t
unsigned int track_id_t
Definition: AgoraMediaBase.h:29
agora::media::IAudioFrameObserverBase::AudioFrame::samplesPerSec
int samplesPerSec
Definition: AgoraMediaBase.h:1292
agora::media::AUDIO_RECORDING_SOURCE
@ AUDIO_RECORDING_SOURCE
Definition: AgoraMediaBase.h:255
agora::rtc::ROUTE_AIRPLAY
@ ROUTE_AIRPLAY
Definition: AgoraMediaBase.h:200
agora::media::ContentInspectModule
Definition: AgoraMediaBase.h:338
agora::media::base::ALPHA_STITCH_RIGHT
@ ALPHA_STITCH_RIGHT
Definition: AgoraMediaBase.h:823
agora::media::base::VIDEO_PIXEL_I422
@ VIDEO_PIXEL_I422
Definition: AgoraMediaBase.h:576
agora::media::base::ColorSpace::TRANSFERID_SMPTEST2084
@ TRANSFERID_SMPTEST2084
Definition: AgoraMediaBase.h:705
agora::media::IAudioFrameObserverBase::AudioFrame::buffer
void * buffer
Definition: AgoraMediaBase.h:1299
agora::rtc::VIDEO_SOURCE_CUSTOM
@ VIDEO_SOURCE_CUSTOM
Definition: AgoraMediaBase.h:85
agora::media::CONTENT_INSPECT_TYPE
CONTENT_INSPECT_TYPE
Definition: AgoraMediaBase.h:318
agora::media::IAudioFrameObserverBase::onPlaybackAudioFrameBeforeMixing
virtual bool onPlaybackAudioFrameBeforeMixing(const char *channelId, base::user_id_t userId, AudioFrame &audioFrame)
Definition: AgoraMediaBase.h:1452
agora::rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE
RAW_AUDIO_FRAME_OP_MODE_TYPE
Definition: AgoraMediaBase.h:228
agora::rtc::ExtensionContext::ExtensionContext
ExtensionContext()
Definition: AgoraMediaBase.h:61
agora::media::IAudioSpectrumObserver::onRemoteAudioSpectrum
virtual bool onRemoteAudioSpectrum(const UserAudioSpectrumInfo *spectrums, unsigned int spectrumNumber)=0
agora::media::base::ColorSpace::TRANSFERID_GAMMA22
@ TRANSFERID_GAMMA22
Definition: AgoraMediaBase.h:693
agora::media::MediaRecorderConfiguration::fps
int fps
Definition: AgoraMediaBase.h:2014
agora::media::base::ColorSpace::MATRIXID_YCOCG
@ MATRIXID_YCOCG
Definition: AgoraMediaBase.h:680
agora::media::base::ColorSpace::TRANSFERID_LOG_SQRT
@ TRANSFERID_LOG_SQRT
Definition: AgoraMediaBase.h:699
agora::media::MediaRecorderStreamType
MediaRecorderStreamType
Definition: AgoraMediaBase.h:1907
agora::media::base::ColorSpace::TRANSFERID_SMPTE240M
@ TRANSFERID_SMPTE240M
Definition: AgoraMediaBase.h:696
agora::media::base::ColorSpace
Definition: AgoraMediaBase.h:642
agora::rtc::AUDIO_SOURCE_LOOPBACK_RECORDING
@ AUDIO_SOURCE_LOOPBACK_RECORDING
Definition: AgoraMediaBase.h:139
agora::media::IMediaRecorderObserver::onRecorderInfoUpdated
virtual void onRecorderInfoUpdated(const char *channelId, rtc::uid_t uid, const RecorderInfo &info)=0
agora::rtc::VIDEO_SOURCE_SPEECH_DRIVEN
@ VIDEO_SOURCE_SPEECH_DRIVEN
Definition: AgoraMediaBase.h:119
agora::rtc::VIDEO_SOURCE_REMOTE
@ VIDEO_SOURCE_REMOTE
Definition: AgoraMediaBase.h:100
agora::media::SECONDARY_SCREEN_SOURCE
@ SECONDARY_SCREEN_SOURCE
Definition: AgoraMediaBase.h:271
agora::media::base::ExternalVideoFrame
Definition: AgoraMediaBase.h:830
agora::media::base::ExternalVideoFrame::d3d11Texture2d
void * d3d11Texture2d
Definition: AgoraMediaBase.h:1002
agora::media::base::AudioEncodedFrameInfo::sendTs
uint64_t sendTs
Definition: AgoraMediaBase.h:407
agora::media::base::ExternalVideoFrame::ExternalVideoFrame
ExternalVideoFrame()
Definition: AgoraMediaBase.h:831
agora::media::ContentInspectConfig::moduleCount
int moduleCount
Definition: AgoraMediaBase.h:366
agora::media::base::IVideoFrameMetaInfo::KEY_FACE_CAPTURE
@ KEY_FACE_CAPTURE
Definition: AgoraMediaBase.h:636
agora::media::base::VIDEO_CVPIXEL_I420
@ VIDEO_CVPIXEL_I420
Definition: AgoraMediaBase.h:564
agora::media::base::Hdr10MetadataInfo::whitePointX
uint16_t whitePointX
Definition: AgoraMediaBase.h:757
agora::media::base::VideoFrame::type
VIDEO_PIXEL_FORMAT type
Definition: AgoraMediaBase.h:1051
agora::rtc::ROUTE_DEFAULT
@ ROUTE_DEFAULT
Definition: AgoraMediaBase.h:160
agora::media::RTC_IMAGE_JPEG_SOURCE
@ RTC_IMAGE_JPEG_SOURCE
Definition: AgoraMediaBase.h:287
agora::media::base::ALPHA_STITCH_MODE
ALPHA_STITCH_MODE
Definition: AgoraMediaBase.h:803
agora::media::base::AudioPcmFrame::capture_timestamp
int64_t capture_timestamp
Definition: AgoraMediaBase.h:438
agora::media::base::ExternalVideoFrame::timestamp
long long timestamp
Definition: AgoraMediaBase.h:941
agora::rtc::DEFAULT_CONNECTION_ID
static const unsigned int DEFAULT_CONNECTION_ID
Definition: AgoraMediaBase.h:34
agora::media::base::AudioPcmFrame::sample_rate_hz_
int sample_rate_hz_
Definition: AgoraMediaBase.h:444
agora::rtc::RAW_AUDIO_FRAME_OP_MODE_READ_WRITE
@ RAW_AUDIO_FRAME_OP_MODE_READ_WRITE
Definition: AgoraMediaBase.h:238
agora::media::IVideoFrameObserver::onTranscodedVideoFrame
virtual bool onTranscodedVideoFrame(VideoFrame &videoFrame)=0
agora::media::base::__deprecated
@ __deprecated
Definition: AgoraMediaBase.h:608
agora::media::RTC_IMAGE_PNG_SOURCE
@ RTC_IMAGE_PNG_SOURCE
Definition: AgoraMediaBase.h:283
agora::rtc::VIDEO_SOURCE_TRANSCODED
@ VIDEO_SOURCE_TRANSCODED
Definition: AgoraMediaBase.h:103
agora::media::MediaRecorderConfiguration::height
int height
Definition: AgoraMediaBase.h:2010
agora::media::IFaceInfoObserver::onFaceInfo
virtual bool onFaceInfo(const char *outFaceInfo)=0
agora::media::RECORDER_REASON_WRITE_FAILED
@ RECORDER_REASON_WRITE_FAILED
Definition: AgoraMediaBase.h:1953
agora::media::base::AUDIO_DUAL_MONO_MIX
@ AUDIO_DUAL_MONO_MIX
Definition: AgoraMediaBase.h:518
agora::rtc::AUDIO_SOURCE_CUSTOM
@ AUDIO_SOURCE_CUSTOM
Definition: AgoraMediaBase.h:133
agora::rtc::ROUTE_EARPIECE
@ ROUTE_EARPIECE
Definition: AgoraMediaBase.h:168
agora::media::base::PacketOptions::PacketOptions
PacketOptions()
Definition: AgoraMediaBase.h:396
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION
AUDIO_FRAME_POSITION
Definition: AgoraMediaBase.h:1346
agora::media::base::ExternalVideoFrame::height
int height
Definition: AgoraMediaBase.h:908
agora::media::base::VideoFrame::sharedContext
void * sharedContext
Definition: AgoraMediaBase.h:1112
agora::rtc::AUDIO_SOURCE_TYPE
AUDIO_SOURCE_TYPE
Definition: AgoraMediaBase.h:127
agora::media::RECORDER_REASON_OVER_MAX_DURATION
@ RECORDER_REASON_OVER_MAX_DURATION
Definition: AgoraMediaBase.h:1962
agora::media::base::ExternalVideoFrame::rotation
int rotation
Definition: AgoraMediaBase.h:933
agora::media::UserAudioSpectrumInfo::UserAudioSpectrumInfo
UserAudioSpectrumInfo(agora::rtc::uid_t uid, const float *data, int length)
Definition: AgoraMediaBase.h:1579
agora::media::base::ColorSpace::TRANSFERID_SMPTE170M
@ TRANSFERID_SMPTE170M
Definition: AgoraMediaBase.h:695
agora::rtc::ROUTE_USB
@ ROUTE_USB
Definition: AgoraMediaBase.h:188
agora::media::base::ColorSpace::TRANSFERID_IEC61966_2_4
@ TRANSFERID_IEC61966_2_4
Definition: AgoraMediaBase.h:700
agora::media::RecorderInfo
Definition: AgoraMediaBase.h:2074
agora::media::base::ExternalVideoFrame::metadataBuffer
uint8_t * metadataBuffer
Definition: AgoraMediaBase.h:971
agora::rtc::AudioParameters::frames_per_buffer
size_t frames_per_buffer
Definition: AgoraMediaBase.h:220
agora::media::base::VIDEO_CVPIXEL_BGRA
@ VIDEO_CVPIXEL_BGRA
Definition: AgoraMediaBase.h:568
agora::media::IVideoFrameObserver::onCaptureVideoFrame
virtual bool onCaptureVideoFrame(agora::rtc::VIDEO_SOURCE_TYPE sourceType, VideoFrame &videoFrame)=0
agora::media::base::Hdr10MetadataInfo::minMasteringLuminance
unsigned int minMasteringLuminance
Definition: AgoraMediaBase.h:769
agora::media::UserAudioSpectrumInfo::UserAudioSpectrumInfo
UserAudioSpectrumInfo()
Definition: AgoraMediaBase.h:1577
agora::media::base::ColorSpace::PRIMARYID_BT470M
@ PRIMARYID_BT470M
Definition: AgoraMediaBase.h:647
agora::media::UserAudioSpectrumInfo::spectrumData
struct AudioSpectrumData spectrumData
Definition: AgoraMediaBase.h:1575
agora::media::SECONDARY_CAMERA_SOURCE
@ SECONDARY_CAMERA_SOURCE
Definition: AgoraMediaBase.h:263
agora::media::IAudioFrameObserverBase::AudioParams::samples_per_call
int samples_per_call
Definition: AgoraMediaBase.h:1390
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_PLAYBACK
@ AUDIO_FRAME_POSITION_PLAYBACK
Definition: AgoraMediaBase.h:1350
agora::media::base::Hdr10MetadataInfo::validate
bool validate() const
Definition: AgoraMediaBase.h:793
agora::media::base::ColorSpace::TRANSFERID_IEC61966_2_1
@ TRANSFERID_IEC61966_2_1
Definition: AgoraMediaBase.h:702
agora::media::RecorderState
RecorderState
Definition: AgoraMediaBase.h:1926
agora::media::base::ExternalVideoFrame::alphaStitchMode
ALPHA_STITCH_MODE alphaStitchMode
Definition: AgoraMediaBase.h:997
agora::media::base::PacketOptions
Definition: AgoraMediaBase.h:389
agora::media::base::ColorSpace::MATRIXID_SMPTE170M
@ MATRIXID_SMPTE170M
Definition: AgoraMediaBase.h:678
agora::media::base::AudioPcmFrame::AudioPcmFrame
AudioPcmFrame(const AudioPcmFrame &src)
Definition: AgoraMediaBase.h:492
agora::media::base::PacketOptions::timestamp
uint32_t timestamp
Definition: AgoraMediaBase.h:393
agora::rtc::VIDEO_SOURCE_CAMERA_PRIMARY
@ VIDEO_SOURCE_CAMERA_PRIMARY
Definition: AgoraMediaBase.h:71
agora::rtc::VIDEO_SOURCE_RTC_IMAGE_JPEG
@ VIDEO_SOURCE_RTC_IMAGE_JPEG
Definition: AgoraMediaBase.h:94
agora::rtc::VIDEO_SOURCE_SCREEN_PRIMARY
@ VIDEO_SOURCE_SCREEN_PRIMARY
Definition: AgoraMediaBase.h:78
agora::media::base::RENDER_MODE_HIDDEN
@ RENDER_MODE_HIDDEN
Definition: AgoraMediaBase.h:597
agora::media::base::Hdr10MetadataInfo::maxMasteringLuminance
unsigned int maxMasteringLuminance
Definition: AgoraMediaBase.h:765
agora::rtc::VIDEO_SOURCE_CAMERA_FOURTH
@ VIDEO_SOURCE_CAMERA_FOURTH
Definition: AgoraMediaBase.h:110
agora::media::base::Hdr10MetadataInfo::whitePointY
uint16_t whitePointY
Definition: AgoraMediaBase.h:761
agora::media::base::Hdr10MetadataInfo::greenPrimaryX
uint16_t greenPrimaryX
Definition: AgoraMediaBase.h:741
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_TYPE
AUDIO_FRAME_TYPE
Definition: AgoraMediaBase.h:1260
agora::media::MediaRecorderConfiguration::channel_num
int channel_num
Definition: AgoraMediaBase.h:2022
agora::media::base::VideoFrame::yBuffer
uint8_t * yBuffer
Definition: AgoraMediaBase.h:1075
agora::media::base::VideoFrame::hdr10MetadataInfo
Hdr10MetadataInfo hdr10MetadataInfo
Definition: AgoraMediaBase.h:1155
agora::rtc::INVALID_TRACK_ID
static const unsigned int INVALID_TRACK_ID
Definition: AgoraMediaBase.h:33
agora::media::base::VideoFrame::colorSpace
ColorSpace colorSpace
Definition: AgoraMediaBase.h:1160
agora::media::base::AudioPcmFrame::bytes_per_sample
rtc::BYTES_PER_SAMPLE bytes_per_sample
Definition: AgoraMediaBase.h:450
agora::media::MediaRecorderContainerFormat
MediaRecorderContainerFormat
Definition: AgoraMediaBase.h:1896
agora::media::base::ColorSpace::primaries
PrimaryID primaries
Definition: AgoraMediaBase.h:710
agora::rtc::AUDIO_SOURCE_MIXED_STREAM
@ AUDIO_SOURCE_MIXED_STREAM
Definition: AgoraMediaBase.h:142
agora::media::UserAudioSpectrumInfo
Definition: AgoraMediaBase.h:1567
agora::media::base::Hdr10MetadataInfo::redPrimaryX
uint16_t redPrimaryX
Definition: AgoraMediaBase.h:733
agora::media::base::ColorSpace::TransferID
TransferID
Definition: AgoraMediaBase.h:689
agora::media::base::ColorSpace::TRANSFERID_UNSPECIFIED
@ TRANSFERID_UNSPECIFIED
Definition: AgoraMediaBase.h:692
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_EAR_MONITORING
@ AUDIO_FRAME_POSITION_EAR_MONITORING
Definition: AgoraMediaBase.h:1362
agora::rtc::ROUTE_BLUETOOTH_DEVICE_A2DP
@ ROUTE_BLUETOOTH_DEVICE_A2DP
Definition: AgoraMediaBase.h:204
agora::media::RecorderInfo::fileName
const char * fileName
Definition: AgoraMediaBase.h:2078
agora::rtc::RAW_AUDIO_FRAME_OP_MODE_READ_ONLY
@ RAW_AUDIO_FRAME_OP_MODE_READ_ONLY
Definition: AgoraMediaBase.h:232
agora::media::RECORDER_STATE_ERROR
@ RECORDER_STATE_ERROR
Definition: AgoraMediaBase.h:1930
agora::media::IAudioFrameObserverBase::~IAudioFrameObserverBase
virtual ~IAudioFrameObserverBase()
Definition: AgoraMediaBase.h:1406
agora::media::IVideoFrameObserver::onRenderVideoFrame
virtual bool onRenderVideoFrame(const char *channelId, rtc::uid_t remoteUid, VideoFrame &videoFrame)=0
agora::media::STREAM_TYPE_VIDEO
@ STREAM_TYPE_VIDEO
Definition: AgoraMediaBase.h:1915
agora::media::IVideoFrameObserver::PROCESS_MODE_READ_WRITE
@ PROCESS_MODE_READ_WRITE
Definition: AgoraMediaBase.h:1671
agora::media::IVideoFrameObserver::isExternal
virtual bool isExternal()
Definition: AgoraMediaBase.h:1874
agora::media::__deprecated
@ __deprecated
Definition: AgoraMediaBase.h:327
agora::media::CONTENT_INSPECT_IMAGE_MODERATION
@ CONTENT_INSPECT_IMAGE_MODERATION
Definition: AgoraMediaBase.h:335
agora::media::base::ALPHA_STITCH_BELOW
@ ALPHA_STITCH_BELOW
Definition: AgoraMediaBase.h:815
agora::media::base::ColorSpace::PRIMARYID_SMPTEST428
@ PRIMARYID_SMPTEST428
Definition: AgoraMediaBase.h:653
agora::media::ContentInspectModule::interval
unsigned int interval
Definition: AgoraMediaBase.h:346
agora::media::IVideoFrameObserver::getObservedFramePosition
virtual uint32_t getObservedFramePosition()
Definition: AgoraMediaBase.h:1863
agora::media::base::VideoFrame::yStride
int yStride
Definition: AgoraMediaBase.h:1063
agora::media::IAudioFrameObserverBase::AudioParams::AudioParams
AudioParams()
Definition: AgoraMediaBase.h:1392
agora::media::base::ExternalVideoFrame::alphaBuffer
uint8_t * alphaBuffer
Definition: AgoraMediaBase.h:982
agora::media::base::Hdr10MetadataInfo::bluePrimaryX
uint16_t bluePrimaryX
Definition: AgoraMediaBase.h:749
agora::media::base::PacketOptions::audioLevelIndication
uint8_t audioLevelIndication
Definition: AgoraMediaBase.h:395
agora::media::ContentInspectModule::type
CONTENT_INSPECT_TYPE type
Definition: AgoraMediaBase.h:342
agora::media::base::ColorSpace::RANGEID_INVALID
@ RANGEID_INVALID
Definition: AgoraMediaBase.h:662
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_NONE
@ AUDIO_FRAME_POSITION_NONE
Definition: AgoraMediaBase.h:1347
agora::media::MediaRecorderConfiguration::containerFormat
MediaRecorderContainerFormat containerFormat
Definition: AgoraMediaBase.h:1987
agora::media::base::ExternalVideoFrame::EGL_CONTEXT14
@ EGL_CONTEXT14
Definition: AgoraMediaBase.h:866
agora::media::base::AudioEncodedFrameInfo::AudioEncodedFrameInfo
AudioEncodedFrameInfo()
Definition: AgoraMediaBase.h:412
agora::media::base::ColorSpace::TRANSFERID_BT2020_10
@ TRANSFERID_BT2020_10
Definition: AgoraMediaBase.h:703
agora::rtc::VIDEO_SOURCE_TYPE
VIDEO_SOURCE_TYPE
Definition: AgoraMediaBase.h:68
agora::media::base::AUDIO_DUAL_MONO_L
@ AUDIO_DUAL_MONO_L
Definition: AgoraMediaBase.h:514
agora::media::IAudioPcmFrameSink::~IAudioPcmFrameSink
virtual ~IAudioPcmFrameSink()
Definition: AgoraMediaBase.h:1249
agora::media::RecorderInfo::RecorderInfo
RecorderInfo(const char *name, unsigned int dur, unsigned int size)
Definition: AgoraMediaBase.h:2089
agora::media::base::VIDEO_MODULE_POSITION
VIDEO_MODULE_POSITION
Definition: AgoraMediaBase.h:1202
agora::media::RecorderInfo::fileSize
unsigned int fileSize
Definition: AgoraMediaBase.h:2086
agora::media::ContentInspectConfig::operator=
ContentInspectConfig & operator=(const ContentInspectConfig &rth)
Definition: AgoraMediaBase.h:367
agora::media::CONTENT_INSPECT_NEUTRAL
@ CONTENT_INSPECT_NEUTRAL
Definition: AgoraMediaBase.h:313
agora::media::base::ExternalVideoFrame::cropTop
int cropTop
Definition: AgoraMediaBase.h:918
agora::media::base::ExternalVideoFrame::type
VIDEO_BUFFER_TYPE type
Definition: AgoraMediaBase.h:890
agora::media::IVideoFrameObserver::onPreEncodeVideoFrame
virtual bool onPreEncodeVideoFrame(agora::rtc::VIDEO_SOURCE_TYPE sourceType, VideoFrame &videoFrame)=0
agora::media::base::ExternalVideoFrame::textureSliceIndex
int textureSliceIndex
Definition: AgoraMediaBase.h:1007
agora::media::base::Hdr10MetadataInfo::bluePrimaryY
uint16_t bluePrimaryY
Definition: AgoraMediaBase.h:753
agora::media::base::RENDER_MODE_TYPE
RENDER_MODE_TYPE
Definition: AgoraMediaBase.h:592
agora::media::base::CAMERA_VIDEO_SOURCE_TYPE
CAMERA_VIDEO_SOURCE_TYPE
Definition: AgoraMediaBase.h:614
agora::media::IVideoFrameObserver::getRotationApplied
virtual bool getRotationApplied()
Definition: AgoraMediaBase.h:1821
agora::rtc::AUDIO_SOURCE_UNKNOWN
@ AUDIO_SOURCE_UNKNOWN
Definition: AgoraMediaBase.h:150
agora::media::IVideoFrameObserver::VideoFrame
media::base::VideoFrame VideoFrame
Definition: AgoraMediaBase.h:1654
agora::media::base::Hdr10MetadataInfo::maxContentLightLevel
uint16_t maxContentLightLevel
Definition: AgoraMediaBase.h:773
agora::media::SnapshotConfig
Definition: AgoraMediaBase.h:1213
agora::media::base::ColorSpace::MATRIXID_FCC
@ MATRIXID_FCC
Definition: AgoraMediaBase.h:676
agora::media::base::ColorSpace::MATRIXID_BT2020_NCL
@ MATRIXID_BT2020_NCL
Definition: AgoraMediaBase.h:681
agora::media::CONTENT_INSPECT_SUPERVISION
@ CONTENT_INSPECT_SUPERVISION
Definition: AgoraMediaBase.h:331
agora::media::base::VideoFrame::vBuffer
uint8_t * vBuffer
Definition: AgoraMediaBase.h:1083
agora::media::AudioSpectrumData::dataLength
int dataLength
Definition: AgoraMediaBase.h:1561
agora::media::base::ExternalVideoFrame::EGL_CONTEXT_TYPE
EGL_CONTEXT_TYPE
Definition: AgoraMediaBase.h:858
agora::media::AudioSpectrumData::AudioSpectrumData
AudioSpectrumData()
Definition: AgoraMediaBase.h:1563
agora::media::base::ColorSpace::TRANSFERID_LINEAR
@ TRANSFERID_LINEAR
Definition: AgoraMediaBase.h:697
agora::media::IAudioFrameObserverBase::onMixedAudioFrame
virtual bool onMixedAudioFrame(const char *channelId, AudioFrame &audioFrame)=0
agora::rtc::ROUTE_HEADSETNOMIC
@ ROUTE_HEADSETNOMIC
Definition: AgoraMediaBase.h:172
agora::media::RecorderInfo::RecorderInfo
RecorderInfo()
Definition: AgoraMediaBase.h:2088
agora::media::IAudioFrameObserverBase::AudioParams
Definition: AgoraMediaBase.h:1365
agora::media::base::ColorSpace::PRIMARYID_BT2020
@ PRIMARYID_BT2020
Definition: AgoraMediaBase.h:652
agora::media::base::AudioPcmFrame::num_channels_
size_t num_channels_
Definition: AgoraMediaBase.h:447
agora::rtc::VIDEO_SOURCE_RTC_IMAGE_GIF
@ VIDEO_SOURCE_RTC_IMAGE_GIF
Definition: AgoraMediaBase.h:97
agora::rtc::ExtensionContext::uid
uid_t uid
Definition: AgoraMediaBase.h:52
agora::media::RECORDER_STATE_START
@ RECORDER_STATE_START
Definition: AgoraMediaBase.h:1934
agora::media::IAudioFrameObserverBase::AudioFrame::avsync_type
int avsync_type
Definition: AgoraMediaBase.h:1315
agora::media::IAudioFrameObserverBase::getObservedAudioFramePosition
virtual int getObservedAudioFramePosition()=0
agora::media::MediaRecorderConfiguration
Definition: AgoraMediaBase.h:1973
agora::rtc::AUDIO_SOURCE_REMOTE_USER
@ AUDIO_SOURCE_REMOTE_USER
Definition: AgoraMediaBase.h:145
agora::rtc::VIDEO_SOURCE_CAMERA_THIRD
@ VIDEO_SOURCE_CAMERA_THIRD
Definition: AgoraMediaBase.h:107
agora::media::base::VideoFrame::metadata_buffer
uint8_t * metadata_buffer
Definition: AgoraMediaBase.h:1103
agora::rtc::ExtensionContext::isValid
bool isValid
Definition: AgoraMediaBase.h:47
agora::media::MediaRecorderConfiguration::streamType
MediaRecorderStreamType streamType
Definition: AgoraMediaBase.h:1991
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_BEFORE_MIXING
@ AUDIO_FRAME_POSITION_BEFORE_MIXING
Definition: AgoraMediaBase.h:1359
agora::media::base::VIDEO_PIXEL_DEFAULT
@ VIDEO_PIXEL_DEFAULT
Definition: AgoraMediaBase.h:528
agora::media::base::ColorSpace::matrix
MatrixID matrix
Definition: AgoraMediaBase.h:712
agora::media::STREAM_TYPE_BOTH
@ STREAM_TYPE_BOTH
Definition: AgoraMediaBase.h:1919
agora::media::CONTENT_INSPECT_SEXY
@ CONTENT_INSPECT_SEXY
Definition: AgoraMediaBase.h:314
agora::media::FORMAT_MP4
@ FORMAT_MP4
Definition: AgoraMediaBase.h:1900
agora::media::base::ColorSpace::PRIMARYID_BT470BG
@ PRIMARYID_BT470BG
Definition: AgoraMediaBase.h:648
agora::media::MediaRecorderConfiguration::storagePath
const char * storagePath
Definition: AgoraMediaBase.h:1982
agora::media::AudioSpectrumData
Definition: AgoraMediaBase.h:1553
agora::rtc::ROUTE_DISPLAYPORT
@ ROUTE_DISPLAYPORT
Definition: AgoraMediaBase.h:196
agora::media::base::VideoFrame::width
int width
Definition: AgoraMediaBase.h:1055
agora::media::RECORDER_REASON_NO_STREAM
@ RECORDER_REASON_NO_STREAM
Definition: AgoraMediaBase.h:1958
agora::media::RecorderInfo::durationMs
unsigned int durationMs
Definition: AgoraMediaBase.h:2082
agora::media::base::VideoFrame::renderTimeMs
int64_t renderTimeMs
Definition: AgoraMediaBase.h:1094
agora::media::base::AudioPcmFrame::samples_per_channel_
size_t samples_per_channel_
Definition: AgoraMediaBase.h:441
agora::media::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing
virtual bool onPlaybackAudioFrameBeforeMixing(const char *channelId, rtc::uid_t uid, AudioFrame &audioFrame)=0
agora::rtc::VIDEO_SOURCE_RTC_IMAGE_PNG
@ VIDEO_SOURCE_RTC_IMAGE_PNG
Definition: AgoraMediaBase.h:91
agora::media::base::ColorSpace::TRANSFERID_ARIB_STD_B67
@ TRANSFERID_ARIB_STD_B67
Definition: AgoraMediaBase.h:707
agora::media::base::ColorSpace::PRIMARYID_SMPTE240M
@ PRIMARYID_SMPTE240M
Definition: AgoraMediaBase.h:650
agora::media::IVideoFrameObserver::onMediaPlayerVideoFrame
virtual bool onMediaPlayerVideoFrame(VideoFrame &videoFrame, int mediaPlayerId)=0
agora::media::IAudioFrameObserverBase::AudioFrame::bytesPerSample
agora::rtc::BYTES_PER_SAMPLE bytesPerSample
Definition: AgoraMediaBase.h:1282
agora::media::IVideoFrameObserver::~IVideoFrameObserver
virtual ~IVideoFrameObserver()
Definition: AgoraMediaBase.h:1676
agora::media::base::ExternalVideoFrame::textureId
int textureId
Definition: AgoraMediaBase.h:957
agora::media::base::VideoFrame::pixelBuffer
void * pixelBuffer
Definition: AgoraMediaBase.h:1145
agora::media::IAudioSpectrumObserver::~IAudioSpectrumObserver
virtual ~IAudioSpectrumObserver()
Definition: AgoraMediaBase.h:1588
agora::media::IAudioFrameObserverBase::AudioFrame::type
AUDIO_FRAME_TYPE type
Definition: AgoraMediaBase.h:1274
agora::rtc::VIDEO_SOURCE_SCREEN_FOURTH
@ VIDEO_SOURCE_SCREEN_FOURTH
Definition: AgoraMediaBase.h:116
agora::media::IAudioFrameObserverBase::MAX_HANDLE_TIME_CNT
@ MAX_HANDLE_TIME_CNT
Definition: AgoraMediaBase.h:1266
agora::media::base::AUDIO_DUAL_MONO_R
@ AUDIO_DUAL_MONO_R
Definition: AgoraMediaBase.h:516
agora::media::IAudioPcmFrameSink::onFrame
virtual void onFrame(agora::media::base::AudioPcmFrame *frame)=0
agora::rtc::AUDIO_SOURCE_MICROPHONE
@ AUDIO_SOURCE_MICROPHONE
Definition: AgoraMediaBase.h:130
agora::media::base::AudioPcmFrame::is_stereo_
bool is_stereo_
Definition: AgoraMediaBase.h:458
agora::media::IVideoEncodedFrameObserver
Definition: AgoraMediaBase.h:1630
agora::media::IAudioFrameObserverBase::AudioFrame::samplesPerChannel
int samplesPerChannel
Definition: AgoraMediaBase.h:1278
agora::media::base::VIDEO_PIXEL_RGBA
@ VIDEO_PIXEL_RGBA
Definition: AgoraMediaBase.h:544
agora::media::CONTENT_INSPECT_PORN
@ CONTENT_INSPECT_PORN
Definition: AgoraMediaBase.h:315
agora::media::base::MEDIA_PLAYER_SOURCE_SIMPLE
@ MEDIA_PLAYER_SOURCE_SIMPLE
Definition: AgoraMediaBase.h:1199
agora::media::base::AUDIO_DUAL_MONO_STEREO
@ AUDIO_DUAL_MONO_STEREO
Definition: AgoraMediaBase.h:512
agora::media::EXTERNAL_VIDEO_SOURCE_TYPE
EXTERNAL_VIDEO_SOURCE_TYPE
Definition: AgoraMediaBase.h:1880
agora::rtc::TWO_BYTES_PER_SAMPLE
@ TWO_BYTES_PER_SAMPLE
Definition: AgoraMediaBase.h:214
agora::media::IVideoFrameObserver::getMirrorApplied
virtual bool getMirrorApplied()
Definition: AgoraMediaBase.h:1839
agora::media::base::ColorSpace::MATRIXID_BT2100_ICTCP
@ MATRIXID_BT2100_ICTCP
Definition: AgoraMediaBase.h:686
agora::media::IAudioSpectrumObserver::onLocalAudioSpectrum
virtual bool onLocalAudioSpectrum(const AudioSpectrumData &data)=0
agora::media::base::AudioEncodedFrameInfo
Definition: AgoraMediaBase.h:403
agora::media::base::ColorSpace::MATRIXID_UNSPECIFIED
@ MATRIXID_UNSPECIFIED
Definition: AgoraMediaBase.h:675
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_RECORD
@ AUDIO_FRAME_POSITION_RECORD
Definition: AgoraMediaBase.h:1353
agora::media::IFaceInfoObserver::~IFaceInfoObserver
virtual ~IFaceInfoObserver()
Definition: AgoraMediaBase.h:2066
agora::media::MediaRecorderConfiguration::width
int width
Definition: AgoraMediaBase.h:2006
agora::rtc::ROUTE_LOUDSPEAKER
@ ROUTE_LOUDSPEAKER
Definition: AgoraMediaBase.h:180
agora::media::base::VideoFrame::vStride
int vStride
Definition: AgoraMediaBase.h:1071
agora::media::ENCODED_VIDEO_FRAME
@ ENCODED_VIDEO_FRAME
Definition: AgoraMediaBase.h:1888
agora::rtc::video_track_id_t
unsigned int video_track_id_t
Definition: AgoraMediaBase.h:31
agora::media::IVideoEncodedFrameObserver::~IVideoEncodedFrameObserver
virtual ~IVideoEncodedFrameObserver()
Definition: AgoraMediaBase.h:1646
agora::media::base::ExternalVideoFrame::hdr10MetadataInfo
Hdr10MetadataInfo hdr10MetadataInfo
Definition: AgoraMediaBase.h:1012
agora::media::base::VIDEO_PIXEL_I420
@ VIDEO_PIXEL_I420
Definition: AgoraMediaBase.h:532
agora::media::base::POSITION_PRE_ENCODER
@ POSITION_PRE_ENCODER
Definition: AgoraMediaBase.h:1205
agora::media::ContentInspectConfig
Definition: AgoraMediaBase.h:354
agora::media::IAudioFrameObserverBase::AUDIO_FRAME_POSITION_MIXED
@ AUDIO_FRAME_POSITION_MIXED
Definition: AgoraMediaBase.h:1356
agora::media::base::ColorSpace::PRIMARYID_BT709
@ PRIMARYID_BT709
Definition: AgoraMediaBase.h:645
agora::rtc::uid_t
unsigned int uid_t
Definition: AgoraMediaBase.h:28
agora::media::base::ColorSpace::range
RangeID range
Definition: AgoraMediaBase.h:713
agora::media::base::AudioPcmFrame
Definition: AgoraMediaBase.h:418
agora::media::base::NO_ALPHA_STITCH
@ NO_ALPHA_STITCH
Definition: AgoraMediaBase.h:807
agora::media::base::ExternalVideoFrame::fillAlphaBuffer
bool fillAlphaBuffer
Definition: AgoraMediaBase.h:987
agora::media::base::VIDEO_CVPIXEL_P010
@ VIDEO_CVPIXEL_P010
Definition: AgoraMediaBase.h:572
agora::media::base::VIDEO_PIXEL_NV12
@ VIDEO_PIXEL_NV12
Definition: AgoraMediaBase.h:548
agora::media::MEDIA_SOURCE_TYPE
MEDIA_SOURCE_TYPE
Definition: AgoraMediaBase.h:247
agora::media::IAudioFrameObserverBase::AudioParams::sample_rate
int sample_rate
Definition: AgoraMediaBase.h:1374
agora::media::base::ColorSpace::MATRIXID_SMPTE240M
@ MATRIXID_SMPTE240M
Definition: AgoraMediaBase.h:679
agora::media::base::AUDIO_DUAL_MONO_MODE
AUDIO_DUAL_MONO_MODE
Definition: AgoraMediaBase.h:510
agora::media::ContentInspectModule::ContentInspectModule
ContentInspectModule()
Definition: AgoraMediaBase.h:347
agora::media::RecorderReasonCode
RecorderReasonCode
Definition: AgoraMediaBase.h:1945
agora::media::base::ColorSpace::TRANSFERID_SMPTEST428
@ TRANSFERID_SMPTEST428
Definition: AgoraMediaBase.h:706
agora::media::base::ColorSpace::PRIMARYID_UNSPECIFIED
@ PRIMARYID_UNSPECIFIED
Definition: AgoraMediaBase.h:646
agora::media::CONTENT_INSPECT_RESULT
CONTENT_INSPECT_RESULT
Definition: AgoraMediaBase.h:312
agora::rtc::ROUTE_SPEAKERPHONE
@ ROUTE_SPEAKERPHONE
Definition: AgoraMediaBase.h:176
agora::media::base::VideoFrame::uBuffer
uint8_t * uBuffer
Definition: AgoraMediaBase.h:1079
agora::media::IAudioFrameObserverBase::onPlaybackAudioFrame
virtual bool onPlaybackAudioFrame(const char *channelId, AudioFrame &audioFrame)=0
agora::media::base::ExternalVideoFrame::EGL_CONTEXT10
@ EGL_CONTEXT10
Definition: AgoraMediaBase.h:862
agora::media::base::VIDEO_TEXTURE_ID3D11TEXTURE2D
@ VIDEO_TEXTURE_ID3D11TEXTURE2D
Definition: AgoraMediaBase.h:581
agora::rtc::DUMMY_CONNECTION_ID
static const unsigned int DUMMY_CONNECTION_ID
Definition: AgoraMediaBase.h:35
agora::rtc::ROUTE_BLUETOOTH_DEVICE_HFP
@ ROUTE_BLUETOOTH_DEVICE_HFP
Definition: AgoraMediaBase.h:184
agora::media::base::ColorSpace::PRIMARYID_JEDECP22
@ PRIMARYID_JEDECP22
Definition: AgoraMediaBase.h:656
agora::media::base::IVideoFrameMetaInfo
Definition: AgoraMediaBase.h:633
agora::media::base::ALPHA_STITCH_UP
@ ALPHA_STITCH_UP
Definition: AgoraMediaBase.h:811
agora::media::base::ColorSpace::TRANSFERID_BT1361_ECG
@ TRANSFERID_BT1361_ECG
Definition: AgoraMediaBase.h:701
agora::media::UserAudioSpectrumInfo::uid
agora::rtc::uid_t uid
Definition: AgoraMediaBase.h:1571
agora::media::SnapshotConfig::position
media::base::VIDEO_MODULE_POSITION position
Definition: AgoraMediaBase.h:1231
agora::media::AUDIO_PLAYOUT_SOURCE
@ AUDIO_PLAYOUT_SOURCE
Definition: AgoraMediaBase.h:251
rtc
Definition: video_node_i.h:28
agora::rtc::ExtensionContext::extensionName
const char * extensionName
Definition: AgoraMediaBase.h:60
agora::media::IVideoFrameObserver::VIDEO_FRAME_PROCESS_MODE
VIDEO_FRAME_PROCESS_MODE
Definition: AgoraMediaBase.h:1658
agora::media::base::ColorSpace::RANGEID_DERIVED
@ RANGEID_DERIVED
Definition: AgoraMediaBase.h:668
agora::media::base::ExternalVideoFrame::format
VIDEO_PIXEL_FORMAT format
Definition: AgoraMediaBase.h:894
agora::media::MediaRecorderConfiguration::MediaRecorderConfiguration
MediaRecorderConfiguration()
Definition: AgoraMediaBase.h:2028
agora::media::base::ExternalVideoFrame::metadataSize
int metadataSize
Definition: AgoraMediaBase.h:976
agora::media::ContentInspectConfig::extraInfo
const char * extraInfo
Definition: AgoraMediaBase.h:355
agora::media::base::Hdr10MetadataInfo::maxFrameAverageLightLevel
uint16_t maxFrameAverageLightLevel
Definition: AgoraMediaBase.h:777
agora::media::base::ExternalVideoFrame::stride
int stride
Definition: AgoraMediaBase.h:904
agora::media::base::VIDEO_PIXEL_BGRA
@ VIDEO_PIXEL_BGRA
Definition: AgoraMediaBase.h:536
agora::media::REMOTE_VIDEO_SOURCE
@ REMOTE_VIDEO_SOURCE
Definition: AgoraMediaBase.h:295
agora::rtc::ROUTE_HDMI
@ ROUTE_HDMI
Definition: AgoraMediaBase.h:192
agora::media::base::ColorSpace::TRANSFERID_LOG
@ TRANSFERID_LOG
Definition: AgoraMediaBase.h:698
agora::rtc::AudioRoute
AudioRoute
Definition: AgoraMediaBase.h:156
agora::media::base::ExternalVideoFrame::eglType
EGL_CONTEXT_TYPE eglType
Definition: AgoraMediaBase.h:952
agora::media::base::VIDEO_PIXEL_I010
@ VIDEO_PIXEL_I010
Definition: AgoraMediaBase.h:586