qTox will automatically import the old history on startup.
This new database code is much more robust.
It is very resilient and will not corrupt or disappear after a crash or
power failure, unlike the old code.
The on-disk database format is also much more compact now.
The database sync option in the advanced settings has been removed,
we know run many database operations asynchronously so performance
should not be a problem anymore, but we always ensure resiliency
in case of abrupt termination, so there is no tradeoff anymore.
Someone was connecting a singal to a lambda capturing this, and never disconnecting it in the destructor. Capturing this is DANGEROUS, kids, don't do this at home.
In case a previous instance crashed, we were trying to activate the current owner before even checking if it was still alive, this resulted in qTox needing to be restarted twice after a crash.
This patch adds ability to override qTox window and tray icons with ones from user's desktop theme. Some people prefer keeping tray icons consistent to achieve best looks.
Following theme icons used:
* qtox: general window icon which is also used in taskbar
* qtox-online, qtox-offline, qtox-busy, qtox-away, qtox-invisible, qtox-event: tray icons
If theme icon is not available then default built-in icon will be used.
If you restart qTox in the middle of downloading an update, it would continue to download the update correctly but the progress bar would go from 0 to 50% instead of resuming from 50 to 100%
ALC_ALL_DEVICES_SPECIFIER may be defined in different headers of
libopenal (alext.h < 1.14 and alc.h >= 1.14). Seems there is no
harm in always include both.
Related commit is: @1d9e89f
This avoids problems with friends who rarely restarts their client. The overhead of sending a file transfer request that gets rejected should be negligible
Double the allowed bitrate, this is especially noticeable on desktop streaming. Desktop streaming is still completely broken, with what looks like iframes silently getting dropped on a regular basis.
Retry 5 times to send a frame when there's an internal toxav lock sync error, this allows us to drop way less frames.
For some users on poor connections, toxav would suggest lower and lower bitratres until reaching zero and disabling audio/video entirely, toxav would then not raise the bitrate back and the only way to re-enable audio/video would have been to change A/V sources or restart the call
We now log toxav's recommendation, but ignore it
Could only be hit by pausing at a key point in a debugger until the call timed-out.
Having one thread going up the call stack and acquiring locks (toxcore callbacks), while another thread goes down taking locks in the other order (CoreAV calling toxav functions) creates some pretty freezy situations.
The deadlock was caused by the GUI thread calling the CoreAV thread, acquiring the CoreAV callback, then right before calling a toxav function, not schedule the thread until the call times out. At this point the toxcore thread fires its state callback to tell us the call is over, locking internal toxcore/toxav mutexes, it reaches our callback function which tries to switch to the CoreAV thread to clean up the call data structures, but has to wait since the CoreAV thread holds its own lock. At this point if we resume the CoreAV thread, it'll be busy calling into a toxav function, which tries to acquire internal toxav locks, those locks are held by the toxcore callback so we deadlock.
Our solution is that when getting a toxcore callback, we immediately switch to a temporary thread, allowing toxcore to release the locks it held, and that temporary thread tries to switch to do work on call data structures. Meanwhile if the CoreAV thread needs internal toxcore locks, it can get them.
Add static icons for tray menu logout and quit
antis made us an icon for logout action and I reused cancel call icon
as quit action in tray menu
Refactored methods to change way how icons are loaded in widget.cpp
to make the methods more flexible
This should permanently fix#2491
antis made us an icon for logout action and I reused cancel call icon
as quit action in tray menu
Refactored methods to change way how icons are loaded in widget.cpp
to make the methods more flexible
This should permanently fix#2491
A call cancel/accepted race was locking up both UI and AV threads, while the stream thread was shoveling more and more video frames on the AV thread's event queue
This error condition only happens when a peer cancels its outgoing call in the middle of us answering it. We can simply ignore the error and things should nicely fall back into place. Since this race should be pretty rare in normal usage, it's nice to leave a log message, as it might mean we're being fuzzed.
We can prograssively replace more of those asserts by fallbacks and log messages now that everything has been shown to work fine, and the race conditions are harmless.
I feel like writing a novel today. Good thing nobody looks at these!