mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-04 09:47:33 +08:00
时间戳统一使用毫秒
This commit is contained in:
@@ -184,12 +184,12 @@ RtpCodec::Ptr Factory::getRtpEncoderById(CodecId codecId,
|
||||
}
|
||||
}
|
||||
|
||||
RtpCodec::Ptr Factory::getRtpDecoderById(CodecId codecId, uint32_t ui32SampleRate) {
|
||||
RtpCodec::Ptr Factory::getRtpDecoderById(CodecId codecId) {
|
||||
switch (codecId){
|
||||
case CodecH264:
|
||||
return std::make_shared<H264RtpDecoder>();
|
||||
case CodecAAC:
|
||||
return std::make_shared<AACRtpDecoder>(ui32SampleRate);
|
||||
return std::make_shared<AACRtpDecoder>();
|
||||
default:
|
||||
WarnL << "暂不支持该CodecId:" << codecId;
|
||||
return nullptr;
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
* @param ui32SampleRate
|
||||
* @return
|
||||
*/
|
||||
static RtpCodec::Ptr getRtpDecoderById(CodecId codecId, uint32_t ui32SampleRate);
|
||||
static RtpCodec::Ptr getRtpDecoderById(CodecId codecId);
|
||||
|
||||
|
||||
////////////////////////////////rtmp相关//////////////////////////////////
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
class MultiMediaSourceMuxer {
|
||||
public:
|
||||
typedef std::shared_ptr<MultiMediaSourceMuxer> Ptr;
|
||||
|
||||
MultiMediaSourceMuxer(const string &vhost,
|
||||
const string &strApp,
|
||||
const string &strId,
|
||||
@@ -68,6 +70,18 @@ public:
|
||||
_rtmp->setListener(listener);
|
||||
_rtsp->setListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回总的消费者个数
|
||||
* @return
|
||||
*/
|
||||
int readerCount() const{
|
||||
return _rtsp->readerCount() + _rtmp->readerCount();
|
||||
}
|
||||
|
||||
void updateTimeStamp(uint32_t stamp){
|
||||
_rtsp->updateTimeStamp(stamp);
|
||||
}
|
||||
private:
|
||||
RtmpMediaSourceMuxer::Ptr _rtmp;
|
||||
RtspMediaSourceMuxer::Ptr _rtsp;
|
||||
|
||||
Reference in New Issue
Block a user