mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-25 19:32:21 +08:00
rtsp/rtmp/mp4支持opus并整理代码
This commit is contained in:
@@ -58,6 +58,14 @@ uint8_t getAudioRtmpFlags(const Track::Ptr &track){
|
||||
switch (track->getCodecId()){
|
||||
case CodecG711A : flvAudioType = FLV_CODEC_G711A; break;
|
||||
case CodecG711U : flvAudioType = FLV_CODEC_G711U; break;
|
||||
case CodecOpus : {
|
||||
flvAudioType = FLV_CODEC_OPUS;
|
||||
//opus不通过flags获取音频相关信息
|
||||
iSampleRate = 44100;
|
||||
iSampleBit = 16;
|
||||
iChannel = 2;
|
||||
break;
|
||||
}
|
||||
case CodecAAC : {
|
||||
flvAudioType = FLV_CODEC_AAC;
|
||||
//aac不通过flags获取音频相关信息
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
||||
*
|
||||
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
|
||||
@@ -74,10 +74,12 @@ using namespace toolkit;
|
||||
|
||||
#define FLV_CODEC_AAC 10
|
||||
#define FLV_CODEC_H264 7
|
||||
//金山扩展: https://github.com/ksvc/FFmpeg/wiki
|
||||
#define FLV_CODEC_H265 12
|
||||
#define FLV_CODEC_G711A 7
|
||||
#define FLV_CODEC_G711U 8
|
||||
|
||||
//参考学而思网校: https://github.com/notedit/rtmp/commit/6e314ac5b29611431f8fb5468596b05815743c10
|
||||
#define FLV_CODEC_OPUS 13
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user