mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Use threaded decoding in ffmpeg streaming.
This commit is contained in:
parent
e293a26029
commit
361b99b0c9
5 changed files with 11 additions and 6 deletions
|
@ -32,10 +32,6 @@ extern "C" {
|
||||||
|
|
||||||
#include <QtNetwork/QSslSocket>
|
#include <QtNetwork/QSslSocket>
|
||||||
|
|
||||||
#ifdef small
|
|
||||||
#undef small
|
|
||||||
#endif // small
|
|
||||||
|
|
||||||
uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 };
|
uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 };
|
||||||
|
|
||||||
// Base types compile-time check
|
// Base types compile-time check
|
||||||
|
|
|
@ -175,6 +175,7 @@ CodecPointer MakeCodecPointer(not_null<AVStream*> stream) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
av_codec_set_pkt_timebase(context, stream->time_base);
|
av_codec_set_pkt_timebase(context, stream->time_base);
|
||||||
|
av_opt_set(context, "threads", "auto", 0);
|
||||||
av_opt_set_int(context, "refcounted_frames", 1, 0);
|
av_opt_set_int(context, "refcounted_frames", 1, 0);
|
||||||
|
|
||||||
const auto codec = avcodec_find_decoder(context->codec_id);
|
const auto codec = avcodec_find_decoder(context->codec_id);
|
||||||
|
|
|
@ -83,6 +83,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#define __STDC_FORMAT_MACROS
|
#define __STDC_FORMAT_MACROS
|
||||||
#endif // Q_OS_UNIX
|
#endif // Q_OS_UNIX
|
||||||
|
|
||||||
|
// Remove 'small' macro definition.
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <rpc.h>
|
||||||
|
#ifdef small
|
||||||
|
#undef small
|
||||||
|
#endif // small
|
||||||
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6a78e454e5bd61133b3d6c9f8d64fbad00f17618
|
Subproject commit 623439a33a4c3e70251d62566f064c812e545980
|
|
@ -1 +1 @@
|
||||||
Subproject commit 661ac4f6bdf8991e7d6cac176d32338ac025b637
|
Subproject commit bb8547bba703e53ab46cd6cd009c48adabaa1823
|
Loading…
Add table
Reference in a new issue