|
|
|
|
@ -99,7 +99,7 @@ void CallVideoEngine::publishImage(const QImage& image, int64_t pts) {
|
|
|
|
|
image = m->shown; pts = m->shownPts; selected = m->shownAt; m->publicationPending = false; } |
|
|
|
|
emit imageChanged(image); |
|
|
|
|
if (!image.isNull() && pts >= 0 && pts % 1000000 < 34000) |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=publish call=%llu pts=%lld mono_us=%lld ui_wait_us=%lld", |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=publish call=%llu pts=%lld mono_us=%lld ui_wait_us=%lld", |
|
|
|
|
(unsigned long long)m->id, (long long)pts, (long long)nowUs(), (long long)(nowUs() - selected)); |
|
|
|
|
}, Qt::QueuedConnection); |
|
|
|
|
} |
|
|
|
|
@ -264,7 +264,7 @@ void CallVideoEngine::transmit() {
|
|
|
|
|
forceKey = call_video_port_send(&packet) != 1; } |
|
|
|
|
// Одинаковое окно исходного PTS на всех этапах: примерно один кадр в секунду, без трассы каждого кадра.
|
|
|
|
|
if (pts % 1000000 < 34000) |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, |
|
|
|
|
"video timing stage=encode call=%llu frame=%llu pts=%lld mono_us=%lld encode_us=%lld accepted=%d", |
|
|
|
|
(unsigned long long)m->id, (unsigned long long)frameId, (long long)pts, (long long)nowUs(), |
|
|
|
|
(long long)(nowUs() - encodeStarted), !forceKey); |
|
|
|
|
@ -293,7 +293,7 @@ void CallVideoEngine::receive() {
|
|
|
|
|
if (decoder.decode(packet, image)) { |
|
|
|
|
pictures.push_back({{packet.pts_us, packet.received_us}, image}); |
|
|
|
|
if (packet.pts_us % 1000000 < 34000) |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, |
|
|
|
|
"video timing stage=decode call=%llu frame=%llu pts=%lld mono_us=%lld decode_us=%lld queue=%zu", |
|
|
|
|
(unsigned long long)m->id, (unsigned long long)packet.frame_id, (long long)packet.pts_us, |
|
|
|
|
(long long)nowUs(), (long long)(nowUs() - decodeStarted), pictures.size()); |
|
|
|
|
@ -314,7 +314,7 @@ void CallVideoEngine::receive() {
|
|
|
|
|
if (action == CALL_VIDEO_PLAYOUT_SHOW) { |
|
|
|
|
const auto& f = pictures.front(); publishImage(f.image, f.timing.pts_us); lastPictureAt = now; |
|
|
|
|
if (f.timing.pts_us % 1000000 < 34000) |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=select call=%llu pts=%lld mono_us=%lld audio_pts=%lld", |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CALL, "video timing stage=select call=%llu pts=%lld mono_us=%lld audio_pts=%lld", |
|
|
|
|
(unsigned long long)m->id, (long long)f.timing.pts_us, (long long)now, (long long)clock.pts_us); |
|
|
|
|
} |
|
|
|
|
pictures.pop_front(); |
|
|
|
|
|