Agora C++ API Reference for All Platforms

media_node_factory_i.h
1 //
2 // Agora Media SDK
3 //
4 // Created by Sting Feng in 2015-05.
5 // Copyright (c) 2015 Agora IO. All rights reserved.
6 //
7 #pragma once
8
9 #include "AgoraRefPtr.h"
10 #include "IAgoraRtcEngine.h"
11
12 #include "NGIAgoraMediaNodeFactory.h"
13 // #include "engine_adapter/audio/audio_node_interface.h"
14
15 #include "video_node_i.h"
16 #include "screen_capture_i.h"
17
18 namespace agora {
19 namespace rtc {
20
21 class IMediaNodeFactoryEx : public IMediaNodeFactory {
22 public:
23 virtual ~IMediaNodeFactoryEx() {}
24
27 virtual agora_refptr<IVideoFrameAdapter> createVideoFrameAdapter() = 0;
28
40 virtual agora_refptr<rtc::IObservableVideoSink> createObservableVideoSink(
41 media::IVideoFrameObserver* observer, VideoTrackInfo trackInfo) = 0;
42
55 virtual agora_refptr<rtc::IObservableVideoFilter> createObservableVideoFilter(
56 media::IVideoFrameObserver* observer, VideoTrackInfo trackInfo) = 0;
57 virtual agora_refptr<ICameraCapturerEx> createCameraCapturerLLApiInternal() = 0;
58 #if !(defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE))
59 virtual agora_refptr<IScreenCapturerEx> createScreenCapturerLLApiInternal() = 0;
60 #endif
61 virtual agora_refptr<IVideoMixerSourceEx> createVideoMixerLLApiInternal() = 0;
62 virtual agora_refptr<IVideoFrameTransceiverEx> createVideoFrameTransceiverLLApiInternal() = 0;
63 virtual agora_refptr<IVideoFrameSenderEx> createVideoFrameSenderLLApiInternal() = 0;
64 virtual agora::agora_refptr<agora::rtc::IVideoEncodedImageSenderEx>
65 createVideoEncodedImageSenderLLApiInternal() = 0;
66 virtual agora_refptr<IVideoRenderer> createVideoRendererLLApiInternal() = 0;
67 virtual agora_refptr<IAudioFilter> createAudioFilterLLApiInternal(const char* provider_name,
68 const char* extension_name) = 0;
69 virtual agora_refptr<IVideoFilter> createVideoFilterLLApiInternal(const char* provider_name,
70 const char* extension_name) = 0;
71 virtual agora_refptr<IVideoSinkBase> createVideoSinkLLApiInternal(const char* provider_name,
72 const char* extension_name) = 0;
73 virtual agora_refptr<IAudioPcmDataSender> createAudioPcmDataSenderLLApiInternal() = 0;
74 virtual agora_refptr<IAudioEncodedFrameSender> createAudioEncodedFrameSenderLLApiInternal() = 0;
75 virtual agora_refptr<rtc::IMediaPlayerSource> createMediaPlayerSourceLLApiInternal(
76 media::base::MEDIA_PLAYER_SOURCE_TYPE type) = 0;
77 virtual agora_refptr<rtc::IMediaStreamingSource> createMediaStreamingSourceLLApiInternal() = 0;
78 virtual agora_refptr<IMediaPacketSender> createMediaPacketSenderLLApiInternal() = 0;
79 virtual agora_refptr<IMediaRecorder2> createMediaRecorderLLApiInternal() = 0;
80 #if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
81 virtual agora_refptr<IScreenCapturerEx2> createScreenCapturer2LLApiInternal(
82 const char* provider_name, const char* extension_name) = 0;
83 #else
84 virtual agora_refptr<IScreenCapturerEx> createScreenCapturerLLApiInternal(
85 const char* provider_name, const char* extension_name) = 0;
86 #endif
87 };
88
89 class IMediaPacketCallback {
90 public:
91 virtual ~IMediaPacketCallback() {}
92
93 virtual void OnMediaPacket(const uint8_t* packet, size_t length,
94 const media::base::PacketOptions& options) = 0;
95 };
96
97 class IMediaPacketSenderEx : public IMediaPacketSender {
98 public:
99 virtual ~IMediaPacketSenderEx() {}
100
101 virtual void RegisterMediaPacketCallback(IMediaPacketCallback* dataCallback) = 0;
102 virtual void UnregisterMediaPacketCallback() = 0;
103 };
104
105 class IMediaControlPacketCallback {
106 public:
107 virtual ~IMediaControlPacketCallback() {}
108
109 virtual void OnPeerMediaControlPacket(user_id_t userId, const uint8_t* packet, size_t length) = 0;
110 virtual void OnBroadcastMediaControlPacket(const uint8_t* packet, size_t length) = 0;
111 };
112
113 class IMediaControlPacketSenderEx : public IMediaControlPacketSender {
114 public:
115 virtual ~IMediaControlPacketSenderEx() {}
116
117 virtual void RegisterMediaControlPacketCallback(
118 IMediaControlPacketCallback* ctrlDataCallback) = 0;
119 virtual void UnregisterMediaControlPacketCallback() = 0;
120 virtual int sendBroadcastMediaControlPacketLLApiInternal(const uint8_t* packet,
121 size_t length) = 0;
122 };
123
124 } // namespace rtc
125 } // namespace agora
agora::rtc::IMediaNodeFactoryEx::createObservableVideoFilter
virtual agora_refptr< rtc::IObservableVideoFilter > createObservableVideoFilter(media::IVideoFrameObserver *observer, VideoTrackInfo trackInfo)=0
agora::rtc::IMediaControlPacketSenderEx::RegisterMediaControlPacketCallback
virtual void RegisterMediaControlPacketCallback(IMediaControlPacketCallback *ctrlDataCallback)=0
agora::rtc::IMediaNodeFactoryEx::createScreenCapturer2LLApiInternal
virtual agora_refptr< IScreenCapturerEx2 > createScreenCapturer2LLApiInternal(const char *provider_name, const char *extension_name)=0
agora::rtc::IMediaNodeFactoryEx::createAudioEncodedFrameSenderLLApiInternal
virtual agora_refptr< IAudioEncodedFrameSender > createAudioEncodedFrameSenderLLApiInternal()=0
agora::rtc::IMediaNodeFactoryEx::createMediaStreamingSourceLLApiInternal
virtual agora_refptr< rtc::IMediaStreamingSource > createMediaStreamingSourceLLApiInternal()=0
agora::rtc::IMediaControlPacketCallback::OnBroadcastMediaControlPacket
virtual void OnBroadcastMediaControlPacket(const uint8_t *packet, size_t length)=0
agora::media::base::MEDIA_PLAYER_SOURCE_TYPE
MEDIA_PLAYER_SOURCE_TYPE
Definition: AgoraMediaBase.h:1122
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::rtc::IMediaNodeFactoryEx::createScreenCapturerLLApiInternal
virtual agora_refptr< IScreenCapturerEx > createScreenCapturerLLApiInternal()=0
agora::rtc::IMediaPacketSenderEx::RegisterMediaPacketCallback
virtual void RegisterMediaPacketCallback(IMediaPacketCallback *dataCallback)=0
agora::media::IVideoFrameObserver
Definition: AgoraMediaBase.h:1664
agora::user_id_t
const char * user_id_t
Definition: AgoraBase.h:813
agora::rtc::IMediaNodeFactoryEx::createMediaPacketSenderLLApiInternal
virtual agora_refptr< IMediaPacketSender > createMediaPacketSenderLLApiInternal()=0
agora::rtc::IMediaControlPacketSenderEx::UnregisterMediaControlPacketCallback
virtual void UnregisterMediaControlPacketCallback()=0
agora::rtc::IMediaNodeFactoryEx::createCameraCapturerLLApiInternal
virtual agora_refptr< ICameraCapturerEx > createCameraCapturerLLApiInternal()=0
agora::rtc::IMediaControlPacketSenderEx::sendBroadcastMediaControlPacketLLApiInternal
virtual int sendBroadcastMediaControlPacketLLApiInternal(const uint8_t *packet, size_t length)=0
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IMediaPacketSenderEx::UnregisterMediaPacketCallback
virtual void UnregisterMediaPacketCallback()=0
agora::rtc::IMediaNodeFactoryEx::createVideoSinkLLApiInternal
virtual agora_refptr< IVideoSinkBase > createVideoSinkLLApiInternal(const char *provider_name, const char *extension_name)=0
agora::rtc::IMediaPacketSender
Definition: NGIAgoraMediaNode.h:649
agora::rtc::IMediaControlPacketCallback::OnPeerMediaControlPacket
virtual void OnPeerMediaControlPacket(user_id_t userId, const uint8_t *packet, size_t length)=0
agora::rtc::IMediaPacketCallback::~IMediaPacketCallback
virtual ~IMediaPacketCallback()
Definition: media_node_factory_i.h:91
agora::rtc::IMediaNodeFactoryEx::~IMediaNodeFactoryEx
virtual ~IMediaNodeFactoryEx()
Definition: media_node_factory_i.h:23
agora::rtc::IMediaNodeFactoryEx::createAudioFilterLLApiInternal
virtual agora_refptr< IAudioFilter > createAudioFilterLLApiInternal(const char *provider_name, const char *extension_name)=0
agora::rtc::IMediaNodeFactoryEx::createMediaRecorderLLApiInternal
virtual agora_refptr< IMediaRecorder2 > createMediaRecorderLLApiInternal()=0
agora::rtc::IMediaNodeFactoryEx::createVideoFilterLLApiInternal
virtual agora_refptr< IVideoFilter > createVideoFilterLLApiInternal(const char *provider_name, const char *extension_name)=0
agora::rtc::IMediaNodeFactoryEx::createObservableVideoSink
virtual agora_refptr< rtc::IObservableVideoSink > createObservableVideoSink(media::IVideoFrameObserver *observer, VideoTrackInfo trackInfo)=0
agora::rtc::IMediaNodeFactory
Definition: NGIAgoraMediaNodeFactory.h:37
agora::rtc::IMediaNodeFactoryEx::createVideoFrameAdapter
virtual agora_refptr< IVideoFrameAdapter > createVideoFrameAdapter()=0
agora::rtc::IMediaPacketSenderEx::~IMediaPacketSenderEx
virtual ~IMediaPacketSenderEx()
Definition: media_node_factory_i.h:99
agora::media::base::PacketOptions
Definition: AgoraMediaBase.h:322
agora::rtc::IMediaNodeFactoryEx::createScreenCapturerLLApiInternal
virtual agora_refptr< IScreenCapturerEx > createScreenCapturerLLApiInternal(const char *provider_name, const char *extension_name)=0
agora::rtc::IMediaControlPacketCallback
Definition: media_node_factory_i.h:105
agora::rtc::IMediaControlPacketSenderEx::~IMediaControlPacketSenderEx
virtual ~IMediaControlPacketSenderEx()
Definition: media_node_factory_i.h:115
agora::rtc::IMediaPacketSenderEx
Definition: media_node_factory_i.h:97
agora::rtc::IMediaNodeFactoryEx::createAudioPcmDataSenderLLApiInternal
virtual agora_refptr< IAudioPcmDataSender > createAudioPcmDataSenderLLApiInternal()=0
agora::rtc::IMediaPacketCallback::OnMediaPacket
virtual void OnMediaPacket(const uint8_t *packet, size_t length, const media::base::PacketOptions &options)=0
agora::rtc::IMediaNodeFactoryEx::createVideoFrameTransceiverLLApiInternal
virtual agora_refptr< IVideoFrameTransceiverEx > createVideoFrameTransceiverLLApiInternal()=0
agora::rtc::IMediaNodeFactoryEx::createVideoEncodedImageSenderLLApiInternal
virtual agora::agora_refptr< agora::rtc::IVideoEncodedImageSenderEx > createVideoEncodedImageSenderLLApiInternal()=0
agora::rtc::IMediaControlPacketSenderEx
Definition: media_node_factory_i.h:113
agora::rtc::IMediaControlPacketSender
Definition: NGIAgoraMediaNode.h:675
agora::rtc::IMediaNodeFactoryEx::createMediaPlayerSourceLLApiInternal
virtual agora_refptr< rtc::IMediaPlayerSource > createMediaPlayerSourceLLApiInternal(media::base::MEDIA_PLAYER_SOURCE_TYPE type)=0
agora::rtc::VideoTrackInfo
Definition: AgoraBase.h:3326
agora::rtc::IMediaNodeFactoryEx::createVideoMixerLLApiInternal
virtual agora_refptr< IVideoMixerSourceEx > createVideoMixerLLApiInternal()=0
agora::rtc::IMediaPacketCallback
Definition: media_node_factory_i.h:89
agora::rtc::IMediaNodeFactoryEx
Definition: media_node_factory_i.h:21
rtc
Definition: video_node_i.h:28
agora::rtc::IMediaNodeFactoryEx::createVideoFrameSenderLLApiInternal
virtual agora_refptr< IVideoFrameSenderEx > createVideoFrameSenderLLApiInternal()=0
agora::rtc::IMediaNodeFactoryEx::createVideoRendererLLApiInternal
virtual agora_refptr< IVideoRenderer > createVideoRendererLLApiInternal()=0
agora::rtc::IMediaControlPacketCallback::~IMediaControlPacketCallback
virtual ~IMediaControlPacketCallback()
Definition: media_node_factory_i.h:107