Commit Graph

46208 Commits

Author SHA1 Message Date
Francois Cartegnie 98c86d8787 demux: hls: fix AAC regression with "es" demuxer
For some reason AAC is not part of the probing sequence,
it then can't activate without shortcut/forced naming.

(cherry picked from commit 2396e15bd5)
2022-03-09 21:32:52 +01:00
Francois Cartegnie 8dc979d578 codec: avcodec: use filtered/best effort pts
fixes playback/stuttering with wrong mux/monotonically
increasing pts on frames that must be reordered.

no change for regular pts.

(cherry picked from commit 0834d39352)
2022-03-08 11:18:16 +00:00
Thomas Guillem e63e7a0634 qt: fix typo in mouse event handling
Fixes #26684

Regression from d5e53764ba
2022-03-08 10:22:59 +00:00
Thomas Guillem 8bff7178c7 smb2: fix pf_read return values
0 should be returned in case of EOS or error, -1 means EAGAIN.

/me blames me for not reading the documentation.

(cherry picked from commit 249a76b921)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2022-03-07 09:21:03 +01:00
Thomas Guillem 4063c515ea nfs: fix pf_read return values
0 should be returned in case of EOS or error, -1 means EAGAIN.

/me blames me for not reading the documentation.

(cherry picked from commit 59a3d85dd2)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2022-03-07 09:20:04 +01:00
Lionel Landwerlin 0cc084b032 vaapi: add support for DRM modifiers
DRM modifiers communicate a description of the data layout in the buffers
exported/imported through various API.

On Intel HW this exports tiling information as well as potential compression.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit 3633417edb)
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2022-02-26 07:24:25 +00:00
Vikram Fugro e4869da270 gstdecode: handle fourcc mismatch between gst vlc
Add raw video fourcc conversion support to convert
from gstreamer representation (for strings that are
not equal to length 4) to vlc representation.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit a6c52d8943)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2022-02-22 11:26:25 +00:00
Tristan Matthews 7ecfff9487 gstdecode: add AV1
(cherry picked from commit 5820200442)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2022-02-22 11:26:25 +00:00
Vikram Fugro f12b4ed700 gstdecode: Add support for more video codecs
Add support for vp9 and hevc

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 9894f84b12)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2022-02-22 11:26:25 +00:00
Mitch Capper d3e78c235b croppadd: handle metadata rotated videos
(cherry picked from commit 419ad46d79)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2022-02-22 10:49:01 +00:00
Zhao Zhili d0b9175040 access_output/srt: send data in payload_size chunks
Fix #26048

To avoid sending a lot of small UDP packets.

(cherry picked from commit 84bc80de23) (rebased)
rebased:
* 3.0 doesn't have struct typedefs

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili 4c7cf49f5c access_output/srt: simplify always true condition
(cherry picked from commit 853df2675c)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili 29faf90e38 access_output/srt: obsolete SRT_PARAM_CHUNK_SIZE
It's the same thing as SRT_PARAM_PAYLOAD_SIZE.

(cherry picked from commit c90ef66a55) (edited)
edited:
* 3.0 doesn't have struct typedefs
* 3.0 has advanced parameter in some settings

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili d7146aca48 srt: comment out too verbose log
(cherry picked from commit e6b547ccdc)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili 67faec3332 srt: initialize p_sys->sock to SRT_INVALID_SOCK
Otherwise the zero initialized p_sys->sock will be closed in
srt_schedule_reconnect().

(cherry picked from commit e452063d6e) (rebased)
rebased:
* 3.0 has vlc_mutex_destroy()

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili e010ae8e47 srt: Fix missing srt_cleanup on error path
(cherry picked from commit 52e3f716bc) (rebased)
rebased:
* 3.0 is freeing psz_host

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Zhao Zhili 2534aa80b5 srt: obsolete SRT_PARAM_CHUNK_SIZE and SRT_PARAM_PAYLOAD_SIZE
Firstly, SRTO_PAYLOADSIZE has no effect for receiver. Secondly,
since there is no negotiation of payload size between sender and
receiver, the receiver should use a buffer at least
SRT_LIVE_MAX_PLSIZE bytes, otherwise the data can be truncated.
So the default value of option SRT_PARAM_CHUNK_SIZE is
inappropriate. User may know exactly the sender's payload size
to set the value for SRT_PARAM_CHUNK_SIZE, but there is no much
gain for doing that.

(cherry picked from commit 0b0cc7ff60) (edited)
edited:
* 3.0 had the advanced flag in obsolete parameters

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Yohann D'ANELLO e19fdb24d2 srt: add stream ID option
This patch allows the use of the streamid option when using the SRT
protocol.  For example, we can query the URL
srt://localhost:9710?streamid=demo if a stream server is listening on
localhost:9710 that supports multiple streams on the same server. Like
the others already implemented, this parameter can be overwritten in the
settings of the transport.

