mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #299, refine audio codec object name
This commit is contained in:
parent
caf69f193d
commit
d612a21bad
9 changed files with 66 additions and 64 deletions
|
|
@ -536,8 +536,8 @@ int SrsDvrMp4Segmenter::encode_audio(SrsSharedPtrMessage* audio)
|
|||
uint8_t v = buffer->read_1bytes();
|
||||
SrsAudioCodecId sound_format = (SrsAudioCodecId)((v >> 4) & 0x0f);
|
||||
SrsAudioSampleRate sound_rate = (SrsAudioSampleRate)((v >> 2) & 0x03);
|
||||
SrsAudioSampleSize sound_size = (SrsAudioSampleSize)((v >> 1) & 0x01);
|
||||
SrsAudioSoundType channels = (SrsAudioSoundType)(v&0x01);
|
||||
SrsAudioSampleBits sound_size = (SrsAudioSampleBits)((v >> 1) & 0x01);
|
||||
SrsAudioChannels channels = (SrsAudioChannels)(v&0x01);
|
||||
|
||||
uint16_t ct = 0x00;
|
||||
if (sound_format == SrsAudioCodecIdAAC) {
|
||||
|
|
|
|||
|
|
@ -521,8 +521,8 @@ int SrsRtspConn::write_sequence_header()
|
|||
SrsAudioCodecConfig* dec = format->acodec;
|
||||
|
||||
acodec->sound_format = SrsAudioCodecIdAAC;
|
||||
acodec->sound_type = (dec->aac_channels == 2)? SrsAudioSoundTypeStereo : SrsAudioSoundTypeMono;
|
||||
acodec->sound_size = SrsAudioSampleSize16bit;
|
||||
acodec->sound_type = (dec->aac_channels == 2)? SrsAudioChannelsStereo : SrsAudioChannelsMono;
|
||||
acodec->sound_size = SrsAudioSampleBits16bit;
|
||||
acodec->aac_packet_type = 0;
|
||||
|
||||
static int srs_aac_srates[] = {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ SrsStatisticStream::SrsStatisticStream()
|
|||
has_audio = false;
|
||||
acodec = SrsAudioCodecIdReserved1;
|
||||
asample_rate = SrsAudioSampleRateReserved;
|
||||
asound_type = SrsAudioSoundTypeReserved;
|
||||
asound_type = SrsAudioChannelsReserved;
|
||||
aac_object = SrsAacObjectTypeReserved;
|
||||
width = 0;
|
||||
height = 0;
|
||||
|
|
@ -329,7 +329,7 @@ int SrsStatistic::on_video_info(SrsRequest* req,
|
|||
}
|
||||
|
||||
int SrsStatistic::on_audio_info(SrsRequest* req,
|
||||
SrsAudioCodecId acodec, SrsAudioSampleRate asample_rate, SrsAudioSoundType asound_type,
|
||||
SrsAudioCodecId acodec, SrsAudioSampleRate asample_rate, SrsAudioChannels asound_type,
|
||||
SrsAacObjectType aac_object
|
||||
) {
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public:
|
|||
bool has_audio;
|
||||
SrsAudioCodecId acodec;
|
||||
SrsAudioSampleRate asample_rate;
|
||||
SrsAudioSoundType asound_type;
|
||||
SrsAudioChannels asound_type;
|
||||
/**
|
||||
* audio specified
|
||||
* audioObjectType, in 1.6.2.1 AudioSpecificConfig, page 33,
|
||||
|
|
@ -177,7 +177,7 @@ public:
|
|||
* when got audio info for stream.
|
||||
*/
|
||||
virtual int on_audio_info(SrsRequest* req,
|
||||
SrsAudioCodecId acodec, SrsAudioSampleRate asample_rate, SrsAudioSoundType asound_type,
|
||||
SrsAudioCodecId acodec, SrsAudioSampleRate asample_rate, SrsAudioChannels asound_type,
|
||||
SrsAacObjectType aac_object
|
||||
);
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue