Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-07-15 10:59:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e50968f404311e613c43f1cec1b7a8abed8ff778
e50968f4
1 parent
a4d3283c
refine the hls codec, add comments.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
40 行增加
和
33 行删除
trunk/src/app/srs_app_avc_aac.hpp
trunk/src/app/srs_app_avc_aac.hpp
查看文件 @
e50968f
...
...
@@ -48,12 +48,12 @@ class SrsStream;
enum
SrsCodecAudioSampleRate
{
// set to the max value to reserved, for array map.
SrsCodecAudioSampleRateReserved
=
4
,
SrsCodecAudioSampleRateReserved
=
4
,
SrsCodecAudioSampleRate5512
=
0
,
SrsCodecAudioSampleRate11025
=
1
,
SrsCodecAudioSampleRate22050
=
2
,
SrsCodecAudioSampleRate44100
=
3
,
SrsCodecAudioSampleRate11025
=
1
,
SrsCodecAudioSampleRate22050
=
2
,
SrsCodecAudioSampleRate44100
=
3
,
};
/**
...
...
@@ -67,10 +67,10 @@ enum SrsCodecAudioSampleRate
enum
SrsCodecAudioSampleSize
{
// set to the max value to reserved, for array map.
SrsCodecAudioSampleSizeReserved
=
2
,
SrsCodecAudioSampleSizeReserved
=
2
,
SrsCodecAudioSampleSize8bit
=
0
,
SrsCodecAudioSampleSize16bit
=
1
,
SrsCodecAudioSampleSize16bit
=
1
,
};
/**
...
...
@@ -82,10 +82,10 @@ enum SrsCodecAudioSampleSize
enum
SrsCodecAudioSoundType
{
// set to the max value to reserved, for array map.
SrsCodecAudioSoundTypeReserved
=
2
,
SrsCodecAudioSoundTypeReserved
=
2
,
SrsCodecAudioSoundTypeMono
=
0
,
SrsCodecAudioSoundTypeStereo
=
1
,
SrsCodecAudioSoundTypeMono
=
0
,
SrsCodecAudioSoundTypeStereo
=
1
,
};
/**
...
...
@@ -134,6 +134,9 @@ public:
int
nb_sample_units
;
SrsCodecSampleUnit
sample_units
[
SRS_MAX_CODEC_SAMPLE
];
public
:
/**
* whether the sample is video sample which demux from video packet.
*/
bool
is_video
;
/**
* CompositionTime, video_file_format_spec_v10_1.pdf, page 78.
...
...
@@ -191,50 +194,54 @@ private:
SrsStream
*
stream
;
public
:
/**
*
video
specified
*
metadata
specified
*/
int
duration
;
int
width
;
int
height
;
int
frame_rate
;
// @see: SrsCodecVideo
int
video_codec_id
;
int
video_codec_id
;
int
video_data_rate
;
// in bps
// @see: SrsCod ecAudioType
int
audio_codec_id
;
int
audio_data_rate
;
// in bps
public:
/**
* video specified
*/
// profile_idc, H.264-AVC-ISO_IEC_14496-10.pdf, page 45.
u_int8_t
avc_profile
;
u_int8_t
avc_profile
;
// level_idc, H.264-AVC-ISO_IEC_14496-10.pdf, page 45.
u_int8_t
avc_level
;
int
width
;
int
height
;
int
video_data_rate
;
// in bps
int
frame_rate
;
int
duration
;
u_int8_t
avc_level
;
// lengthSizeMinusOne, H.264-AVC-ISO_IEC_14496-15.pdf, page 16
int8_t
NAL_unit_length
;
u_int16_t
sequenceParameterSetLength
;
char
*
sequenceParameterSetNALUnit
;
u_int16_t
pictureParameterSetLength
;
char
*
pictureParameterSetNALUnit
;
int8_t
NAL_unit_length
;
u_int16_t
sequenceParameterSetLength
;
char
*
sequenceParameterSetNALUnit
;
u_int16_t
pictureParameterSetLength
;
char
*
pictureParameterSetNALUnit
;
public
:
/**
* audio specified
*/
// @see: SrsCodecAudioType
int
audio_codec_id
;
int
audio_data_rate
;
// in bps
// 1.6.2.1 AudioSpecificConfig, in aac-mp4a-format-ISO_IEC_14496-3+2001.pdf, page 33.
// audioObjectType, value defines in 7.1 Profiles, aac-iso-13818-7.pdf, page 40.
u_int8_t
aac_profile
;
u_int8_t
aac_profile
;
// samplingFrequencyIndex
u_int8_t
aac_sample_rate
;
u_int8_t
aac_sample_rate
;
// channelConfiguration
u_int8_t
aac_channels
;
u_int8_t
aac_channels
;
public
:
// the avc extra data, the AVC sequence header,
// without the flv codec header,
// @see: ffmpeg, AVCodecContext::extradata
int
avc_extra_size
;
char
*
avc_extra_data
;
int
avc_extra_size
;
char
*
avc_extra_data
;
// the aac extra data, the AAC sequence header,
// without the flv codec header,
// @see: ffmpeg, AVCodecContext::extradata
int
aac_extra_size
;
char
*
aac_extra_data
;
int
aac_extra_size
;
char
*
aac_extra_data
;
public
:
SrsAvcAacCodec
();
virtual
~
SrsAvcAacCodec
();
...
...
请
注册
或
登录
后发表评论