chatgui: воспроизведение видео — FFmpeg-плеер + frameless окно

- videoplayer_engine: декод в worker-потоке (FFmpeg), A/V sync по аудио-курсору,
  seek с epoch-защитой от устаревших кадров
- videoplayer_window: окно без рамки, drag-перенос, dblclick/Alt+Enter fullscreen,
  Esc закрытие, timeline + play/pause/close, авто-скрытие контролов
- видео-баббл в списке: превью-кадр (jpg), play-оверлей, длительность, прогресс
- превью извлекается после скачивания (video_extract_thumbnail) в фоне
- mainwindow: синглтон-плеер, openVideoRequested → openVideo
- CMake: HAVE_FFMPEG для vibechat
This commit is contained in:
evgeny committed 2026-09-08 00:55:06 +03:00
1 parent e264b8aaa7
commit 6542618927
11 files changed
+1168 -1

No files matched your search

+16
View File
@@ -9,6 +9,7 @@
#include "settingsdialog.h"
#include "channelsettingsdialog.h"
#include "connmonitorwindow.h"
#include "videoplayer_window.h"
#include "creategroupdialog.h"
#include "invite_link.h"
#include "sound_manager.h"
@@ -377,6 +378,7 @@ void MainWindow::setupConnects() {
m_channelList->setChannelUnreadCount(channelId,
m_db->getUnreadCount(channelId, lastReadMsgId));
});
connect(m_messageList, &MessageList::openVideoRequested, this, &MainWindow::openVideo);
}
void MainWindow::setupTray() {
@@ -481,6 +483,20 @@ void MainWindow::showConnMonitor() {
m_connMonitor->show();
}
void MainWindow::openVideo(const QString& filePath) {
if (!m_videoPlayer) {
m_videoPlayer = new VideoPlayerWindow(nullptr);
connect(m_videoPlayer, &VideoPlayerWindow::closed, this, [this] {
m_videoPlayer->deleteLater();
m_videoPlayer = nullptr;
});
} else {
m_videoPlayer->raise();
m_videoPlayer->activateWindow();
}
m_videoPlayer->playFile(filePath);
}
void MainWindow::onMessageReceived(const char* ch_id, int ch_id_len, uint64_t author) {
QString cid = QString::fromUtf8(ch_id, ch_id_len);
if (m_db && author != m_db->myNodeId())