In a future patch, it may be good to support the full options.  The
complete list can be found here:
https://github.com/Haivision/srt/blob/master/docs/APISocketOptions.md#list-of-options
A human-friendly version of this list can be found in the ffmpeg
documentation: https://ffmpeg.org/ffmpeg-all.html#srt

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit a55c95a9cc)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Julien Montant 8db1f5e94f srt: fix build issue with recent SRT library
The deprecated macro `SRTO_TSBPDDELAY` has been deleted from SRT.
This prevents the compilation with SRT versions >= v1.4.2.

See the corresponding SRT commit 0e2201aff6b379979cec43fee5e8f162717f6346.
```
-   SRTO_TSBPDDELAY = 23,     // DEPRECATED. ALIAS: SRTO_LATENCY
```

The (unrecommended) `SRTO_LATENCY` should be used instead, which was
already available back then. See notice next to SRTO_LATENCY in the SRT
library source code for details on why it's not recommended.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
(edited message)
(cherry picked from commit 6e8d774311)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Francois Cartegnie 9b590f6e2e access: srt: use define for variables
(cherry picked from commit 179579703b)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Aaron Boxer b397367596 srt: fix bug in setting passphrase
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit ce386056d0)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Thomas Guillem 6b7bc6e2ec access_out: srt: fix missing config.h include
(cherry picked from commit e7e608e84e) (rebased)
rebased:
* 3.0 doesn't have struct typedefs

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Aaron Boxer d5f59f92e0 srt: parse url and set options
for latency, maximum bandwidth, etc.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit f98585725a) (edited)
edited:
* 4.0 used N_() on removed strings
* 3.0 needs advanced flag for add_password()

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Aaron Boxer 9ef542afc0 srt: move common code to single file
1. code can be shared between access/srt.c and access_output/srt.c
2. created a URL parser for SRT parameters stored in URL

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit 15dea8ecb8) (edited)
edited:
* access out was missing dummy.cpp on 3.0

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Roman Diouskine d1a26ef553 srt: Read several chunks per blocking read call
libsrt input is asynchonously buffered internally and it makes sense to empty
those receive buffers as much as possible on every signaled receive event from
epoll. Doing so reduces context switching/re-scheduling and improves
performance.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit ca7b0fcc33) (rebased)
rebased:
* master has direct stream_sys_t typedef

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Olivier Crête bcd9305655 srt: Remove eof code
It is possible to get an empty read from libsrt and it should not be treated as
EOF.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
(cherry picked from commit 34048bef8e)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Rémi Denis-Courmont 4524690456 srt: remove tautology
(cherry picked from commit 90b7919115)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Rémi Denis-Courmont 55dd7e85e3 srt: remove tautology
(cherry picked from commit d36c9ea4d1)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Rémi Denis-Courmont a72f1f8d94 srt out: remove redundant code
(cherry picked from commit ae882e1872)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Rémi Denis-Courmont aed2108cd1 srt: remove redundant code
(cherry picked from commit 198f754d83)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-17 13:46:14 +00:00
Francois Cartegnie 08b36ec7e3 demux: avformat: fix IORead EOF value
(cherry picked from commit b7c97da03b)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2022-02-17 06:55:51 +00:00
Thomas Guillem 58aba0bc59 samba: limit the read size
Fixes #22909

(cherry picked from commit abf527b59d)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2022-02-17 06:38:27 +00:00
Ronald S. Bultje b15e4043c6 dav1d: continue decoding on recoverable errors
Fixes #26259 (closed), #26579 and dav1d/#383.

(cherry picked from commit e890cc9233)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2022-02-15 20:00:02 +01:00
Steve Lhomme f61e85e786 zvbi: do not link against non existent pthreadGC2
(cherry picked from commit f91f18e43c) (edited)
edited:
* master had it for winstore only

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
2022-02-11 09:48:02 +01:00
Steve Lhomme 5c999faac3 d3d11: release the debug interface we queried
The doc doesn't say we have to release it but it makes sense. If it was received
by a ComPtr it would be.

Similar to b8e1ef211c on 4.0
2022-02-10 13:51:27 +00:00
Peter Frost d44f57277c debux: adaptive: Fix missing vlc_tick macro 2022-01-27 10:54:02 +00:00
Ilkka Ollakka 9786741620 avformat: remove pts hack on recent libavformat
The field AVStream.cur_dts has been removed in libavformat 59.2.103.

Refs vlc4/c2ba623f0ad425e7743fca0bdc251d5bc9289e77
Refs ffmpeg/591b88e6787c4e678237f02a50421d101abd25c2
2022-01-22 12:16:50 +00:00
Mehdi Sabwat 00bd7590f3 avformat: add support for url field in AvFormatContext
Since Jan 21, 2018 filename field was deprecated in favor
of `url` which now has no length restrictions.

From doc/APIChanges:
```
2018-01-28 - ea3672b7d6 - lavf 58.7.100 - avformat.h
  Deprecate AVFormatContext filename field which had limited length, use the
  new dynamically allocated url field instead.
```

The URL field is freed by libavformat in avformat_free_context() in
avformat_CloseMux().

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
(cherry picked from commit a2ce2e3a84)

Refs ffmpeg/30f7021aa0be2c978aefb73894b643c9bafbf51c
2022-01-22 12:16:50 +00:00
Ilkka Ollakka 6feb18dadc avcodec: move picture type to use sidedata on encoding
Sidedata AV_PKT_DATA_QUALITY_STATS has been present since 2015 on
version 56.51.100. Also previous coded_frame->pict_type doesn't seem to
be present anymore in ffmpeg master.

