Commit Graph

5960 Commits

Author SHA1 Message Date
Martin Pulec
8fc614df0f RTSP cap.: use my_curl_easy_perform abstr. 2022-05-02 16:12:33 +02:00
Martin Pulec
d40233f695 rtpdec_h264.c: process NAL units in 1st pass
processing in 2nd is too late - we need to set data offset before the
second pass
2022-05-02 16:12:33 +02:00
Martin Pulec
3817102bb9 CI: do not install glib (see previous commit) 2022-05-02 16:12:33 +02:00
Martin Pulec
5ca1ed3730 RTSP cap.: get rid of glib dependency
It was needed only for base64 decode, which is perhaps needless
overhead.
2022-05-02 16:12:32 +02:00
Martin Pulec
c52375177e RTSP cap.: fixed get_nals parsing
';' is not a valid delimiter for sprop-parameters-set units according to
RFC 6185, example line from SDP:

    a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z2QAKKyyAPAET8uAiAAAAwAIAAADAZR4wZJA,aOvDyyLA; profile-level-id=640028
2022-05-02 16:12:32 +02:00
Martin Pulec
ead6aec22e RTSP capture: get_nals simplified
Simplified processing of NALs received in SDP.

- removed writing start code _after_ the serialized NAL
2022-05-02 16:12:32 +02:00
Martin Pulec
6e525b3df5 rtpdec_h264: use symbolic names for constants
+ move NAL type 0 from unhandled to invalid (only different msg)
2022-05-02 16:12:32 +02:00
Martin Pulec
5309a5e874 configure: remove debug pring 2022-05-02 16:12:31 +02:00
Martin Pulec
94bb693c8e dump disp.: check export_init return value 2022-05-02 16:12:31 +02:00
Martin Pulec
476aff2008 RTSP cap.: improved logging 2022-05-02 16:12:31 +02:00
Martin Pulec
13b3705098 RTSP cap.: fixed init crash
Fixed a crash when init fails and done function is called - check if
threads that are to be destroyed were actually created.
2022-05-02 16:12:30 +02:00
Martin Pulec
5e57ec64ae rtpdec_h264.c: print also nri 2022-05-02 16:12:30 +02:00
Martin Pulec
bfb210ade0 RTSP cap.: print curl error messages 2022-05-02 16:12:30 +02:00
Martin Pulec
67c443c785 dump disp.: small refactor
+ do not export discarded frame
+ assure that the exported frame is ours (otherwise the lifetime is
  uncertain eg. if we decide to write the frame in thread)
2022-05-02 16:12:29 +02:00
Martin Pulec
e9f8a95ea1 dump display: fixed a crash
For opaque codecs (H.264), the allocated size was actually smaller than
(maximal) data len set. That is usually not an issue, but when
destroying, the invalid maximum is exported (because PUTF_DISCARD with
unmodified frame). Steps to reproduce:

    uv -t testcard:size=1280x128 -c libavcodec:codec=H.264 -d dump
2022-05-02 16:12:29 +02:00
Martin Pulec
fad9d20ade rtpdec_h264.c: process reassembled NAL
Process reassembled NAL from fragmentation units (FU).
2022-05-02 16:12:29 +02:00
Martin Pulec
40c3821204 rtpdec_h264.c: process NAL units from STAP-A 2022-05-02 16:12:29 +02:00
Martin Pulec
c3634debae rtpdec_h264.c: reverse order of aggregate NALs fix
NAL units are put to the buffer in a reverse order (from the end of the
frame to the beginning), but aggregate (STAP-A) NAL units were processed
straight while put in the buffer from the end.
2022-05-02 16:12:28 +02:00
Martin Pulec
4a15dafa87 rtpdec_h264.c: moved NAL processing to sep. func 2022-05-02 16:12:28 +02:00
Martin Pulec
1d3db3e726 rtpdec_h264.c: simplify a bit 2022-05-02 16:12:28 +02:00
Martin Pulec
1fedeebca5 rtpdec_h264.c: small refactor 2022-05-02 16:12:27 +02:00
Martin Pulec
6a96ccc082 rtpdec_h264.c: size of NAL in STAP-A is little-end 2022-05-02 16:12:27 +02:00
Martin Pulec
16530807bb lavc conv: remove some unused sse compat 2022-05-02 16:12:27 +02:00
Martin Pulec
b1a7f2229a lavc split also to/from conv file
The combined file had ~3k lines which is quite too much.
2022-05-02 16:12:26 +02:00
Martin Pulec
d4841687c4 split libavcodec_common to multiple files
This allows use of libavcodec_common with eg. audio without to need to
include all the conversions burden.
2022-05-02 16:12:26 +02:00
Martin Pulec
512cfc181e added param to specify libavcodec logging level
The output may be flooded by decoding errors (eg. H.264) which may not
be desirable. If not specified, the verbosity level for libavcodec is
deduced from UltraGrid log level.
2022-05-02 16:12:26 +02:00
Martin Pulec
0275d4e669 register_param: warn if max params reached 2022-05-02 16:12:25 +02:00
Martin Pulec
49eb5219a0 register_param: skip repeating registr. of param
Skip repeating registration of the same parameter.

