Commit Graph

161 Commits

Author SHA1 Message Date
Martin Pulec
4734c9e983 removed few next rang.hpp uses 2023-09-19 13:47:11 +02:00
Martin Pulec
2f995895c8 rename indent_paragraph to wrap_paragraph
More suitable name - the function doesn't indent but just wraps long
lines.
2023-09-15 15:36:41 +02:00
Martin Pulec
15d0f4ae55 removed capture_filter none
This capture filter is never initialized now (if none capture filter is
given, empty list of capture filters is used).
2023-08-09 16:08:30 +02:00
Martin Pulec
3639d00dbf replaced not thread-safe *rand48 functions
Use rand_s() in Windows and random() in POSIX systems.
2023-08-02 10:07:19 +02:00
Martin Pulec
0658f483d0 supressed capture_filter wrapper Coverity issues
All are false positive provided that the wrapped capture filter correctly
sets its `dispose` callback.
2023-07-26 09:50:44 +02:00
Martin Pulec
43972b36ea fixed CIDs 4167{1,2,3,4,5,7,8} 2023-07-25 09:32:15 +02:00
Martin Pulec
bc5e580b43 override_prop: added also (wrapped) postprocessor
from capture filter of the same name
2023-07-20 09:36:50 +02:00
Martin Piatka
bde173d23b capture_filter/preview: Add rate_limit option 2023-06-27 15:36:16 +02:00
Martin Piatka
d59ea6ed7d capture_filter/preview: Add option for higher quality downscale 2023-06-27 15:36:16 +02:00
Martin Pulec
cbfba4f840 override_prop c. f.: allow size and codec override 2023-06-27 09:55:51 +02:00
Martin Pulec
5555315b5c added override_prop cap. f.
This allows overriding some video props (only in metadata), eg.
25p->50i. Currently only FPS + interlacing change is supported.
2023-06-21 16:37:49 +02:00
Martin Pulec
3d9bc677c8 OpenCV 2 compat
OpenCV 2 (at least in CentOS 7) has the imgproc.hpp header in
(opencv2/)imgproc/ subdirectory. Instead of tweaking the location,
include opencv.hpp directly if available (as it was before 2db2a73803).
2023-06-08 15:42:51 +02:00
Martin Pulec
194849ad2b added video capture filter ratelimit
Limits frame rate to specified value.

This can be used if source doesn't keep its nominal frame rate, as some
Magewells do and use higher.

Another use case is just to limit the framerate from eg. 60 to 25 (which
are coprimes, for 60 and 30, already existing capture filter 'every')
can be used.
2023-05-24 09:35:17 +02:00
Martin Pulec
3a8440a650 fixed build of blank without libavcodec 2023-05-05 08:50:09 +02:00
Martin Pulec
50ad3976e7 flip: moved to C 2023-03-24 14:06:50 +01:00
Martin Pulec
992ab73530 blank,grayscale,mirror,resize cf: rewritten to C 2023-03-17 15:04:29 +01:00
Martin Pulec
1dff77f9c1 display cap. f.: usage if not given + warn
- print a warning if no configuration was given (is mandatory)
- warn that the display is experimental
2023-03-17 14:11:36 +01:00
Martin Pulec
43d9c936b8 video_codec: removed attribute "slow" for convs
The concept of fast/slow decoders was obsolete and not a supported way -
the preferred way nowadays is to use the generic comparator and
alternatively let user selecting a policy. Also, it was error prone
whether or not mark the conversion as slow or fast. Also the order in
the array was important.

Subsequently replaced get_fastest_decoder_from() with
get_best_decoder_from() calls - in the occurences where it was used,
both calls will likely to end up with the same result, anyways
(candidate set is usually something like RGB,RGBA and UYVY).
2023-03-07 08:28:24 +01:00
Martin Pulec
7381043a18 color cap. f.: fixed wrong dst_len
Was input pixel block size but should be the output.
2022-11-28 12:03:04 +01:00
Martin Pulec
02e1cfc667 logo: improved err logging + moved to C 2022-11-28 09:30:45 +01:00
Martin Pulec
12d818ea19 save_video_frame_as_pnm: use pam_write
use current version of pam.h from GPUJPEG that supports writing PNM
2022-11-28 09:19:34 +01:00
Martin Pulec
05d34dc928 PAM: import latest version from GPUJPEG 2022-11-25 11:02:20 +01:00
Martin Pulec
62f143f939 config_common.h: removed macros.h include 2022-11-22 14:50:19 +01:00
Martin Piatka
7cb9771962 Move tokenize and sv_parse_num into string_view_utils 2022-11-10 12:04:41 +01:00
Martin Pulec
2db2a73803 resize cap. f.: replace opencv.hpp -> imgproc.hpp
Replaced generic opencv.hpp with imgproc.hpp - the former one includes
dependencies on headers that may not be available (at least U18.04 has
this header in -core but references also non-core components).
2022-10-21 12:18:58 +02:00
Martin Piatka
871147c075 cap_filter/preview: Use get_temp_dir() 2022-09-13 13:54:22 +02:00
Martin Pulec
ecba764e57 moved libavcodec_common to libavcodec/lavc_common 2022-08-18 11:20:38 +02:00
Martin Pulec
65557d112d get rid of rang.hpp dependency through color_out.h
Removed indirect dependency on rang.hpp through color_out.h. Now only
remaining dependencies on rang.hpp are direct.

