Commit Graph

59 Commits

Author SHA1 Message Date
Martin Pulec
b77f1de071 vcompress: fix multi-tile lavc
fixes the commit 69024468 (from 2022-08-18) that has broken:
`uv -F split:2:1 -t testcard:fps=30p -c lavc`

The problem is that the `tile_cnt` was set _prior_ to the vcompress
state reconfigure, which will yield 2 states. But prior that, the count
was 1. The task was started for tile_cnt (== 1) but waited upon for
separate_tiles.size() (== 2)!
2025-08-11 08:59:17 +02:00
Martin Pulec
976e9ef2e7 vcomp/lavc: fix init fail
Due to recent changes, libavcodec initialization fails because trying
to register the lavc module prior to vcomp.

This crashes due to the recent changes but it has been a dark zone so far.

Initialize the vcomp module correctly prior to the lavc.

+ add assert to module_register that would catch this problem
2025-06-18 12:10:03 +02:00
Martin Pulec
e056d786f1 video_compress: module state changes to void *
The internal state of compression module is now simply (void *) as in
other modules. The (module *)-typed vesion was actually unnecessary
because except lavc, no module reads messages. Also the idea of universal
API with struct module didn't make it in the end.

This complements the commit 0557730 that did simlarly for external
vcompress API.
2025-06-04 11:13:26 +02:00
Ben Roeder
a62fe80c3f Fix spelling errors throughout codebase
Corrected various spelling mistakes in comments, documentation, and
variable names across the project. Changes include:
- Documentation files (CONTRIBUTING.md, README.md, etc.)
- Source code comments in C/C++ files
- Function parameter names and descriptions

No functional changes were made.
2025-06-01 18:03:40 +01:00
Martin Pulec
5562f13dc6 video_compress: move frame instead of cpy
optimization, CID 472142; actually doesn't matter much
2025-04-16 12:47:20 +02:00
Martin Pulec
0557730fc1 video_compress: del state with compress_done
The whole stuff with generic modules is mostly abandoned and
module::deleter should not be used, anyways.
2024-03-08 16:11:48 +01:00
Martin Pulec
b6bf6b62ea vcompress: prefix compress frame info with MOD_NAME 2023-10-25 15:01:59 +02:00
Martin Pulec
8d6f622c6e video_compress_info::name no longer used
* removed unused function returning the name
* mark attribute as unused (so that it can be safely removed eg. with
next API change)
2023-10-06 11:19:10 +02:00
Martin Pulec
cb960a3230 compress: fixed async frame API usage
broken since 18th Aug '23 (commit 69024468) - missing early return
2023-09-05 14:17:31 +02:00
Martin Pulec
2179179b77 video compress sync frame API: follow tile API
Updated sync frame API to match updated tile API as defined by the
commit  e9a407ad.

Note: none of 2 compression using this API currently need reading
additional frames.
2023-08-18 12:25:40 +02:00
Martin Pulec
3943cc739d video compress async tile: removed frame erasing
There was a comment that the frame is no longer valid, which was a bit
misleading, because the the tiles hold reference to that frame but do
not modify it in any way.

Also removed assigning NUL altogether - it was not much functional,
since it will be released soon thereafter, anyways, so it is possibly
not much needed.
2023-08-18 12:25:40 +02:00
Martin Pulec
690244686a Compress sync tile API: fetch additional frames
Modified the API in order to fetch additional frames from compression
with iterative passing NULL pointer (similarly as for audio).

This is particularly usefull when inter-frame compression outputs 2
frames at once, which can occur when B-frames would be enabled. It,
however sometimes happen even when B-frames are disbled, eg. with
h264/hevc_mf HW encoder on AMD (AMDh265Encoder; see commit d70e2fb3c).

