1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #307, package opus when send it.

This commit is contained in:
winlin 2020-04-11 17:52:14 +08:00
parent 1f2db4d746
commit 3cccef327c
7 changed files with 90 additions and 49 deletions

View file

@ -358,6 +358,12 @@ public:
public:
#ifdef SRS_AUTO_RTC
virtual void set_rtp_packets(const std::vector<SrsRtpSharedPacket*>& pkts);
// Set extra samples, for example, when we transcode an AAC audio packet to OPUS,
// we may get more than one OPUS packets, we set these OPUS packets in extra payloads.
void set_extra_payloads(SrsSample* payloads, int nn_payloads);
// Get the extra payloads and the number of it.
int nn_extra_payloads() { return ptr->nn_extra_payloads; }
SrsSample* extra_payloads() { return ptr->extra_payloads; }
#endif
};