The definition of the IPacketObserver struct.
◆ ~IPacketObserver()
◆ onSendAudioPacket()
virtual bool onSendAudioPacket |
( |
Packet & |
packet | ) |
|
|
pure virtual |
Occurs when the SDK is ready to send the audio packet.
- Parameters
-
packet | The audio packet to be sent: Packet. |
- Returns
- Whether to send the audio packet:
- true: Send the packet.
- false: Do not send the packet, in which case the audio packet will be discarded.
◆ onSendVideoPacket()
virtual bool onSendVideoPacket |
( |
Packet & |
packet | ) |
|
|
pure virtual |
Occurs when the SDK is ready to send the video packet.
- Parameters
-
packet | The video packet to be sent: Packet. |
- Returns
- Whether to send the video packet:
- true: Send the packet.
- false: Do not send the packet, in which case the audio packet will be discarded.
◆ onReceiveAudioPacket()
virtual bool onReceiveAudioPacket |
( |
Packet & |
packet | ) |
|
|
pure virtual |
Occurs when the audio packet is received.
- Parameters
-
packet | The received audio packet: Packet. |
- Returns
- Whether to process the audio packet:
- true: Process the packet.
- false: Do not process the packet, in which case the audio packet will be discarded.
◆ onReceiveVideoPacket()
virtual bool onReceiveVideoPacket |
( |
Packet & |
packet | ) |
|
|
pure virtual |
Occurs when the video packet is received.
- Parameters
-
packet | The received video packet: Packet. |
- Returns
- Whether to process the audio packet:
- true: Process the packet.
- false: Do not process the packet, in which case the video packet will be discarded.