This allows registration of the param from within more modules (eg.
common file included in multiple plugins). Warning is issued if already
registered param has a different description.
2022-05-02 16:12:25 +02:00
Martin Pulec
53e6876ac7 vc_copyliner10k: pointless double cast to same type 2022-05-02 16:12:25 +02:00
Martin Piatka
053640ce69 lavc: Fix channel layouts on new API
AAC encoder didn't like unspecified layout + format was not set on
avframe
2022-05-02 13:08:53 +02:00
Martin Pulec
cc82fae908 configure: AJA fixes
- do not check for the version in Windows (cannot be checked as it is
  implemented)
- dropped NTV2 12 compat - this wouldn't definitely compile, as we
  require approx. NTV2 16 as indicated in the particular test
2022-04-27 12:10:39 +02:00
Martin Pulec
e2f5be909c GL: set GLFWmonitor after glfwInit called
+ missing newline
2022-04-26 16:45:44 +02:00
Martin Pulec
e9e2edc67b GLFW: improved init handling (print error) 2022-04-26 16:45:44 +02:00
Martin Pulec
54aa7c2c8a configure: check for AJA version at least 16 2022-04-26 16:45:43 +02:00
Martin Piatka
a1c57f2511 display/multiplier: simplify config parsing 2022-04-26 15:55:22 +02:00
Martin Piatka
196d5db590 display/multiplier: use smart pointer for state creation 2022-04-26 15:55:21 +02:00
Martin Pulec
4781a001a5 GL: improve code flow
Encapsulate all GL-related init/deinit code to display_gl_init_opengl
and display_gl_cleanup_opengl.

Also detach context after init(), before and after run() and before
done(). This keeps the module independent from context (some other part
of UG may detach the context and attach a different).
2022-04-26 11:32:17 +02:00
Martin Pulec
f43d2a82c2 GL: fixed a race condition
Make complete initialization in _init function from now - _run must be
run from main thread now (even if not, the context may be detached and
reattached in a thread.

A race condition occurs when poison pill is passed and the content is
not fully initialized (_run function). Then putf function doesn't mark
the window for deletion, because it has not been created yet and as a
result, the run loop keeps running.
2022-04-26 11:17:05 +02:00
Martin Pulec
dabd87eb8e GL: document gl-disable-10b param 2022-04-26 09:13:44 +02:00
Martin Pulec
12c6c76655 fixed pacman auto-confirmation in previous commit
+ fixed PATH (missing $)
2022-04-25 09:28:23 +02:00
Martin Pulec
0bd1dfc569 CI Win lib555: use ld from binutils
lld (from clang) didn't work

Fixes failed run:
https://github.com/CESNET/UltraGrid/actions/runs/2207798105
2022-04-22 16:34:41 +02:00
Martin Pulec
a407bfcbfc GL: register refresh callback
instead of rendering last frame in gl_resize
2022-04-22 14:35:38 +02:00
Martin Pulec
03667cfc79 GL: call ShouldClose only if there is a window
Init is currently done in _run function, thus if window creation fails,
poison pill is passed which caused a crash.
2022-04-22 14:22:37 +02:00
Martin Pulec
b80fcf18ab GL: use adaptive vsync by default
This seems to be better default behavior. Moreover it does behave more
nicely when resizing windows in Wayland (with Wayland GLFW backend).
2022-04-22 14:20:44 +02:00
Martin Pulec
d64468545b lavc: enable intra-refresh for NVENC with patch
see commits e3c926c8 and 1f735a93

We patch FFmpeg in Linux CI builds so if it is patched, intra-refresh
sitll can be enabled, even though not by default.
2022-04-22 11:32:53 +02:00
Martin Pulec
e9837ed947 CI: patch GLFW for mac for higher bit depth 2022-04-22 11:32:48 +02:00
Martin Pulec
bf3b2b3b9a GL: enable needless loading of vdpau functions
already loaeded by glew
2022-04-21 14:26:14 +02:00
Martin Pulec
b5b4e14cf4 GL: use time_ns_t instead of tv 2022-04-21 12:15:11 +02:00
Martin Pulec
84441bd709 GL: state_gl - move initializers to members 2022-04-21 12:13:52 +02:00
Martin Pulec
b3cffa2f69 GL: allow specifying monitor for fullscreen 2022-04-21 12:08:13 +02:00