Ограничить камеру звонка до 30 fps перед конвертацией
This commit is contained in:
1 parent
f6051d3bcd
commit
21e4821e22
3 files changed
+27
-12
No files matched your search
@@ -1,7 +1,6 @@
|
||||
#include "call_video_engine.h"
|
||||
#include "call_video_encoder.h"
|
||||
#include "call_video_decoder.h"
|
||||
#include "call_video_cadence.h"
|
||||
#include "call_camera_capture.h"
|
||||
#include "../../../src/call/call_video_port.h"
|
||||
#include "../../../src/call/call_video_playout.h"
|
||||
@@ -167,8 +166,7 @@ void CallVideoEngine::transmit() {
|
||||
bool forceKey = true;
|
||||
int64_t reportAt = nowUs(), encodeMax = 0, inputAgeMax = 0;
|
||||
uint64_t captureBase = 0;
|
||||
unsigned encodedCount = 0, keyCount = 0, sendBusy = 0, paced = 0, expired = 0;
|
||||
CallVideoCadence cadence;
|
||||
unsigned encodedCount = 0, keyCount = 0, sendBusy = 0, expired = 0;
|
||||
uint64_t wakeSerial = 0;
|
||||
auto idle = [this, &wakeSerial] {
|
||||
std::unique_lock<std::mutex> guard(m->lock);
|
||||
@@ -188,12 +186,12 @@ void CallVideoEngine::transmit() {
|
||||
int64_t now = nowUs();
|
||||
if (now - reportAt >= 1000000) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG,
|
||||
"video capture flow call=%llu interval_us=%lld captured=%llu encoded=%u keys=%u send_busy=%u paced=%u "
|
||||
"video capture flow call=%llu interval_us=%lld captured=%llu encoded=%u keys=%u send_busy=%u "
|
||||
"expired=%u encode_max_us=%lld input_age_max_us=%lld capture_age_us=%lld pts=%lld clock_correction_us=%lld",
|
||||
(unsigned long long)m->id, (long long)(now - reportAt), (unsigned long long)(captured - captureBase),
|
||||
encodedCount, keyCount, sendBusy, paced, expired, (long long)encodeMax, (long long)inputAgeMax,
|
||||
encodedCount, keyCount, sendBusy, expired, (long long)encodeMax, (long long)inputAgeMax,
|
||||
(long long)(pts >= 0 ? now - pts : 0), (long long)pts, (long long)clockCorrection);
|
||||
reportAt = now; captureBase = captured; encodedCount = keyCount = sendBusy = paced = expired = 0;
|
||||
reportAt = now; captureBase = captured; encodedCount = keyCount = sendBusy = expired = 0;
|
||||
encodeMax = inputAgeMax = 0;
|
||||
}
|
||||
if (revision != userRevision) { userRevision = revision; excluded = 0; }
|
||||
@@ -236,7 +234,6 @@ void CallVideoEngine::transmit() {
|
||||
call_video_port_applied(m->id, format.generation, request, 0);
|
||||
}
|
||||
#ifdef HAVE_STREAM_CAPTURE
|
||||
if (!cadence.accept(pts)) { lastPts = pts; ++paced; idle(); continue; }
|
||||
if (image.isNull() || nowUs() - pts > CallCameraMaxFrameAgeUs) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video TX skips old capture age_us=%lld", (long long)(nowUs() - pts));
|
||||
lastPts = pts; ++expired; continue;
|
||||
|
||||
Reference in new issue
Block a user