Commit Graph

62 Commits

Author SHA1 Message Date
John Preston
95e806cb89 Play webm stickers only once if looping is disabled. 2022-02-10 19:11:21 +03:00
John Preston
2f9c39fe53 Support selecting 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
8b7d2c880e Support rendering Webm videos with alpha. 2022-01-28 19:10:07 +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
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
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
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
John Preston
f0e1d2fd02 'base::optional_variant<' -> 'std::variant<v::null_t,' 2020-09-29 19:03:19 +03:00
John Preston
734d834a20 Replace mapbox variant with std::variant. 2020-09-29 19:03:19 +03:00
John Preston
16177eae2b Simplify frame presentation. 2020-08-11 18:21:40 +04:00
John Preston
07e3671ca8 Allow monospace blocks to extend bubble width.
This partially fixes #2060 instead of additional settings from #7822.
2020-05-12 11:07:41 +04:00
John Preston
d67dafaccb Fix check for 4K frame size in streaming. 2020-04-13 15:32:20 +04:00
John Preston
01c79f917e Add limits on video frame size.
Any video that starts streaming is limited to 4K.
Any in-chat streaming is limited to full hd.
Any GIF panel animation is limited to 720p.
2020-03-27 20:36:05 +04:00
John Preston
c2f58d3ab5 Fix GIFs with alpha display. 2020-02-24 17:48:23 +04:00
John Preston
8ae6156477 Fix video quality when opening from chat. 2019-12-23 11:10:11 +03:00
John Preston
621a5cc4ab Fix GIFs freezing playback. 2019-12-21 16:57:06 +03:00
John Preston
f51f133832 Send packets for processing in batches. 2019-12-19 18:14:05 +03:00
John Preston
4cdf08cbfb Fix video with autoplay disabled. 2019-12-19 13:50:33 +03:00
John Preston
a2b6e05cdf Fix inline player for rotated videos. 2019-12-18 20:15:42 +03:00
John Preston
38199276f1 Fix round video messages streaming. 2019-12-12 16:26:53 +03:00
John Preston
8211c94a74 Prepare frames for all instances with requests. 2019-12-12 12:34:40 +03:00
John Preston
9339db900f Pause GIFs in message history. 2019-12-11 17:01:11 +03:00
John Preston
56e137b20f Move some common code to lib_ffmpeg. 2019-07-01 17:57:35 +02:00
John Preston
3bd1bbc77a Use Streaming::Player in video messages playback. 2019-03-26 16:51:39 +04:00
John Preston
b65a24df96 Allow streaming videos with unknown duration.
When you stream image/gif as a soundless video the total duration is
unknown, so we accumulate packet->pts + packet->duration as duration.
2019-03-13 18:58:50 +04:00
John Preston
be495c17bc Fix seek to video end. 2019-03-13 16:21:07 +04:00
John Preston
9785ff4be6 Add more checks in streaming. 2019-03-13 15:11:54 +04:00
John Preston
5efe47cfb6 Beta version 1.5.16: Remove streaming logs. 2019-03-12 18:56:35 +04:00
John Preston
a56a12a1ef Optimized video frame pushing. 2019-03-11 12:08:18 +04:00
John Preston
92332b45ea Don't reset zoom on video seek. 2019-03-11 12:08:17 +04:00
John Preston
67b9fe846b Improve video frame position checks. 2019-03-11 12:08:16 +04:00
John Preston
6887993f92 Report streaming failed. 2019-03-11 12:08:13 +04:00
John Preston
e2eb9cea00 Apply sample_aspect_ratio in streaming. 2019-03-11 12:08:12 +04:00
John Preston
99e96a5b13 Allow looping video without audio in streaming. 2019-03-11 12:08:12 +04:00
John Preston
8171828c2a Fix build on GCC. 2019-03-11 12:08:09 +04:00
John Preston
fde8dd9607 Play streaming audio in player. 2019-03-11 12:08:08 +04:00
John Preston
f1e0cd6c1d Play streaming video in mediaview. 2019-03-11 11:52:11 +04:00