mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-29 06:12:22 +08:00
增加rtmp/rtsp对音频G711A,G711U的支持
This commit is contained in:
@@ -75,6 +75,9 @@ using namespace toolkit;
|
||||
#define FLV_CODEC_AAC 10
|
||||
#define FLV_CODEC_H264 7
|
||||
#define FLV_CODEC_H265 12
|
||||
#define FLV_CODEC_G711A 7
|
||||
#define FLV_CODEC_G711U 8
|
||||
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ bool RtmpDemuxer::inputRtmp(const RtmpPacket::Ptr &pkt) {
|
||||
|
||||
void RtmpDemuxer::makeVideoTrack(const AMFValue &videoCodec) {
|
||||
//生成Track对象
|
||||
_videoTrack = dynamic_pointer_cast<VideoTrack>(Factory::getTrackByAmf(videoCodec));
|
||||
_videoTrack = dynamic_pointer_cast<VideoTrack>(Factory::getVideoTrackByAmf(videoCodec));
|
||||
if (_videoTrack) {
|
||||
//生成rtmpCodec对象以便解码rtmp
|
||||
_videoRtmpDecoder = Factory::getRtmpCodecByTrack(_videoTrack);
|
||||
@@ -78,7 +78,7 @@ void RtmpDemuxer::makeVideoTrack(const AMFValue &videoCodec) {
|
||||
|
||||
void RtmpDemuxer::makeAudioTrack(const AMFValue &audioCodec) {
|
||||
//生成Track对象
|
||||
_audioTrack = dynamic_pointer_cast<AudioTrack>(Factory::getTrackByAmf(audioCodec));
|
||||
_audioTrack = dynamic_pointer_cast<AudioTrack>(Factory::getAudioTrackByAmf(audioCodec));
|
||||
if (_audioTrack) {
|
||||
//生成rtmpCodec对象以便解码rtmp
|
||||
_audioRtmpDecoder = Factory::getRtmpCodecByTrack(_audioTrack);
|
||||
|
||||
Reference in New Issue
Block a user