- decouple the Sevana libraries; some improvements for statistics

This commit is contained in:
2022-10-12 12:28:57 +03:00
parent c2e9985bc2
commit 691501c405
11 changed files with 18 additions and 54 deletions

View File

@@ -80,6 +80,10 @@ if (CMAKE_SYSTEM MATCHES "Windows*")
endif()
add_library(media_lib ${SOURCES})
# Dependency on ice_stack - Linux build requires it
target_link_libraries(media_lib ice_stack)
set_property(TARGET media_lib PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
@@ -101,6 +105,7 @@ target_include_directories(media_lib
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/libevs/basic_op
${CMAKE_CURRENT_SOURCE_DIR}/../../libs/libevs/basic_math
)
if (USE_RESIP_INTEGRATION)
message("USE_RESIP_INTEGRATION is turned on!")
target_compile_definitions(media_lib PUBLIC -DUSE_RESIP_INTEGRATION)

View File

@@ -20,9 +20,9 @@
#include "../audio/Audio_DataWindow.h"
#include "../audio/Audio_Resampler.h"
#if defined(USE_PVQA_LIBRARY)
/*#if defined(USE_PVQA_LIBRARY)
# include "pvqa++.h"
#endif
#endif*/
#include <map>
@@ -199,6 +199,7 @@ namespace MT
// Resamples, sends to analysis, writes to dump and queues to output decoded frames from mDecodedFrame
void processDecoded(Audio::DataWindow& output, int options);
/*
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
std::shared_ptr<sevana::pvqa> mPVQA;
void initPvqa();
@@ -207,7 +208,7 @@ namespace MT
std::shared_ptr<Audio::DataWindow> mPvqaBuffer;
#endif
*/
void processStatisticsWithAmrCodec(Codec* c);
};

View File

@@ -1,4 +1,4 @@
/* Copyright(C) 2007-2021 VoIPobjects (voipobjects.com)
/* Copyright(C) 2007-2022 VoIPobjects (voipobjects.com)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

View File

@@ -67,7 +67,7 @@ void JitterStatistics::process(jrtplib::RTPPacket* packet, int rate)
Statistics::Statistics()
:mReceived(0), mSent(0), mReceivedRtp(0), mSentRtp(0),
mReceivedRtcp(0), mSentRtcp(0), mDuplicatedRtp(0), mOldRtp(0), mIllegalRtp(0),
mPacketLoss(0), mJitter(0.0), mAudioTime(0), mSsrc(0), mPacketDropped(0)
mPacketLoss(0), mJitter(0.0), mAudioTime(0), mDecodedSize(0), mSsrc(0), mPacketDropped(0)
{
mBitrateSwitchCounter = 0;
memset(mLoss, 0, sizeof mLoss);
@@ -95,6 +95,7 @@ void Statistics::reset()
mJitter = 0.0;
mAudioTime = 0;
mPacketDropped = 0;
mDecodedSize = 0;
memset(mLoss, 0, sizeof mLoss);
}

View File

@@ -69,6 +69,7 @@ public:
int mLoss[128]; // Every item is number of loss of corresping length
size_t mAudioTime; // Decoded/found time in milliseconds
size_t mDecodedSize; // Number of decoded bytes
uint16_t mSsrc; // Last known SSRC ID in a RTP stream
ice::NetworkAddress mRemotePeer; // Last known remote RTP address