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

For #1638, #307, add comments for audio codec

This commit is contained in:
winlin 2020-03-22 07:18:25 +08:00
parent 2757ec7973
commit e1fe2d1c1d
3 changed files with 3 additions and 0 deletions

View file

@ -384,6 +384,7 @@ srs_error_t SrsAudioRecode::initialize()
return err;
}
// TODO: FIXME: Rename to transcode.
srs_error_t SrsAudioRecode::recode(SrsSample *pkt, char **buf, int *buf_len, int &n)
{
srs_error_t err = srs_success;

View file

@ -402,6 +402,7 @@ srs_error_t SrsRtpOpusMuxer::packet_opus(SrsSharedPtrMessage* shared_frame, SrsS
stream->write_2bytes(sequence);
// timestamp
stream->write_4bytes(int32_t(timestamp));
// TODO: FIXME: Why 960? Need Refactoring?
timestamp += 960;
// ssrc
stream->write_4bytes(int32_t(kAudioSSRC));

View file

@ -85,6 +85,7 @@ private:
class SrsRtpOpusMuxer
{
private:
// TODO: FIXME: How to handle timestamp overflow?
uint32_t timestamp;
uint16_t sequence;
SrsAudioRecode* recoder;