1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

202 Commits

Author SHA1 Message Date
tux3
ab8220c2cf
Remove stale TODO 2015-12-15 19:20:34 +01:00
tux3
cbade4bae6
Fix tiny memory leak on startup 2015-12-15 19:08:59 +01:00
tux3
63644050f3
Fix #2683
There is still an issue with the history keeping the old password, though
2015-12-14 23:27:12 +01:00
tux3
981588d630
Fix some avatars saved with the wrong name 2015-12-08 23:10:15 +01:00
tux3
9905042434
Fix wrong word in copypasted log message 2015-12-08 22:13:28 +01:00
tux3
b39f3eacb0
Clean unused getIDString() function 2015-12-05 19:09:20 +01:00
tux3
25ed3d4fba
Fix avatars for encrypted profiles
WARNING: Note that avatars for encrypted profiles are currently stored unencrypted!
2015-12-05 19:08:28 +01:00
tux3
a6bbd31b12
Retry sending audio frames on sync/lock error 2015-12-05 03:22:00 +01:00
tux3
333d10e6d5
Log type of audio send error 2015-12-05 02:35:11 +01:00
tux3
7f5f807bde
Fix filter audio
Fixes #2504

Fixes #2517

Fixes #1565
2015-12-04 18:20:47 +01:00
tux3
37075dbfb5
Improve video quality
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.
2015-12-04 12:53:58 +01:00
tux3
db52ef6e6a
Disable buggy automatic bitrate adjustements
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
2015-11-14 23:51:30 +01:00
Zetok Zalbavar
cfea4675d7
Don't show in debug output nicks
They can contain personal info.
2015-11-14 20:11:37 +00:00
tux3
523e419adf
Fix theoritical A/V deadlock
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.
2015-11-08 00:32:32 +01:00
tux3
7dc608818c
Automatic AV bitrate management
Makes progress on #2134
2015-11-06 23:05:51 +01:00
tux3
d41a578735
Fix crash on audio -> video call promotion
We just ignore it and not show the received video for now.
Fixes #2505
2015-11-06 20:47:42 +01:00
tux3
b4754c6ac2
Fix inconsistent noexcept in toxcall.cpp 2015-11-06 01:49:54 +01:00
tux3
f107858252
Properly exit CoreAV thread 2015-10-25 13:53:04 +01:00
tux3
c902543ae4
Fix call race leading to deadlock and memory leak
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
2015-10-25 00:17:45 +02:00
tux3
a776579732
Don't assert if a call dies while we answer it
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!
2015-10-24 21:41:19 +02:00
tux3
37e2d2e75f
CoreAV: Fix BlockingQueued connections deadlock
Having a deadlock problem? The solution is more locks!
2015-10-24 15:35:08 +02:00
tux3
c0d8703368
Properly signal when we stop sending video
And properly handle toxav happily delivering things out of order,
like firing a video frame callback right after a callback setting the bitrate to 0,
when the peer sent these commands in the right order
2015-10-24 04:26:39 +02:00
tux3
aaf04a80db
Remove some debug output 2015-10-24 02:46:34 +02:00
tux3
1dc7e4cca5
Add 45s call ringing timeout 2015-10-24 01:53:10 +02:00
tux3
8d2ae07c9f
Revert "Delete CoreAV from the Core thread"
This reverts commit 1f758efc2f.
2015-10-23 20:05:35 +02:00
tux3
ae243b2089
Delete CoreAV's timer from the CoreAV thread 2015-10-23 20:05:30 +02:00
tux3
1f758efc2f
Delete CoreAV from the Core thread
Since it was created there

Fixes #2457
2015-10-23 19:42:39 +02:00
tux3
4d9aeeec39 Fix bitrate callback to match toxav update 2015-10-23 17:52:46 +02:00
tux3
6dc91b156a Use actual mutexes for CameraSource
That homemade spinlock thing was insane, VTune says we were spending 1.5s spinning for no reason when openning a device for example
2015-10-23 17:52:46 +02:00
tux3
477554ffba Clean up callback hell between AV UI and CoreAV 2015-10-23 17:52:46 +02:00
tux3
a505e06f83 Multithread CoreAV
This is a little less insane, gives an overall 2x speedup on debug builds video calls
2015-10-23 17:52:45 +02:00
tux3
41e0212f77 Cleanup UI/CoreAV interface 2015-10-23 17:52:45 +02:00
tux3
73a4f40744 Fix call start/call invite race condition
Would result in an assert failure
2015-10-23 17:52:45 +02:00
tux3
1db17ae1ec Fix crash due to erase/remove typo
A race condition would result in trying to remove an element that didn't exist, and thus erasing end (undefined behavior) instead of erasing [end, end) (no-op)
2015-10-23 17:52:45 +02:00
tux3
f45256baf1 Implement group calls 2015-10-23 17:52:45 +02:00
tux3
6cbd507ca8 Clean up dead code in CoreAV 2015-10-23 17:39:08 +02:00
tux3
69b8a90277 Implement video calls 2015-10-23 17:39:08 +02:00
tux3
e0aa8dd4a2 Implement audio calls 2015-10-23 17:39:08 +02:00
tux3
2b888ddc05 Better data structure for tox calls 2015-10-23 17:19:16 +02:00
tux3
512dc8de2d Implement basic call logic
We can now make New AV calls, but without any audio/video. Just opening a link.
2015-10-23 17:09:53 +02:00
tux3
dbbc702c60 Strip out old AV code 2015-10-23 17:02:01 +02:00
Nils Fenner
33e54b841a
Merge pull request #2415 from antis81:ngf/mic 2015-10-21 22:19:37 +02:00
Zetok Zalbavar
c07aee18ad
Merge pull request #2346 from PKEv:save_avatar_in_DB
Save avatar in DB
add import avatars
update delete avatar action
correct import avatar for user without history
add multithreaded
make import run once
2015-10-20 21:01:20 +01:00
Nils Fenner
b7cf4df13f
Get rid of static methods and bugs 2015-10-20 03:46:44 +02:00
Nils Fenner
2a2cba3cf2
remove outcommented code 2015-10-18 22:21:08 +02:00
TheSpiritXIII
dc2c6532a5
Audio: Fix unclosed audio when hanging up 2015-10-18 22:21:08 +02:00
TheSpiritXIII
bbbd450b6a
Audio: Only open mic when requested 2015-10-18 22:21:08 +02:00
TheSpiritXIII
a311b96376
Audio: Open output only when necessary 2015-10-18 22:21:08 +02:00
agilob
7117083e86
Merge remote-tracking branch 'origin/new_video_view' 2015-10-18 20:55:01 +01:00
PKEv
e5a5074f91 make import run once
and rename function
2015-10-18 22:15:49 +03:00
PKEv
ec5e9c7350 correct import avatar for user without history 2015-10-18 16:50:00 +03:00
PKev
dd975c38eb Save avatar in DB
Partially addresses an issue #1656
2015-10-14 22:16:59 +03:00
agilob
7c6ac40d21
add debugging messages to camerasource, code reformatting to make it more readable and ogranized better 2015-10-11 07:38:44 +01:00
Impyy
98c21f3832 Added a context menu to edit/remove the avatar 2015-10-05 22:03:31 +02:00
tux3
c0e2b91fe8
Fix #2310 caused by #2309 2015-09-27 23:45:02 +02:00
Impyy
c49ce6208e Load user status from data file 2015-09-25 20:56:11 +02:00
tux3
6229e045f2
Merge branch 'pr2223'
Fixes #659
2015-09-14 19:51:10 +02:00
PKEv
564b32eb7c save alias 2015-09-14 20:10:35 +03:00
tux3
8fbc0c8b59
Remove some debug output fluff 2015-09-06 00:11:47 +02:00
Zetok Zalbavar
06611d618e
Revert changes from merge of #2092 pull request
That pull request made qTox crash in a number of ways, with no quick fix
available.

Hopefully there will be a way to fix crash, so that this commit could be
reverted, and fix applied.
2015-08-30 21:28:53 +01:00
agilob
d6b176d955
Merge remote-tracking branch 'TheSpirit/requests'
merge awaiting friend requests, fix formatting conflict
2015-08-30 14:25:46 +01:00
TheSpiritXIII
2043908e15 Remove dialog for group invites 2015-08-21 10:32:00 -04:00
Zetok Zalbavar
2088c26028
Better wording for accepting / rejecting avatars 2015-07-28 11:11:58 +01:00
Jookia
7fab49d665 core: TOX_ERR_NEW_LOAD_BAD_FORMAT is non-fatal.
This fixes errors from save migrations between versions and architectures.
2015-07-12 23:58:40 +10:00
PKev
4682814442 fix the names in the history
fix #1943 #1787
2015-06-30 16:56:38 +03:00
tux3
645b1e5566
Fix raciness of encryption API
And make it saner by not having one global password that has to be set before encrypting/decrypting, which is as racy and poorly designed as it gets

Fixes #1917 's immediate symtoms, which some potential for other regressions due to the mess that is encrypted persistence currently
2015-06-27 21:14:35 +02:00
tux3
2ab55568f2
Make the video code a singleton, fix multithreading bugs
There can now only be one CameraSource running.

Video frames are decoded in their own thread, and then converted by users in the user's threads.
The CameraSource API is entirely thread-safe and controls the video decoding thread.

The video device only stays open as long as there are users subscribed to the CameraSource.

We use a dangerous combination of spinlocks and memory fences to keep things synchronized.
2015-06-26 18:34:48 +02:00
TheSpiritXIII
858b005567 Circles: Fix memory leaks and extraneous saving 2015-06-26 10:54:49 +02:00
TheSpiritXIII
c662c0aa92 Update activity on friendship, fix category friend removing (circles and activity) 2015-06-26 10:54:49 +02:00
TheSpiritXIII
ac2263b3e8 Save circle settings after each modification 2015-06-26 10:54:00 +02:00
Daniel Hrabovcak
e0b9e81938 Minor circle widget base class cleanup 2015-06-26 10:54:00 +02:00
tux3
aeb9a7f62f
Fix some warnings 2015-06-08 11:46:38 +02:00
tux3
7513725a3d
Fix wrong assert 2015-06-06 22:11:54 +02:00
tux3
89e9b18cf3
Better checks before cleanupCall 2015-06-06 21:57:09 +02:00
tux3
d76fb459cf
Fix #1817 2015-06-06 21:09:32 +02:00
tux3
adad71e565
Merge branch 'encrypted_settings' 2015-06-06 20:18:00 +02:00
tux3
13bea16292
Add encrypting profile settings serializer
We now use a binary serialized format to save space and allow clean encryption of the user settings.
All the settings can (and should) be edited from the GUI so there is no loss of functionnality.

It can still read the old .ini format, and will seamlessly upgrade to the new format.

Fixes #1810
2015-06-06 20:15:50 +02:00
tux3
6d8bcbb9cd
Workaround for #1817 2015-06-06 17:04:56 +02:00
Zetok Zalbavar
67e9aeec63
Fix incorrect copyright headers
The qTox Project is not associated with the Tox Project in any way, with the
exception of "qTox" using the Tox Projet's "toxcore" collection of libraries.
In particular, the Tox Projet does not own copyright over the qTox Project's
"qTox" collection of software, source code, and assets.
The qTox Project's assets are under the sole copyright of the qTox
contributors, and no partiular rights are granted to the Tox Project.
2015-06-06 14:51:28 +01:00
tux3
bb999456da
Remove some unused defines 2015-06-06 01:59:28 +02:00
tux3
20f254651d
Reorganize files 2015-06-06 01:44:47 +02:00
tux3
3656b1e5eb
Improve avatar caching reliability 2015-06-05 23:41:14 +02:00
tux3
0fd489fbba
Properly kill all calls in ~Core 2015-06-05 18:53:27 +02:00
tux3
1ded562d9d
Clean Settings interface 2015-06-05 16:24:47 +02:00
tux3
e5ddd9d0cf Consider empty encrypted history as nonexistent 2015-06-04 21:34:13 +02:00
tux3
2dbf2e54b1 Implement restarting toxcore 2015-06-04 21:34:13 +02:00
tux3
5f94f33117 Use profile password for all encryption 2015-06-04 21:34:13 +02:00
tux3
4e2983817f Fix crash in ~Core 2015-06-04 21:34:13 +02:00
tux3
42a7efb053 Implement the -p option 2015-06-04 21:34:13 +02:00
tux3
21db31c215 Implement profile deletion 2015-06-04 21:34:13 +02:00
tux3
f7546a731f Fix profile saving on exit 2015-06-04 21:34:13 +02:00
tux3
abf65a5060 Remove deprecated profile management functions 2015-06-04 21:34:12 +02:00
tux3
840fd7dc40 Cleanly create new profiles 2015-06-04 21:34:12 +02:00
tux3
032c561e62 Make Nexus own and start the LoginScreen
And start implementing some of the required methods to make Core, LoginScreen and Nexus use Profile
2015-06-04 21:34:12 +02:00
tux3
c180fa15de
Fix nullptr dereference on A/V timeout 2015-06-03 19:33:17 +02:00
tux3
d53b426750 Replace OpenCV with FFmpeg 2015-06-03 02:10:52 +02:00
tux3
b3ce364d5c
Merge branch 'pr1758' 2015-06-01 16:56:47 +02:00
PKEv
0791c64efd Correct_after_cpp_check
style and typos
2015-05-30 23:44:56 +03:00
tux3
6409b273a4
Re-apply toxcore tox_new compat patch 2015-05-29 17:29:25 +02:00
Ansa89
22d1ab34f9 Also call 'tox_add_tcp_relay()' 2015-05-29 14:54:26 +02:00