@@ -199,7 +199,7 @@ enum SrsAudioSampleRate
199
199
SrsAudioSampleRate22050 = 2 ,
200
200
SrsAudioSampleRate44100 = 3 ,
201
201
};
202
- std::string srs_codec_audio_samplerate2str (SrsAudioSampleRate v);
202
+ std::string srs_audio_sample_rate2str (SrsAudioSampleRate v);
203
203
204
204
/* *
205
205
* The frame type, for example, audio, video or data.
@@ -291,40 +291,42 @@ extern int srs_aac_srates[];
291
291
#define SrsMaxNbSamples 256
292
292
293
293
/* *
294
- * the FLV/RTMP supported audio sample size.
295
- * Size of each audio sample. This parameter only pertains to
296
- * uncompressed formats. Compressed formats always decode
297
- * to 16 bits internally.
298
- * 0 = 8-bit samples
299
- * 1 = 16-bit samples
300
- */
301
- enum SrsAudioSampleSize
294
+ * The audio sample size in bits.
295
+ * @doc video_file_format_spec_v10_1.pdf, page 76, E.4.2 Audio Tags
296
+ * Size of each audio sample. This parameter only pertains to
297
+ * uncompressed formats. Compressed formats always decode
298
+ * to 16 bits internally.
299
+ * 0 = 8-bit samples
300
+ * 1 = 16-bit samples
301
+ */
302
+ enum SrsAudioSampleBits
302
303
{
303
304
// set to the max value to reserved, for array map.
304
- SrsAudioSampleSizeReserved = 2 ,
305
- SrsAudioSampleSizeForbidden = 2 ,
305
+ SrsAudioSampleBitsReserved = 2 ,
306
+ SrsAudioSampleBitsForbidden = 2 ,
306
307
307
- SrsAudioSampleSize8bit = 0 ,
308
- SrsAudioSampleSize16bit = 1 ,
308
+ SrsAudioSampleBits8bit = 0 ,
309
+ SrsAudioSampleBits16bit = 1 ,
309
310
};
310
- std::string srs_audio_samplesize2str (SrsAudioSampleSize v);
311
+ std::string srs_audio_sample_bits2str (SrsAudioSampleBits v);
311
312
312
313
/* *
313
- * the FLV/RTMP supported audio sound type/channel.
314
- * Mono or stereo sound
315
- * 0 = Mono sound
316
- * 1 = Stereo sound
317
- */
318
- enum SrsAudioSoundType
314
+ * The audio channels.
315
+ * @doc video_file_format_spec_v10_1.pdf, page 77, E.4.2 Audio Tags
316
+ * Mono or stereo sound
317
+ * 0 = Mono sound
318
+ * 1 = Stereo sound
319
+ */
320
+ enum SrsAudioChannels
319
321
{
320
322
// set to the max value to reserved, for array map.
321
- SrsAudioSoundTypeReserved = 2 ,
322
- SrsAudioSoundTypeForbidden = 2 ,
323
+ SrsAudioChannelsReserved = 2 ,
324
+ SrsAudioChannelsForbidden = 2 ,
323
325
324
- SrsAudioSoundTypeMono = 0 ,
325
- SrsAudioSoundTypeStereo = 1 ,
326
+ SrsAudioChannelsMono = 0 ,
327
+ SrsAudioChannelsStereo = 1 ,
326
328
};
327
- std::string srs_audio_channels2str (SrsAudioSoundType v);
329
+ std::string srs_audio_channels2str (SrsAudioChannels v);
328
330
329
331
/* *
330
332
* Table 7-1 - NAL unit type codes, syntax element categories, and NAL unit type classes
@@ -518,8 +520,8 @@ class SrsAudioCodecConfig : public SrsCodecConfig
518
520
SrsAudioCodecId id;
519
521
// audio aac specified.
520
522
SrsAudioSampleRate sound_rate;
521
- SrsAudioSampleSize sound_size;
522
- SrsAudioSoundType sound_type;
523
+ SrsAudioSampleBits sound_size;
524
+ SrsAudioChannels sound_type;
523
525
int audio_data_rate; // in bps
524
526
public:
525
527
/* *
0 commit comments