The PublisherListener struct for the Publisher class. It adds the publishing event on top of the Client listener You must inherit this class and set a listener with set_listener to be able to receive events from the publisher.
More...
#include <publisher.h>
|
virtual void | on_publishing ()=0 |
| on_publishing is called when a peerconnection has been established with Millicast and the media exchange has started.
|
|
virtual void | on_publishing_error (const std::string &reason)=0 |
| Called when the was an error while establishing the peerconnection.
|
|
virtual void | on_active ()=0 |
| This event is called when the first viewer starts viewing the stream.
|
|
virtual void | on_inactive ()=0 |
| This event is called when the last viewer stops viewing the stream.
|
|
virtual void | on_transformable_frame (uint32_t ssrc, uint32_t timestamp, std::vector< uint8_t > &data) |
| Called after a frame has been encoded if you need to add data to this frame before the frame is being passed to the RTP packetizer.
|
|
virtual void | on_connected ()=0 |
| on_connected is called when the WebSocket connection to Millicast is opened
|
|
virtual void | on_disconnected ()=0 |
| on_disconnected is called when the WebSocket connection to Millicast is closed. If this was an unintended disconnect, a reconnect attempt will happen automatically by default. To turn off the automatic reconnect, set {Option::auto_reconnect} to false.
|
|
virtual void | on_connection_error (int status, const std::string &reason)=0 |
| on_connection_error is called when the attempt to connect to Millicast failed.
|
|
virtual void | on_signaling_error (const std::string &message)=0 |
| Called when millicast sends back an error message in response to a websocket command.
|
|
virtual void | on_stats_report (std::unique_ptr< StatsReport >) |
| on_stats_report is called when a new rtc stats report has been collected.
|
|
virtual void | on_viewer_count (int count)=0 |
| Called when a new viewer join the stream or when a viewer quit the stream.
|
|
virtual | ~ClientListener ()=default |
|
The PublisherListener struct for the Publisher class. It adds the publishing event on top of the Client listener You must inherit this class and set a listener with set_listener to be able to receive events from the publisher.
◆ on_active()
virtual void millicast::PublisherListener::on_active |
( |
| ) |
|
|
pure virtual |
This event is called when the first viewer starts viewing the stream.
◆ on_inactive()
virtual void millicast::PublisherListener::on_inactive |
( |
| ) |
|
|
pure virtual |
This event is called when the last viewer stops viewing the stream.
◆ on_publishing()
virtual void millicast::PublisherListener::on_publishing |
( |
| ) |
|
|
pure virtual |
on_publishing is called when a peerconnection has been established with Millicast and the media exchange has started.
◆ on_publishing_error()
virtual void millicast::PublisherListener::on_publishing_error |
( |
const std::string & |
reason | ) |
|
|
pure virtual |
Called when the was an error while establishing the peerconnection.
- Parameters
-
reason | The reason of the error |
◆ on_transformable_frame()
virtual void millicast::PublisherListener::on_transformable_frame |
( |
uint32_t |
ssrc, |
|
|
uint32_t |
timestamp, |
|
|
std::vector< uint8_t > & |
data |
|
) |
| |
|
inlinevirtual |
Called after a frame has been encoded if you need to add data to this frame before the frame is being passed to the RTP packetizer.
- Parameters
-
ssrc | Synchronization source of the frame |
timestamp | Timestamp of the frame |
data | Empty vector to be filled with user data that will be added to the end of the frame. |
The documentation for this struct was generated from the following file: