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

44 Commits

Author SHA1 Message Date
Anthony Bilinski
9688a1e82f fix(video): Close video device after checking V4L video modes
Fix #6346
2021-06-27 11:25:38 -07:00
Anthony Bilinski
65ff532a54
fix(macos): update deprecated AVFoundation API 2021-06-27 11:20:17 -07:00
Jamie Westell
98a818cbea fix(video): only list video devices with video capture capability
This change adds a check for the V4L2_CAP_VIDEO_CAPTURE capability of
the video device found on devfs. This will filter out 'metadata' device
nodes that may be present on devfs at some  /dev/videoN path.

Fixes #6276
2021-02-27 16:19:30 -08:00
Anthony Bilinski
8abd4e47e9
refactor(style): use #pragma once rather than include guards 2020-05-03 15:51:52 -07:00
iphydf
e71225268f
chore: Various code cleanups.
* Reorder class data members and/or constructor initialisers to match,
  reducing confusion about when members will be initialised.
* Remove (most) unused variables. Not removed: some global variables with
  `TODO(sudden6)` on them for using them in the future. I don't know how
  far into the future sudden6 wants to use them, so I left them there for
  now.
* Distinguish different bootstrap nodes in the logs by index in the
  bootstrap node list. Originally, we used to log the address/port of the
  node we're bootstrapping to. This was removed out of privacy concerns
  (even though the bootstrap nodes are public). This made the logs much
  less useful when debugging why the client isn't connecting. Having
  indices makes it easier to see that different nodes are being selected,
  and makes it possible to determine which node was selected.
* Explicitly cast unused results of Tox API functions to `void` when all
  we want is to know whether the function succeeds or not.
* Don't try to `#include <unistd.h>` on Windows. It does not exist on
  MSVC.
* Remove extra `;` after function definitions.
* Remove reference indirection of QJsonValueRef, since a copy of that ref
  (small pointer-like object) has to be made anyway when iterating over
  QJsonArrays.
* Make some file-scope global state `static`.
* Use `nullptr` instead of `NULL`.
* Add `#if DESKTOP_NOTIFICATIONS` around the code that implements desktop
  notifications, so it becomes a bit easier to compile everything with a
  single compiler command - useful for manually running static analysers.
* Fix an error on MSVC where `disconnect` is looked up to be a non-static
  member function and the `this` capture is missing.
* Consistently use `struct` and `class` tags for types.
* Use references in ranged-for where it reduces copies.
* Move private static data members out of the Style class and into
  file-local scope. There is no need for them to be in the class. Also
  marked them `const` where possible.
* Removed unused lambda capture.
* Ensure qTox can compile under NDEBUG with `-Wunused-variable` by
  inlining the unused variable into the `assert` that was its only
  target.
* Minor reformatting in core_test.cpp.
2020-04-16 19:07:40 +00:00
Anthony Bilinski
70824729ff
chore(cleanup): don't use 0 as nullptr
Don't add Wzero-as-null-pointer-constant by default, since on older Qt
versions that we stil support and that our CI runs agains, Qt API themselves
cause warnings which lead to build errors all over the place.

Fix #6008
2020-03-21 23:20:03 -07:00
Anthony Bilinski
2c1a86482a
chore(style): remove old style casts and cross sign comparisons
Enable warnings for both. Favour casting to signed rather than casting to
unsigend for comparisons. Per isocpp's core guidelines ES.102, signed
arithmetic gives more expected results. If we need one extra bit of range,
using longer signed types achives that.

Fix #6010
Fix #6012
2020-03-21 20:29:10 -07:00
jessica181920
11b34c84ef fix(i18n): Various English fixes
Consistency, typos, grammatical corrections, capitalization, punctuation,
etc.
2019-09-14 15:00:59 -04:00
jenli669
04a9bc46f4
docs(copyright): update and add copyright info
zealously updates and adds qTox copyright information.

Fixes #5713
2019-06-28 01:18:26 +02:00
Teemu Ikonen
4c42e0ea5b fix(video): support UYVY camera pixel format
Fixes #5479.
2019-01-15 13:36:09 +02:00
sudden6
3746bd13bc
fix(video): workaround for webcams that provide no fps value
fixes #5082
2018-09-29 18:42:31 +02:00
ezavod
847f155b7b
refactor(chatform): Use QStringList instead of QVector<QString>
This replaces QVector<QString> with QStringList consistently across all files.
2018-05-31 21:32:58 +02:00
Anthony Bilinski
5dc4e6de81
chore(legal): update copyright date to 2018 for all source files 2018-04-25 17:33:38 -07:00
sudden6
ff2fc18be1
fix(video): improve debug message
Distinguish between "invalid" pixel format and "unknown" pixel format
due to unsupported platform
2017-12-22 21:33:57 +01:00
sudden6
a2927de27d
fix(video): use float framerates also for V4L2
also make -1 the default value for the framerate
2017-12-22 21:33:35 +01:00
sudden6
5d6ae9ae37
fix(video): don't use pointers to temporary objects
fixes #4764
2017-11-12 13:10:35 +01:00
DX37
0fc3911318 fix: Fix incorrect headers order
Because of incorrect order, qTox on Windows can't be compiled properly.