(cherry picked from commit 8ed4f2a7a2)

Refs ffmpeg/11bc79089378a5ec00547d0f85bc152afdf30dfa
2022-01-22 12:16:50 +00:00
Romain Vimont 781082eea3 avcodec: replace removed FMT_VAAPI_VLD enum value
Replace AV_PIX_FMT_VAAPI_VLD by AV_PIX_FMT_VAAPI.

libav/d264c720f7b74286840719e506daba39f83b438b (deprecation)
ffmpeg/9f8e57efe4400ca86352277873792792279c3b15 (deprecation)
ffmpeg/ad524cb9eeb298f7a60d923094fbebb1fda7e0e3 (removal)
2022-01-22 12:16:50 +00:00
Romain Vimont bd8533e0c8 avcodec: fix condition to use AVFrame.pkt_pts
The field AVFrame.pkt_pts was removed in lavc 56.24.0 / 57.61.100:

> Decoders now export the frame timestamp as AVFrame.pts. It was
> previously exported as AVFrame.pkt_pts, which is now deprecated.

Fix the inverted deprecation check and use LIBAVCODEC_VERSION_CHECK() to
target the exact version.

Refs vlc4/991ba74b018a201cc6cc73da713fb3d62fd7ff60
Refs ffmpeg/32c8359093d1ff4f45ed19518b449b3ac3769d27 (deprecation)
Refs ffmpeg/6e30b35b85b81c802e52a1078ec7a3097e353c6d (removal)
2022-01-22 12:16:50 +00:00
Romain Vimont abb201b793 avcodec: do not use field removed in API 60
AVCodecContext.thread_safe_callbacks will be removed in API 60:

> Thread-unsafe get_buffer2() implementations will be invalid starting
> with LIBAVCODEC_VERSION_MAJOR=60; in other words, libavcodec will
> behave as if this field was always set to 1.

In current FFmpeg 5.0 (API 59), we must still set the variable, and it
is already deprecated, so we can't get rid of the deprecation warning.

ffmpeg/a83098ab03a47179d54a9b9c8bcefc81b9c6aafd (deprecation)
ffmpeg/54e5d21acabb452e5680de5db3bf7567d351d68e (doc)

(cherry picked from commit 02e8981b57)
2022-01-22 12:16:50 +00:00
Romain Vimont 07e0beb5b6 avcodec: adapt AVCodec API constification
Refs ffmpeg/626535f6a169e2d821b969e0ea77125ba7482113

(cherry picked from 3312a960cb)

The condition has been adapted from the original commit because VLC3
supports both ffmpeg and libav contrary to VLC4.
2022-01-22 12:16:50 +00:00
Romain Vimont 591f658223 avformat: adapt AVInputFormat API constification
Refs ffmpeg/56450a0ee4fdda160f4039fc2ae33edfd27765c9

(cherry picked from commit 5069e1cc38)

The condition has been adapted from the original commit because VLC3
supports both ffmpeg and libav contrary to VLC4.
2022-01-22 12:16:50 +00:00
Romain Vimont 66b647fd69 avformat: adapt AVOutputFormat API constification
Refs ffmpeg/56450a0ee4fdda160f4039fc2ae33edfd27765c9

(cherry picked from commit d0710040f0)

The condition has been adapted from the original commit because VLC3
supports both ffmpeg and libav contrary to VLC4.
2022-01-22 12:16:50 +00:00
Niklas Haas 37bf74e664 opengl: drop unneeded GetIntegeri_v
This causes issues on some platforms, and we don't need it
2022-01-18 18:03:48 +01:00
Niklas Haas 645cbd6fac opengl: don't error on no-op libplacebo shader
See 6efc345d81
2022-01-18 17:21:47 +01:00
Niklas Haas 6d145e38c0 opengl: vout_helper: use pl_shader_params.glsl
This is the proper way to limit the GLSL version when using standalone
shaders without an associated GPU backend.
2022-01-18 17:07:25 +01:00
Niklas Haas 110d69c824 Revert "opengl: vout_helper: use pl_gpu_dummy for shaders"
This reverts commit 2437484d76.

The referenced commit is not a good way of fixing the issue described in
its commit message. Attaching a dummy GPU to the pl_shader makes the
shader think a GPU is actually available, and can lead to e.g. the use
of a dither texture (which VLC has no mapping code for, and would thus
result in a shader compilation error).

All of the queried limits are also irrelevant for the way we use shaders
in this code, since they only affect GPU resources (which we can't use)
or texture sampling (which we don't use).

Fixes #26503 by removing the conflicting code
2022-01-18 16:47:22 +01:00
David Fuhrmann eb73710144 macosx: Support safe area of new M1 macs for VLC fullscreen
New M1 Macs contain a notch, covering part of the screen. Analog to
the Quicktime player, when implementing VLCs internal fullscreen,
the video is scaled inside the safe area of the notch only, leaving
the top area black.

Fixes #26291
2022-01-17 07:35:43 +00:00