ledok
This commit is contained in:
parent
8fa52c5c8c
commit
2abad1c8b6
|
@ -6,8 +6,6 @@
|
|||
*.a
|
||||
*.la
|
||||
*.lai
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Qt-es
|
||||
|
||||
|
|
|
@ -58,8 +58,7 @@ win32 {
|
|||
copy.files += $$files(ffmpeg/bin/*.dll)
|
||||
copy.files += 7z/7z.dll
|
||||
copy.files += 7z/7z.exe
|
||||
# for https requests
|
||||
copy.files += $$files(OpenSSL/*.dll)
|
||||
copy.files += $$files(OpenSSL/*.dll) # for https requests
|
||||
|
||||
copy.path = $$OUT_PWD
|
||||
copydir.path = $$OUT_PWD
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libavcodec.60.3.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libavcodec.60.3.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libavdevice.60.1.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libavdevice.60.1.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libavfilter.9.3.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libavfilter.9.3.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libavformat.60.3.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libavformat.60.3.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libavutil.58.2.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libavutil.58.2.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libpostproc.57.1.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libpostproc.57.1.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libswresample.4.10.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libswresample.4.10.100.dylib
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
libswscale.7.1.100.dylib
|
|
@ -0,0 +1 @@
|
|||
libswscale.7.1.100.dylib
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libavcodec
|
||||
Description: FFmpeg codec library
|
||||
Version: 60.3.100
|
||||
Requires:
|
||||
Requires.private: libswresample >= 4.10.100, libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lavcodec
|
||||
Libs.private: -L/usr/local/Cellar/libvpx/1.13.0/lib -lvpx -lm -L/usr/local/Cellar/libvpx/1.13.0/lib -lvpx -lm -L/usr/local/Cellar/libvpx/1.13.0/lib -lvpx -lm -L/usr/local/Cellar/libvpx/1.13.0/lib -lvpx -lm -L/usr/local/Cellar/webp/1.3.0/lib -lwebpmux -lwebp -lsharpyuv -liconv -lm -llzma -L/usr/local/Cellar/aribb24/1.0.4/lib -laribb24 -L/usr/local/Cellar/dav1d/1.1.0/lib -ldav1d -lopencore-amrwb -lsnappy -lstdc++ -framework AudioToolbox -L/usr/local/Cellar/jpeg-xl/0.8.1_2/lib -L/usr/local/Cellar/libvmaf/2.3.1/lib -L/usr/local/Cellar/aom/3.6.0/lib -laom -lvmaf -ljxl -lmp3lame -lm -lopencore-amrnb -L/usr/local/Cellar/openjpeg/2.5.0/lib -lopenjp2 -L/usr/local/Cellar/opus/1.3.1/lib -lopus -L/usr/local/Cellar/rav1e/0.6.4/lib -lrav1e -L/usr/local/Cellar/speex/1.2.1/lib -lspeex -L/usr/local/Cellar/svt-av1/1.4.1/lib -lSvtAv1Enc -ltheoraenc -ltheoradec -logg -L/usr/local/Cellar/libvorbis/1.3.7/lib -lvorbis -L/usr/local/Cellar/libvorbis/1.3.7/lib -lvorbisenc -L/usr/local/Cellar/webp/1.3.0/lib -lwebp -lsharpyuv -L/usr/local/Cellar/x264/r3095/lib -lx264 -L/usr/local/Cellar/x265/3.5/lib -lx265 -lxvidcore -pthread -lz -framework VideoToolbox -framework CoreFoundation -framework CoreMedia -framework CoreVideo -framework CoreServices
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libavdevice
|
||||
Description: FFmpeg device handling library
|
||||
Version: 60.1.100
|
||||
Requires:
|
||||
Requires.private: libavfilter >= 9.3.100, libswscale >= 7.1.100, libpostproc >= 57.1.100, libavformat >= 60.3.100, libavcodec >= 60.3.100, libswresample >= 4.10.100, libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lavdevice
|
||||
Libs.private: -framework Foundation -framework AudioToolbox -framework CoreAudio -lm -framework AVFoundation -framework CoreVideo -framework CoreMedia -framework CoreGraphics -L/usr/local/Cellar/libxcb/1.15_1/lib -lxcb -L/usr/local/Cellar/libxcb/1.15_1/lib -lxcb-shm -L/usr/local/Cellar/libxcb/1.15_1/lib -lxcb-shape -L/usr/local/Cellar/libxcb/1.15_1/lib -lxcb-xfixes -framework AudioToolbox -pthread -L/usr/local/lib -lSDL2
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libavfilter
|
||||
Description: FFmpeg audio/video filtering library
|
||||
Version: 9.3.100
|
||||
Requires:
|
||||
Requires.private: libswscale >= 7.1.100, libpostproc >= 57.1.100, libavformat >= 60.3.100, libavcodec >= 60.3.100, libswresample >= 4.10.100, libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lavfilter
|
||||
Libs.private: -framework OpenGL -framework OpenGL -pthread -lm -L/usr/local/Cellar/libsamplerate/0.2.2/lib -L/usr/local/Cellar/rubberband/3.2.1/lib -lrubberband -framework Accelerate -lsamplerate -lstdc++ -L/usr/local/Cellar/libvmaf/2.3.1/lib -lvmaf -L/usr/local/Cellar/tesseract/5.3.1/lib -L/usr/local/Cellar/libarchive/3.6.2_1/lib -ltesseract -larchive -lcurl -L/usr/local/Cellar/libass/0.17.1/lib -lass -L/usr/local/Cellar/libvidstab/1.1.1/lib -lvidstab -lm -framework Metal -framework VideoToolbox -L/usr/local/Cellar/zeromq/4.3.4/lib -lzmq -L/usr/local/Cellar/zimg/3.0.4/lib -lzimg -framework CoreImage -framework AppKit -L/usr/local/opt/freetype/lib -L/usr/local/Cellar/fontconfig/2.14.2/lib -lfontconfig -lfreetype -L/usr/local/opt/freetype/lib -lfreetype -framework CoreFoundation -framework CoreMedia -framework CoreVideo -framework CoreServices
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libavformat
|
||||
Description: FFmpeg container format library
|
||||
Version: 60.3.100
|
||||
Requires:
|
||||
Requires.private: libavcodec >= 60.3.100, libswresample >= 4.10.100, libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lavformat
|
||||
Libs.private: -lm -lxml2 -lbz2 -L/usr/local/Cellar/libbluray/1.3.4/lib -lbluray -lz -L/usr/local/Cellar/gnutls/3.8.0/lib -lgnutls -L/usr/local/Cellar/librist/0.2.7_3/lib -lrist -L/usr/local/Cellar/srt/1.5.1/lib -lsrt -L/usr/local/Cellar/zeromq/4.3.4/lib -lzmq
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libavutil
|
||||
Description: FFmpeg utility library
|
||||
Version: 58.2.100
|
||||
Requires:
|
||||
Requires.private:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lavutil
|
||||
Libs.private: -pthread -lm -framework VideoToolbox -L/usr/local/Cellar/libx11/1.8.4/lib -lX11 -framework CoreFoundation -framework CoreMedia -framework CoreVideo -framework CoreServices
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libpostproc
|
||||
Description: FFmpeg postprocessing library
|
||||
Version: 57.1.100
|
||||
Requires:
|
||||
Requires.private: libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lpostproc
|
||||
Libs.private: -lm
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libswresample
|
||||
Description: FFmpeg audio resampling library
|
||||
Version: 4.10.100
|
||||
Requires:
|
||||
Requires.private: libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lswresample
|
||||
Libs.private: -lm -lsoxr
|
||||
Cflags: -I${includedir}
|
|
@ -1,14 +0,0 @@
|
|||
prefix=/usr/local/Cellar/ffmpeg/6.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=/usr/local/Cellar/ffmpeg/6.0/lib
|
||||
includedir=/usr/local/Cellar/ffmpeg/6.0/include
|
||||
|
||||
Name: libswscale
|
||||
Description: FFmpeg image rescaling library
|
||||
Version: 7.1.100
|
||||
Requires:
|
||||
Requires.private: libavutil >= 58.2.100
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lswscale
|
||||
Libs.private: -lm
|
||||
Cflags: -I${includedir}
|
|
@ -307,8 +307,8 @@ MainWindow::MainWindow(QWidget *parent) : BaseWin(parent) {
|
|||
|
||||
actInfo = new QAction;
|
||||
connect(actInfo, &QAction::triggered, this, [this] {
|
||||
QMessageBox::information(this, tr("Info"),
|
||||
QString("SupportsSsl: ").append(QSslSocket::supportsSsl()?"true":"false")
|
||||
QMessageBox::information(this, tr("Info"), QFileInfo("aaa.file").absoluteFilePath()
|
||||
.append("\nSupportsSsl: ").append(QSslSocket::supportsSsl()?"true":"false")
|
||||
.append("\nSslLibraryBuildVersion: ").append(QSslSocket::sslLibraryBuildVersionString().append(" (").append(QString::number(QSslSocket::sslLibraryBuildVersionNumber())).append(")"))
|
||||
.append("\nSslLibraryVersion: ").append(QSslSocket::sslLibraryVersionString()).append(" (").append(QString::number(QSslSocket::sslLibraryVersionNumber())).append(")"));
|
||||
});
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
#include "tcpsocket.h"
|
||||
|
||||
TcpSocket::TcpSocket(QObject *parent) : QTcpSocket{parent} {
|
||||
connect(this, &QTcpSocket::errorOccurred, this, [this]() {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
hasErr = true;
|
||||
}
|
||||
cv.notify_all();
|
||||
});
|
||||
connect(this, &QTcpSocket::connected, this, [this]() {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
}
|
||||
cv.notify_all();
|
||||
});
|
||||
connect(this, &QTcpSocket::disconnected, this, [this]() {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
}
|
||||
cv.notify_all();
|
||||
});
|
||||
connect(this, &QTcpSocket::bytesWritten, this, [this]() {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
isWritten = true;
|
||||
}
|
||||
cv.notify_all();
|
||||
});
|
||||
connect(this, &QTcpSocket::readyRead, this, [this]() {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mtx);
|
||||
isReadyRead = true;
|
||||
}
|
||||
cv.notify_all();
|
||||
});
|
||||
}
|
||||
|
||||
bool TcpSocket::waitForConnected(int msecs) {
|
||||
if(hasErr) return false;
|
||||
if(state() == ConnectedState) return true;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
if(hasErr) return false;
|
||||
if(state() == ConnectedState) return true;
|
||||
auto until = std::chrono::steady_clock::now() + std::chrono::milliseconds(msecs);
|
||||
auto check = until - std::chrono::milliseconds(10);
|
||||
do {
|
||||
cv.wait_until(lock, until);
|
||||
if(hasErr) return false;
|
||||
if(state() == ConnectedState) return true;
|
||||
} while(std::chrono::steady_clock::now() < check);
|
||||
}
|
||||
hasErr = true;
|
||||
setSocketError(SocketTimeoutError);
|
||||
return false;
|
||||
}
|
||||
bool TcpSocket::waitForDisconnected(int msecs) {
|
||||
if(hasErr) return false;
|
||||
if(state() == UnconnectedState) return true;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
if(hasErr) return false;
|
||||
if(state() == UnconnectedState) return true;
|
||||
auto until = std::chrono::steady_clock::now() + std::chrono::milliseconds(msecs);
|
||||
auto check = until - std::chrono::milliseconds(10);
|
||||
do {
|
||||
cv.wait_until(lock, until);
|
||||
if(hasErr) return false;
|
||||
if(state() == UnconnectedState) return true;
|
||||
} while(std::chrono::steady_clock::now() < check);
|
||||
}
|
||||
hasErr = true;
|
||||
setSocketError(SocketTimeoutError);
|
||||
return false;
|
||||
}
|
||||
bool TcpSocket::waitForBytesWritten(int msecs) {
|
||||
if(hasErr) return false;
|
||||
if(isWritten) return true;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
if(hasErr) return false;
|
||||
if(isWritten) return true;
|
||||
auto until = std::chrono::steady_clock::now() + std::chrono::milliseconds(msecs);
|
||||
auto check = until - std::chrono::milliseconds(10);
|
||||
do {
|
||||
cv.wait_until(lock, until);
|
||||
if(hasErr) return false;
|
||||
if(isWritten) return true;
|
||||
} while(std::chrono::steady_clock::now() < check);
|
||||
}
|
||||
hasErr = true;
|
||||
setSocketError(SocketTimeoutError);
|
||||
return false;
|
||||
}
|
||||
bool TcpSocket::waitForReadyRead(int msecs) {
|
||||
if(hasErr) return false;
|
||||
if(isReadyRead) return true;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mtx);
|
||||
if(hasErr) return false;
|
||||
if(isReadyRead) return true;
|
||||
auto until = std::chrono::steady_clock::now() + std::chrono::milliseconds(msecs);
|
||||
auto check = until - std::chrono::milliseconds(10);
|
||||
do {
|
||||
cv.wait_until(lock, until);
|
||||
if(hasErr) return false;
|
||||
if(isReadyRead) return true;
|
||||
} while(std::chrono::steady_clock::now() < check);
|
||||
}
|
||||
hasErr = true;
|
||||
setSocketError(SocketTimeoutError);
|
||||
return false;
|
||||
}
|
||||
qint64 TcpSocket::readData(char *data, qint64 maxlen) {
|
||||
auto rtn = QTcpSocket::readData(data, maxlen);
|
||||
isReadyRead = false;
|
||||
return rtn;
|
||||
}
|
||||
qint64 TcpSocket::readLineData(char *data, qint64 maxlen) {
|
||||
auto rtn = QTcpSocket::readLineData(data, maxlen);
|
||||
isReadyRead = false;
|
||||
return rtn;
|
||||
}
|
||||
qint64 TcpSocket::writeData(const char *data, qint64 len) {
|
||||
isWritten = false;
|
||||
return QTcpSocket::writeData(data, len);
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
#ifndef TCPSOCKET_H
|
||||
#define TCPSOCKET_H
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include <condition_variable>
|
||||
|
||||
class TcpSocket : public QTcpSocket {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TcpSocket(QObject *parent = nullptr);
|
||||
|
||||
bool waitForConnected(int msecs = 30000) override;
|
||||
bool waitForDisconnected(int msecs = 30000) override;
|
||||
bool waitForBytesWritten(int msecs = 30000) override;
|
||||
bool waitForReadyRead(int msecs = 30000) override;
|
||||
qint64 readData(char *data, qint64 maxlen) override;
|
||||
qint64 readLineData(char *data, qint64 maxlen) override;
|
||||
qint64 writeData(const char *data, qint64 len) override;
|
||||
bool hasErr = false;
|
||||
bool isWritten = false;
|
||||
bool isReadyRead = false;
|
||||
|
||||
private:
|
||||
std::mutex mtx;
|
||||
std::condition_variable cv;
|
||||
|
||||
};
|
||||
|
||||
#endif // TCPSOCKET_H
|
Loading…
Reference in New Issue
Block a user