+ fixed escape sequence for foreground magenta
2022-08-17 17:24:34 +02:00
Martin Piatka
291483c156 preview: "key" parameter to support multiple instances
... without specifying full path
2022-08-16 09:59:59 +02:00
Martin Piatka
27af581e1d capture preview: Fix hang on exit if socket doesn't exist 2022-08-16 09:56:33 +02:00
Martin Piatka
3257e5a036 capture preview: Allow escaping of ':' in config 2022-08-16 09:56:32 +02:00
Martin Pulec
0d793a0836 matrix.c: avioid multiple evaluation
same as previous commit
2022-08-11 12:10:56 +02:00
Martin Pulec
6b28716d30 replaced MIN/MAX with CLAMP 2022-08-11 12:10:56 +02:00
Martin Pulec
34eb23cb12 Added "color" capture filter and postprocess
The motivation for this filter currently is to measure compression
latency in UltraGrid, eg.:

    uv  --verbose=+timestamps --capture-filter color -t testcard:pattern=gray \
     -d dummy -p color [-c libavcodec]
2022-08-05 16:11:46 +02:00
Martin Pulec
2e424d50ca replaced instances of color_out with color_printf
+ reindent vidcap/file help ("where" keyword)
2022-08-04 14:07:45 +02:00
Martin Piatka
d3b66af4c2 cap_filter/preview: Add help 2022-06-24 13:40:23 +02:00
Martin Piatka
10b2cd4066 cap_filter/preview: Switch to unix socket based ipc 2022-06-24 13:40:23 +02:00
Martin Pulec
afaccbb3e4 capture_filter/display: fixed a leak
fixes CID 395233
2022-06-21 10:21:32 +02:00
Martin Pulec
d19f6a5329 display cap. f.: use decoder if needed
Use decoder if display doesn't natively support the pixel format.
2022-06-01 11:22:01 +02:00
Martin Pulec
474c4dd7cc added display capture filter 2022-06-01 11:22:00 +02:00
Martin Pulec
7b1837c668 video_codec: removed slow parameter from get_decoder_from_to 2022-05-30 15:38:48 +02:00
Martin Pulec
0fd508cfb8 video_codec.c: rename get_pf_block_size->bytes
Renamed get_pf_block_size to get_pf_block_bytes.
2022-05-24 10:31:27 +02:00
Martin Piatka
f557dd4028 resize_utils: Ignore opencv warnings 2022-03-22 15:49:11 +01:00
Martin Pulec
a73168960f Capture filt.: added help where missing + hide some
Added usage to modules where was missing + hide some modules (preview,
none) that are not useful from command line.
2022-01-18 11:34:50 +01:00
Martin Pulec
1b2d05ce27 Capture filter: pass "" as opts if none given
Pass "" as opts if none given on command line.

This is also consistent with other parts (eg. video capture, compress)
and it reduces some complexity from modules.

Some modules needed to be fixed.
2022-01-18 10:41:37 +01:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
f49012c9a1 Added disrupt (jitter) capture filter
For debugging only.
2021-09-14 08:40:03 +02:00
Martin Pulec
c35083fa91 Suppress clang warnings 2021-09-08 08:25:10 +02:00
Martin Pulec
f584b6ed53 Mark some warnings in headers
Setting pragma explicitly to warning allows user to compile with -Werror
without errors induced by headers.
2021-08-10 09:07:18 +02:00
Martin Pulec
f2814cf3dd Replaced some occurences of default {r,g,b}-shifts
Replaced only those occurences that are implicitly default.
2021-08-09 14:33:03 +02:00