Please note that semantic of passing NUL frame is different in this API
to that in async API, where it works as a poison pill.
2023-08-18 11:07:57 +02:00
Martin Pulec
d17c5ea24c removed platform_time.c + references
get_time_in_ns() should be used instead time_since_epoch_in_ms(). Having
both may be misleading and may lead to errors when interchanged.
2023-08-08 15:32:29 +02:00
Martin Pulec
f8ffe194aa video compress: print duration with usec precision 2023-06-26 11:37:25 +02:00
Martin Pulec
42b3fc1558 common handling of modules printing usage
Return a macro ((void *) 1) from modules returning pointer to signalize
that help was printed (for correct UG return value). This replaces the
old behavior when module class specific value (eg. &display_init_noerr)
was returned.
2022-10-12 12:05:19 +02:00
Martin Pulec
0f50bc2cb9 dismiss Coverity CID 383366 383369
The null init value doesn't need to be explicitly given, thus avoid it
to dissmis the Coverity warning.
2022-02-21 15:32:02 +01:00
Martin Pulec
886dd1b908 Video compress: improved documentation 2022-01-18 15:35:40 +01:00
Martin Pulec
1950e6f5fd video_compress.cpp: use logger 2021-11-15 14:48:27 +01:00
Martin Pulec
1b3b27eb7c Updated copyright dates for modified files 2021-11-08 15:43:14 +01:00
Martin Pulec
8162fff79e Video compress: ensure that poisoned pill was passed
Caller was obliged to pass it but pass it anyway if it wasn't (eg. when
the compression used anywhere else).
2021-04-29 16:59:06 +02:00
Martin Pulec
f535e886be Compress: small formatting fix 2019-11-29 17:20:04 +01:00
Martin Pulec
31d9809fcd Updated documentation
Updated authors, copyright to 3-clause BSD (where possible) and file-level Doxygen
2019-11-09 13:47:11 +01:00
Martin Pulec
75fd88c7c3 Show hidden modules when fullhelp is given
+ updated copyrights in that files
2019-11-06 15:26:17 +01:00
Martin Pulec
fffa4b801a Increase some log messages' level 2019-10-30 13:40:19 +01:00
Martin Pulec
e2848647fa Print compressed size and time in verbose mode 2019-10-11 10:21:30 +02:00
Martin Pulec
8a45c78314 Fixed warnings
- added (const char *) attribute to param_u union to avoid casting away
  const warnings
- added also (const void *) and (volatile void *) for the rest
- there was a typo in computing requested_mtu causing violating sequence
  point evaluation order
- alsa_get_pcm_state_name: added attribute unused
- audio/utils.cpp: different signdness
- audio/utils.cpp: different signdness
- split capture filter: useless dispose_frame
- video_compress: not copying whole string (with strncpy)
2019-06-14 08:55:07 +02:00
Martin Pulec
7db96528cf Name threads 2019-05-30 11:38:05 +02:00
Martin Piatka
835239498d Separate async frame and async tile APIs 2019-03-13 15:00:05 +01:00
Martin Piatka
563e6190f0 Support encoding frames with more tiles using async API 2019-03-13 10:50:06 +01:00
Martin Pulec
328decfc75 Fix of previous commit 2016-03-11 11:02:35 +01:00
Martin Pulec
5e8addd705 Control socket: report compression duration 2016-03-10 17:22:13 +01:00
Martin Pulec
fe727f8a45 Video compress hot fix 2016-02-22 17:43:08 +01:00
Martin Pulec
6badd143f5 Video compress: added Async API 2016-01-13 11:22:03 +01:00
Martin Pulec
a68f4e58bb Capabilities: print available display devices 2015-12-10 14:42:29 +01:00
Martin Pulec
201a72bb16 Video compress: use new module API 2015-09-22 17:22:41 +02:00
Martin Pulec
40abd1d403 Video compress: change API for querying caps 2015-09-18 15:27:11 +02:00
Martin Pulec
dfe499ac25 Some small fixes (GCC 5.1 warnings) 2015-09-08 17:30:55 +02:00
Martin Pulec
2cc6aab0e2 Added possibility to send message synchronously
+ in capabilities list, given bitrate is computed according to the
  detected capture format (provided that '-t' argument is given)
2015-08-25 17:05:23 +02:00
Martin Pulec
811af5881f Hd-rum-transcode: fixed crashes on exit 2014-12-02 13:15:32 +01:00
Martin Pulec
c49e0bc473 OpenSSL encryption: build as a library
+ added API for universal module
2014-10-15 15:50:25 +02:00
Martin Pulec
fec3c13a18 Rename message_queue to synchronized_queue 2014-10-09 13:53:07 +02:00
Martin Pulec
00ce812db3 Couple of small fixes (mainly leaks) 2014-10-08 17:39:04 +02:00
Martin Pulec
0a2b2af1a4 Fixed video compress reconfiguration 2014-09-27 23:35:06 +02:00
Martin Pulec
109978aa9a Changed video compress modules handling (API) 2014-09-26 16:27:02 +02:00
Martin Pulec
607d1df324 Wrap some video_frame occurences by shared_ptr
This should replace .dispose member in video_frame in future.
2014-09-24 12:36:01 +02:00
Martin Pulec
36de41ad86 Added uncompressed video to capabilities 2014-09-18 14:58:03 +02:00
Martin Pulec
5fec1a3a5b Video compress capabs: typo 2014-09-12 13:36:18 +02:00
Martin Pulec
f9319b4019 Capabilities listening: show only runable capabs 2014-09-11 12:47:02 +02:00
Martin Pulec
643cfc905b Video compress: remove unused async funcs from API 2014-09-11 11:47:31 +02:00
Martin Pulec
820b95be40 Video compress capabilities - added more info
Added information about latency and resource usage for individual
compressions.
2014-09-10 14:36:46 +02:00