Commit Graph

190 Commits

Author SHA1 Message Date
23rd 2acedca6b7 Replaced some qstr with u""_q literal. 2022-11-29 14:12:50 +03:00
John Preston 644ec1f599 Remove base::Observable / base::Variable. 2022-11-11 11:43:24 +04:00
John Preston 8268e9f872 Support new rounding for GIFs / videos. 2022-11-01 19:25:35 +04:00
John Preston fc3810fd7f Improve scaling / expanding for photos.
Fixes #25061.
2022-09-19 17:44:59 +04:00
John Preston 749fb52113 Implement animated spoilers. 2022-09-18 16:52:30 +04:00
John Preston d6ba092697 Make GIFs and videos with captions larger. 2022-09-05 19:03:52 +04:00
Alexander Kernozhitsky a5bd4ef6f7 Fix code style 2022-09-04 08:04:02 +04:00
Alexander Kernozhitsky c6c2a44e9d Patch the remaining uses or FFmpeg APIs 2022-09-04 08:04:02 +04:00
John Preston 184ebc865c Fix downloading videos of size > INT_MAX to disk. 2022-08-16 08:56:30 +03:00
John Preston 2499955496 Support custom emoji in the message input field. 2022-07-26 20:12:08 +03:00
John Preston 60d998bf36 Fix build on Linux. 2022-06-14 21:27:50 +04:00
John Preston 88393eb77b Fixed streaming for big files. 2022-05-19 17:27:03 +04:00
John Preston 6dedf7c63e Update API scheme to layer 143. 2022-05-19 17:27:02 +04:00
John Preston dd9e317257 Recover after a streaming error. 2022-03-30 14:08:36 +04:00
John Preston e8748986bf Fix fallback to software decoding in FFmpeg. 2022-03-30 12:22:50 +04:00
John Preston 41eb223bbf Render NV12 in OpenGL from hwaccel without swscale. 2022-03-23 10:03:43 +04:00
John Preston 0dca556843 Use FFmpeg hardware acceleration in media viewer / PiP. 2022-03-23 10:03:38 +04:00
23rd c9ebec1cf0 Removed base/observer.h from main pch.
Removed unused inheritances from base::Subscriber.
2022-03-15 18:02:30 +03:00
Nicholas Guriev 436622ad7c Fix build against FFmpeg v5.0
It has been released on January 17th. This patch keeps source compatibility
with older versions.
2022-02-28 20:22:18 +03:00
John Preston 95e806cb89 Play webm stickers only once if looping is disabled. 2022-02-10 19:11:21 +03:00
John Preston 4bef1e9f59 Use unreliable video duration if open with audio. 2022-02-01 16:51:51 +03:00
John Preston 2f9c39fe53 Support selecting Webm stickers. 2022-01-28 19:10:07 +03:00
John Preston 044c7f3ce9 Generate opaque good thumbnails for non-sticker Webm. 2022-01-28 19:10:07 +03:00
John Preston d18e28978a Cache good thumbnail in Webp for Webm stickers. 2022-01-28 19:10:07 +03:00
John Preston 079772a399 Correctly preserve first frame alpha in video streaming. 2022-01-28 19:10:07 +03:00
John Preston 2e39befd7c Don't trust AVFormatContext duration in Webm video.
It reports some strange numbers like 1000, which is 1ms.
2022-01-28 19:10:07 +03:00
John Preston 8b7d2c880e Support rendering Webm videos with alpha. 2022-01-28 19:10:07 +03:00
John Preston 3ff17a8789 Refactor image transformation interfaces. 2022-01-21 15:33:44 +03:00
Ilya Fedin 847c01d605 Add Qt 6 support
Tested only on Linux so far
2021-10-21 13:15:00 +04:00
John Preston 19ce1edc16 Use base::SafeRound instead of std::round.
Previous assertion violations because of NaN from std::round were
in video streaming, see commits 27d58ba07b, 8f5830d520.

Now the crashes happened in the ConvertScale() call from a background
thread when preparing an image from clipboard for sending to a chat.
2021-09-27 12:13:57 +04:00
23rd e6f0c176f7 Moved AudioMsgId to separated file. 2021-09-01 01:23:20 +03:00
John Preston beff635e45 Colorize bubbles according to a custom chat theme. 2021-08-30 20:32:57 +03:00
John Preston 2694cb76a7 Remove crash debug information from streaming. 2021-08-25 11:24:32 +03:00
John Preston 7948fc509e Remove (incorrect) checks for double casts. 2021-08-24 18:11:47 +03:00
John Preston 2d6155fc85 Throw fp exceptions in Windows 32 bit build. 2021-08-24 17:43:31 +03:00
John Preston 8f5830d520 Workaround both std::round-s in video streaming. 2021-08-24 12:42:27 +03:00
John Preston e8f1373edc Add some checks for NAN in video playback. 2021-08-23 20:29:40 +03:00
John Preston 27d58ba07b Try to do a non-failed double->crl::time cast.
A crash on some old CPUs show, that in video frame processing
sometimes a cast from double to crl::time fails, writing to
the resulting crl::time value INT64_MIN (0x8000000000000000).

This is shown in crash logs, with lines like:

...,rounded:104,casted:-9223372036854775808,...

where logs are written like:

...
).arg(std::round(adjust * _options.speed)
).arg(crl::time(std::round(adjust * _options.speed))
...

I don't know what to do and how to workaround this. Trying other casts.
2021-08-23 17:58:59 +03:00
John Preston 868015da25 Add extensive video playback crash logs. 2021-08-23 12:17:40 +03:00
John Preston 3136c0586e Add some more assertions to debug a crash. 2021-08-21 09:33:20 +03:00
John Preston 3d36e501a1 Add some assertions to debug a crash in video playback. 2021-08-20 18:42:13 +03:00
Ilya Fedin 79cc797aff Fix -Wunused-variable warnings 2021-07-13 21:43:34 +03:00
John Preston 4ff9e90153 Add some assertions and logging for a crash debugging. 2021-06-24 10:49:01 +04:00
John Preston fba116f0d5 Implement custom OpenGL renderer for PiP. 2021-06-10 10:12:37 +04:00
John Preston 607263b8be Fix seek / cancel of video playback in media viewer. 2021-06-09 09:19:28 +04:00
John Preston f6f0b02333 Render YUV420 video in media viewer. 2021-06-09 09:19:28 +04:00
John Preston 9144f4ea7b Fix streaming frames prepare. 2021-05-24 22:45:15 +04:00
Ilya Fedin c0c10689a1 Get rid of deprecated ranges::view usage 2021-03-13 19:14:58 +03:00
Ilya Fedin a986d7a3d6 Fix checking cover stream on seeking 2021-01-22 17:05:43 +04:00
John Preston 7ab919e249 Allow skipping more bad packets after a good one. 2020-12-14 19:56:24 +04:00