Fixes #4220
2017-03-18 19:36:50 +06:00
Zetok Zalbavar
80f5de31b3
style: reformat current C++ codebase using clang-format 2017-02-26 11:52:45 +00:00
Zetok Zalbavar
d4ac13dbf4
revert: "refactor: Added to include path and exclude it from all includes"
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.

In case of conflicts, includes were sorted according to the coding
standards from #3839.

This reverts commit b4a9f04f92.
This reverts commit 5921122960.
2016-12-29 16:10:53 +00:00
sudden6
8d320ca3be
chore: Make building for FreeBSD easier
Add some patches from https://svnweb.freebsd.org/ports/head/net-im/qTox/
and make some things more platform independent.
2016-12-28 22:15:16 +01:00
Zetok Zalbavar
7b60a5dd36
chore: explicitly mention that copyright belongs to qTox contributors 2016-11-29 11:12:06 +00:00
Diadlo
b4a9f04f92
refactor: Added to include path and exclude it from all includes 2016-11-28 23:28:42 +03:00
Zetok Zalbavar
64bbc6cfbb
style: change postfix increment to prefix increment 2016-11-03 07:57:14 +00:00
bitok
2c03257700
refactor: fixes of static analyze warnings
There is many static analyze warnings for qTox. Fixed most dangerous and several simple.
2016-09-23 14:47:53 +01:00
Diadlo
9471065feb
style(platform): Style fixes 2016-07-13 01:54:37 +03:00
Diadlo
504ad534e0
fix(directshow): Fixed problem with crosses initialization 2016-06-25 14:20:13 +03:00
initramfs
556a8750a1
fix(video): usage of invalid file descriptors on error
Fixes code for getDeviceModes() under vfl2 namespace where error
numbers were being treated as valid file descriptors
2016-04-03 14:16:45 -04:00
Sean
f595f4f817 camera res option reduction 2016-03-21 21:17:21 -05:00
Sean Laguna
de4dcb5bd7 whoops, forgot an else in an else if 2016-01-26 13:27:32 -06:00
Sean
ded8d87ba8 generic pixel format selection 2016-01-26 13:14:58 -06:00
tux3
c576a1485a
Scan-build cleanup 2016-01-16 02:24:13 +01:00
Andrew Novikov
985def25ff Implemented screen capturing support for Mac OS X 2015-12-23 15:31:28 +03:00
Andrew Novikov
bd8a2c84ef Optimized working with strings 2015-12-23 11:03:56 +03:00
Andrew Novikov
cc64db3f27
Implemented listing and setting video modes on Mac OS X 2015-12-21 01:27:38 +01:00
Andrew Novikov
cf6623cfc8
Implemented enumeration of video devices. 2015-12-21 01:26:18 +01:00
tux3
71e26fb15b
List video devices using v4l2 directly, not ffmpeg
Turns out, FFmpeg is annoyingly unreliable when it comes to this. It ignores uvcvideo devices for example
2015-11-07 01:34:07 +01:00
Yuri
00a40f10b5 Added missing include <errno.h> 2015-06-14 20:35:17 -07: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
3cf10f02a6 Don't use tagged init 2015-06-03 02:10:53 +02:00
tux3
fe4838bb83 Video modesetting for v4l2 2015-06-03 02:10:53 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
e5522ba087 Case-sensitive includes in windows files
To make the cross-compilers happy.
2015-06-03 02:10:52 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
27bb71f195 Implement video modesetting for dshow 2015-06-03 02:10:52 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
b20ecf056d Namespaces, not ctor-deleted classes
Stupid.
2015-06-03 02:10:52 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
f0f069114c Implement DirectShow video dev listing
We can now get the list of video devices with the dshow ffmpeg device
(so, on Windows). Most of this patch is adapted from libavdevice's dshow
private internal interface, which retrieves useful info but is only
designed to log it to stdout. We reimplement that to get an actual list
of devices names/descriptions, that we can then open with ffmpeg the
refular way.
2015-06-03 02:10:52 +02:00