Agora C++ API Reference for All Platforms
|
Inherits agora::RefCountInterface.
Inherited by agora::rtc::IRtmpConnectionEx.
Public Member Functions | |
~IRtmpConnection () | |
virtual int | connect (const char *url, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | disconnect (aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual RtmpConnectionInfo | getConnectionInfo ()=0 |
virtual IRtmpLocalUser * | getRtmpLocalUser ()=0 |
virtual int | registerObserver (IRtmpConnectionObserver *observer, void(*safeDeleter)(IRtmpConnectionObserver *)=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0 |
virtual int | unregisterObserver (IRtmpConnectionObserver *observer)=0 |
![]() | |
virtual void | AddRef () const =0 |
virtual RefCountReleaseStatus | Release () const =0 |
virtual bool | HasOneRef () const =0 |
Additional Inherited Members | |
![]() | |
virtual | ~RefCountInterface () |
The IRtmpConnection class.
With this class, an app can establish a connection to a RTMP server. Once connected, the app gets an RtmpUser object, which can publish media streams to the RTMP server.
Connecting to the server is done asynchronous, and apps can listen for the connection states or events with IRtmpConnectionObserver.
|
inline |
|
pure virtual |
Connects to a RTMP server.
When the method call succeeds, the RTMP connection state changes to STATE_CONNECTING(2).
Depending on the success or failure of the connection establishment, the RTMP connection will make a second state transition to either STATE_CONNECTED(3) or STATE_FAILED(5). You will also be notified with the either onConnected() or onDisconnected().
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. The URL address must not contain special characters, such as Chinese language characters. |
|
pure virtual |
Disconnects from the RTMP server.
A successful call of this method changes the connection state to STATE_DISCONNECTED(4). You will be notified with the callback onDisconnected.
|
pure virtual |
Gets the current connection information.
|
pure virtual |
Gets the IRtmpUser object.
|
pure virtual |
Registers an IRtmpConnectionObserver object.
observer | A pointer to the IRtmpConnectionObserver object. |
|
pure virtual |
Releases the registered IRtmpConnectionObserver object.
observer | The pointer to the IRtmpConnectionObserver object created by the registerObserver method. |