vlc.git
10 months agosrt: add stream ID option
Yohann D'ANELLO [Wed, 28 Oct 2020 13:36:37 +0000 (14:36 +0100)]
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>
10 months agodemux: asf: check data object range when reading
Francois Cartegnie [Wed, 4 Nov 2020 09:10:47 +0000 (10:10 +0100)]
demux: asf: check data object range when reading

10 months agoavcodec: remove reset of AVCodecContext draw_horiz_band field
Zhao Zhili [Thu, 8 Oct 2020 12:02:00 +0000 (14:02 +0200)]
avcodec: remove reset of AVCodecContext draw_horiz_band field

The draw_horiz_band field is initialized to NULL by libavcodec. It
doesn't been modified since then, so there is no point to reset it
again.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
10 months agoyoutube.lua: support new HTML code layout
Pierre Ynard [Tue, 3 Nov 2020 00:20:21 +0000 (01:20 +0100)]
youtube.lua: support new HTML code layout

This new layout is apparently getting phased in. As major differences,
line splitting is more erratic (with overall 10 times fewer lines for a
slightly bigger HTML document), and the main stream configuration isn't
subjected to double JSON string encoding anymore.

10 months agoyoutube.lua: stricter check for applying peek() long line workaround
Pierre Ynard [Mon, 2 Nov 2020 23:46:46 +0000 (00:46 +0100)]
youtube.lua: stricter check for applying peek() long line workaround

Required with a new HTML code layout apparently getting phased in

10 months agoyoutube.lua: more robust meta tag metadata parsing
Pierre Ynard [Mon, 2 Nov 2020 23:38:49 +0000 (00:38 +0100)]
youtube.lua: more robust meta tag metadata parsing

Required for a new HTML code layout apparently getting phased in

10 months agoyoutube.lua: stop trying to double XML-decode title metadata
Pierre Ynard [Mon, 2 Nov 2020 23:18:56 +0000 (00:18 +0100)]
youtube.lua: stop trying to double XML-decode title metadata

This attribute isn't double-encoded now, and so attempting this is not
just pointless but can theoretically lead to wrong output.

10 months agoyoutube.lua: fix escaped characters issue in artist metadata
Pierre Ynard [Mon, 2 Nov 2020 23:14:45 +0000 (00:14 +0100)]
youtube.lua: fix escaped characters issue in artist metadata

The double encoding of \u0026 wasn't handled.

10 months agoavcodec: don't try recover from align issue
Zhao Zhili [Thu, 8 Oct 2020 16:18:00 +0000 (18:18 +0200)]
avcodec: don't try recover from align issue

It's unlikely to recover. This saves a pair of picture new/release
in error case.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
10 months agoavcodec: use bool type for b_dr_failure
Zhao Zhili [Thu, 8 Oct 2020 16:18:00 +0000 (18:18 +0200)]
avcodec: use bool type for b_dr_failure

Since it's been protected by lock again.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
10 months agokva: call vout_window_ReportMouseXXX directly
Steve Lhomme [Mon, 2 Nov 2020 14:01:39 +0000 (15:01 +0100)]
kva: call vout_window_ReportMouseXXX directly

No need to use the old vout_display_SendMouseXXX calls

10 months agokva: refuse to create the module if the parent window is invalid
Steve Lhomme [Mon, 2 Nov 2020 13:56:53 +0000 (14:56 +0100)]
kva: refuse to create the module if the parent window is invalid

When fixt23 is set we're not using the parent window at all.

10 months agokva: explicitly check for b_fixt23 instead of indirect parent_window existence
Steve Lhomme [Mon, 2 Nov 2020 14:00:26 +0000 (15:00 +0100)]
kva: explicitly check for b_fixt23 instead of indirect parent_window existence

10 months agocontrib: smb2: update to master
Thomas Guillem [Fri, 9 Oct 2020 12:51:05 +0000 (14:51 +0200)]
contrib: smb2: update to master

Many fixes were pushed to master:
 - anonymous login
 - smb3 connection
 - ipv4 connection on a host having ipv4 and ipv6
 - crashes

10 months agosmb2: reset the smb2 context before a new connection
Thomas Guillem [Thu, 29 Oct 2020 15:11:29 +0000 (16:11 +0100)]
smb2: reset the smb2 context before a new connection

It seems that the same smb2 context can't be used after it first failed
to login with a SMB3 server.

10 months agolib: media_player: remove extra cookie jar
Thomas Guillem [Fri, 30 Oct 2020 13:43:15 +0000 (14:43 +0100)]
lib: media_player: remove extra cookie jar

It's now handled by vlc_player_t.

10 months agoplayer: add missing cookie jar
Thomas Guillem [Fri, 30 Oct 2020 13:41:54 +0000 (14:41 +0100)]
player: add missing cookie jar

Regression from the initial vlc_player introduction. It was handled in
the old playlist engine but not in the new player.

10 months agoavcodec: extract video_format_t color setting as a function
Zhao Zhili [Thu, 8 Oct 2020 12:08:00 +0000 (14:08 +0200)]
avcodec: extract video_format_t color setting as a function

Now the APIs for color information conversion are symmetric.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
10 months agotest: libvlc: test the program API
Thomas Guillem [Fri, 2 Oct 2020 13:53:37 +0000 (15:53 +0200)]
test: libvlc: test the program API

10 months agolibvlc: events: remove libvlc_MediaPlayerScrambledChanged
Thomas Guillem [Fri, 2 Oct 2020 13:53:26 +0000 (15:53 +0200)]
libvlc: events: remove libvlc_MediaPlayerScrambledChanged

10 months agolibvlc: media_player: add program API
Thomas Guillem [Thu, 1 Oct 2020 09:25:07 +0000 (11:25 +0200)]
libvlc: media_player: add program API

Add events, selection, and list API.

Like the for the media track list, this API use an opaque structure
libvlc_player_programlist_t to iterate through all programs. This avoid
the usage of *** from a public API.

10 months agovocaroo.lua: dispatch to correct CDN server
Pierre Ynard [Fri, 30 Oct 2020 12:05:16 +0000 (13:05 +0100)]
vocaroo.lua: dispatch to correct CDN server

Vocaroo has started using different server locations for different
media, and the client has to dispatch to the correct one based on the
media ID.

10 months agovocaroo.lua: remove obsolete {old,beta}.vocaroo.com support
Pierre Ynard [Fri, 30 Oct 2020 11:55:12 +0000 (12:55 +0100)]
vocaroo.lua: remove obsolete {old,beta}.vocaroo.com support

These domains are now instead directly redirected to the main
vocaroo.com domain and platform.

10 months agoplayer: include other selected tracks(if any) in osd_message when unselecting an es
Prince Gupta [Thu, 29 Oct 2020 15:16:33 +0000 (20:46 +0530)]
player: include other selected tracks(if any) in osd_message when unselecting an es

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
10 months agoes_out: don't use i_id to compare es
Prince Gupta [Mon, 26 Oct 2020 13:48:55 +0000 (19:18 +0530)]
es_out: don't use i_id to compare es

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
10 months agoqml: add recent global shortcuts
Pierre Lamot [Wed, 14 Oct 2020 15:44:36 +0000 (17:44 +0200)]
qml: add recent global shortcuts

10 months agoqt: provide recent menu based on medialibrary model
Pierre Lamot [Wed, 14 Oct 2020 14:38:21 +0000 (16:38 +0200)]
qt: provide recent menu based on medialibrary model

10 months agoqt: fix CheckableListMenu reset when using actions group
Pierre Lamot [Wed, 14 Oct 2020 14:32:28 +0000 (16:32 +0200)]
qt: fix CheckableListMenu reset when using actions group

10 months agoqt: add RecentModel based on medialibrary model
Pierre Lamot [Wed, 14 Oct 2020 14:30:48 +0000 (16:30 +0200)]
qt: add RecentModel based on medialibrary model

10 months agoqt: update row/colCount signatures of models
Pierre Lamot [Wed, 14 Oct 2020 14:04:59 +0000 (16:04 +0200)]
qt: update row/colCount signatures of models

  to match QAbstractItemModel definition

10 months agoqt: move the MediaLib instance to the MainInterface
Pierre Lamot [Wed, 14 Oct 2020 13:52:45 +0000 (15:52 +0200)]
qt: move the MediaLib instance to the MainInterface

10 months agomedialib: add function to get history count
Pierre Lamot [Wed, 14 Oct 2020 13:42:50 +0000 (15:42 +0200)]
medialib: add function to get history count

10 months agoqt: remove legacy "recently played" model
Pierre Lamot [Wed, 14 Oct 2020 13:16:45 +0000 (15:16 +0200)]
qt: remove legacy "recently played" model

  Recent medias are now stored in the medialibrary.

10 months agoqt: fix Media > Open not starting playback when enqueuing
Pierre Lamot [Thu, 15 Oct 2020 07:31:07 +0000 (09:31 +0200)]
qt: fix Media > Open not starting playback when enqueuing

10 months agoqt: release order in DComp compositor
Pierre Lamot [Thu, 22 Oct 2020 08:37:24 +0000 (10:37 +0200)]
qt: release order in DComp compositor

10 months agoqt: fix release order in Win7 Compositor
Pierre Lamot [Thu, 22 Oct 2020 08:28:03 +0000 (10:28 +0200)]
qt: fix release order in Win7 Compositor

10 months agoqt: ensure that the QML view is destroyed before its context in DummyCompositor
Pierre Lamot [Fri, 16 Oct 2020 15:12:49 +0000 (17:12 +0200)]
qt: ensure that the QML view is destroyed before its context in DummyCompositor

10 months agosrt: fix build issue with recent SRT library
Julien Montant [Tue, 13 Oct 2020 19:45:15 +0000 (21:45 +0200)]
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)

10 months agoprojectm: add Close to filter operations
Alexandre Janniaux [Fri, 23 Oct 2020 14:33:38 +0000 (16:33 +0200)]
projectm: add Close to filter operations

10 months agomkv: ebml_dispatcher: simplify with constructor and auto
Alexandre Janniaux [Sat, 20 Jun 2020 09:29:16 +0000 (11:29 +0200)]
mkv: ebml_dispatcher: simplify with constructor and auto

Simplify code using auto for iterators.

10 months agostream_ReadLine: probe data exponentially instead of linearly
Pierre Ynard [Tue, 27 Oct 2020 08:01:25 +0000 (09:01 +0100)]
stream_ReadLine: probe data exponentially instead of linearly

This reduces the number of buffer reallocations performed for long
lines, turning the function's complexity from quadratic to linear. The
line length limit remains unchanged.

10 months agostream_ReadLine: don't discard unreturned data on error
Pierre Ynard [Tue, 27 Oct 2020 07:59:57 +0000 (08:59 +0100)]
stream_ReadLine: don't discard unreturned data on error

Upon error, data already consumed from the stream could be discarded
and permanently lost for the caller. This was just bad, and notably
precluded recovery from errors. Instead, data is now preserved within
peek buffers until a line can be successfully returned.

Peak memory usage remains almost identical, while the number of
allocations is halved for long lines. For UTF-16 streams, memory usage
is reduced as needless buffer allocations and copies are eliminated.

10 months agostream_ReadLine: simplify flow and variable types
Pierre Ynard [Tue, 27 Oct 2020 07:58:02 +0000 (08:58 +0100)]
stream_ReadLine: simplify flow and variable types

No functional change

10 months agostream_ReadLine: log error when failing on line too long
Pierre Ynard [Tue, 27 Oct 2020 07:57:08 +0000 (08:57 +0100)]
stream_ReadLine: log error when failing on line too long

10 months agostream_ReadLine: move BOM detection outside and before reading loop
Pierre Ynard [Tue, 27 Oct 2020 07:56:06 +0000 (08:56 +0100)]
stream_ReadLine: move BOM detection outside and before reading loop

No functional change

10 months agostream_ReadLine: properly discard incomplete UTF-16 sequences at EOF
Pierre Ynard [Tue, 27 Oct 2020 07:54:24 +0000 (08:54 +0100)]
stream_ReadLine: properly discard incomplete UTF-16 sequences at EOF

Lone-byte incomplete UTF-16 sequences before EOF, in some cases such as
a final line consisting only of it, would never get actually consumed
from the stream, preventing it from ever properly reaching EOF.

This also avoids flooding the logs with one warning per stream line
towards the end of the stream, and then printing an unspecific
conversion error: those are replaced by one clear and explicit error
message.

10 months agostream_ReadLine: reset iconv state on conversion error
Pierre Ynard [Tue, 27 Oct 2020 07:48:23 +0000 (08:48 +0100)]
stream_ReadLine: reset iconv state on conversion error

Tested against UTF-16 lone surrogates, for which it seems to make no
difference

10 months agostream_ReadLine: don't gratuitiously close iconv handle on unrelated error
Pierre Ynard [Tue, 27 Oct 2020 07:44:29 +0000 (08:44 +0100)]
stream_ReadLine: don't gratuitiously close iconv handle on unrelated error

The only errors after which this was called were memory allocation
errors, lines too long, or failing to open the handle itself, so
obviously there is no reason to want to close it there; it already gets
closed in the proper place when the stream is destroyed.

Even worse, it left the handle missing if vlc_stream_ReadLine() was
called again, and would result in text conversion constantly failing and
no output getting returned anymore, rendering the rest of the stream
unusable through this API and precluding any error recovery.

10 months agoyoutube.lua: new signature descrambling javascript URL parameter name
Pierre Ynard [Mon, 26 Oct 2020 07:09:26 +0000 (08:09 +0100)]
youtube.lua: new signature descrambling javascript URL parameter name

Apparently the old parameter has been replaced by a new one, and is now
getting phased out. The signature descrambling javascript URL is still
available in several other places in the HTML page either way.

Fixes #25223

10 months agoContribs: update libbluray to 1.2.1
Jean-Baptiste Kempf [Sat, 24 Oct 2020 18:19:49 +0000 (20:19 +0200)]
Contribs: update libbluray to 1.2.1

Fixes for a large number of discs, notably UHD.

10 months agoopengl: display: place the initial picture
Alexandre Janniaux [Tue, 13 Oct 2020 09:33:50 +0000 (11:33 +0200)]
opengl: display: place the initial picture

Otherwise, the display might never set the vlc_gl_t size and thought it
would not use uninitialized vout_display_place_t objects, it would not
initialized the OpenGL viewport and window aspect ratio either. It was
leading to OpenGL display being at incorrect size, especially on
Android, until the display size is changed, for example by rotating the
phone.

10 months agoopengl: fix framebuffer initialization
Romain Vimont [Tue, 20 Oct 2020 12:06:19 +0000 (14:06 +0200)]
opengl: fix framebuffer initialization

The caller does not expect the current bindings to change when calling
vlc_gl_filters_InitFramebuffers().

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agoexecutor: add design documentation
Romain Vimont [Wed, 9 Sep 2020 10:55:52 +0000 (12:55 +0200)]
executor: add design documentation

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agothreads: remove vlc_clone_detach()
Romain Vimont [Tue, 8 Sep 2020 13:04:01 +0000 (15:04 +0200)]
threads: remove vlc_clone_detach()

It had been deprecated by c5f960ff25baddc2e697adefd98a9741ee40d5fc, and
is not used anymore.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agomisc: remove background_worker
Romain Vimont [Fri, 4 Sep 2020 15:10:35 +0000 (17:10 +0200)]
misc: remove background_worker

A new "minimal" executor API has been introduced to replace it.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agothumbnailer: use vlc_executor_t
Romain Vimont [Fri, 4 Sep 2020 11:21:18 +0000 (13:21 +0200)]
thumbnailer: use vlc_executor_t

Replace the background worker by an executor.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agofetcher: use vlc_executor_t
Romain Vimont [Wed, 2 Sep 2020 15:06:41 +0000 (17:06 +0200)]
fetcher: use vlc_executor_t

Replace the background workers by executors.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agopreparser: use vlc_executor_t
Romain Vimont [Tue, 1 Sep 2020 16:09:09 +0000 (18:09 +0200)]
preparser: use vlc_executor_t

Replace the background worker by an executor.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agoexecutor: add unit tests
Romain Vimont [Mon, 7 Sep 2020 13:12:11 +0000 (15:12 +0200)]
executor: add unit tests

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agoexecutor: introduce new executor API
Romain Vimont [Tue, 1 Sep 2020 16:09:09 +0000 (18:09 +0200)]
executor: introduce new executor API

Introduce a new API to execute "runnables" from background threads.

The final design is a result of discussions on the mailing-list:
 - <https://mailman.videolan.org/pipermail/vlc-devel/2020-August/136696.html>
 - <https://mailman.videolan.org/pipermail/vlc-devel/2020-September/136944.html>

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
10 months agod3d11: allow more that one texture in the shader
Steve Lhomme [Fri, 23 Oct 2020 06:53:34 +0000 (08:53 +0200)]
d3d11: allow more that one texture in the shader

They are passed by D3D11_MAX_SHADER_VIEW amount of resource views each (many of
them can be unused).

10 months agod3d11: use proper name in shader to tell the source is using texture arrays
Steve Lhomme [Fri, 23 Oct 2020 06:48:34 +0000 (08:48 +0200)]
d3d11: use proper name in shader to tell the source is using texture arrays

10 months agodirect3d11: add an option to use sharp resizing
Steve Lhomme [Thu, 22 Oct 2020 13:55:16 +0000 (15:55 +0200)]
direct3d11: add an option to use sharp resizing

Avoid mixing pixels for SPU which are supposed to be sharper than the picture.

10 months agod3d11_deinterlace: log the filter that actually failed
Steve Lhomme [Thu, 22 Oct 2020 12:44:57 +0000 (14:44 +0200)]
d3d11_deinterlace: log the filter that actually failed

Not the "auto" name.

10 months agod3d11_deinterlace: find the d3d_format once and for all
Steve Lhomme [Thu, 22 Oct 2020 12:40:07 +0000 (14:40 +0200)]
d3d11_deinterlace: find the d3d_format once and for all

Also rename bogus vtcx_sys to vctx_sys.

10 months agod3d11: rename d3d_vshader_t to d3d_vertex_shader_t
Steve Lhomme [Thu, 22 Oct 2020 14:46:48 +0000 (16:46 +0200)]
d3d11: rename d3d_vshader_t to d3d_vertex_shader_t

And remove unused D3D11_SetVertexShader

10 months agod3d11: rename d3dsampState to SamplerStates
Steve Lhomme [Thu, 22 Oct 2020 14:43:10 +0000 (16:43 +0200)]
d3d11: rename d3dsampState to SamplerStates

So it matches the variable name in the shader.

10 months agod3d11: rename pVertexShaderConstants to viewpointShaderConstant
Steve Lhomme [Thu, 22 Oct 2020 14:36:49 +0000 (16:36 +0200)]
d3d11: rename pVertexShaderConstants to viewpointShaderConstant

10 months agod3d11: rename d3d11_shaders_t to d3d11_shader_compiler_t
Steve Lhomme [Thu, 22 Oct 2020 14:34:57 +0000 (16:34 +0200)]
d3d11: rename d3d11_shaders_t to d3d11_shader_compiler_t

10 months agod3d11_quad: call PSSetShaderResources for each plane rendered
Steve Lhomme [Fri, 23 Oct 2020 05:33:56 +0000 (07:33 +0200)]
d3d11_quad: call PSSetShaderResources for each plane rendered

Fixes some more issues of
"Resource being set to PS shader resource slot 0 is still bound on output"

Apparently we don't even need the trick to reset it anymore with this change.

10 months agod3d11_shaders: put the D3DCompile define next to the code
Steve Lhomme [Fri, 23 Oct 2020 05:15:48 +0000 (07:15 +0200)]
d3d11_shaders: put the D3DCompile define next to the code

So it's more obvious when the variable is used.

10 months agod3d11_shaders: only compensate the YUV->RGB range conversion when it happens
Steve Lhomme [Thu, 22 Oct 2020 13:47:17 +0000 (15:47 +0200)]
d3d11_shaders: only compensate the YUV->RGB range conversion when it happens

10 months agodirect3d11: move the staging texture allocation in a function
Steve Lhomme [Wed, 21 Oct 2020 11:39:10 +0000 (13:39 +0200)]
direct3d11: move the staging texture allocation in a function

10 months agopicture: move the multiview left eye flag in the pictures
Steve Lhomme [Thu, 22 Oct 2020 08:10:48 +0000 (10:10 +0200)]
picture: move the multiview left eye flag in the pictures

This flag flips on every picture. It should not be set in the video_format_t
which should be stable when only this value changes.

10 months agodemux: adaptive: do not recycle mp4a if extradata differs
Francois Cartegnie [Thu, 22 Oct 2020 17:59:40 +0000 (19:59 +0200)]
demux: adaptive: do not recycle mp4a if extradata differs

10 months agopacketizer: hevc: fix using all non active xps as extradata
Francois Cartegnie [Thu, 22 Oct 2020 15:56:25 +0000 (17:56 +0200)]
packetizer: hevc: fix using all non active xps as extradata

10 months agopacketizer: hevc: fix getting xPS copy
Francois Cartegnie [Thu, 22 Oct 2020 15:40:10 +0000 (17:40 +0200)]
packetizer: hevc: fix getting xPS copy

10 months agopacketizer: hevc: fix xPS id extraction
Francois Cartegnie [Thu, 22 Oct 2020 11:38:10 +0000 (13:38 +0200)]
packetizer: hevc: fix xPS id extraction

10 months agodemux: dash: pass the full codec string
Francois Cartegnie [Wed, 21 Oct 2020 23:00:09 +0000 (01:00 +0200)]
demux: dash: pass the full codec string

10 months agoadaptive: fix mpeg4 object profile parsing
Francois Cartegnie [Wed, 21 Oct 2020 22:58:43 +0000 (00:58 +0200)]
adaptive: fix mpeg4 object profile parsing

10 months agoes_out: fix regression when replacing program
Francois Cartegnie [Mon, 12 Oct 2020 19:17:57 +0000 (21:17 +0200)]
es_out: fix regression when replacing program

regression by df8a69b97cc50a08f980496711e8e024592b2100
refs streams/ts/La_Chevre_PATPMTevery6s.ts

10 months agoCheck for wordexp() explicitly
Rémi Denis-Courmont [Tue, 20 Oct 2020 19:45:24 +0000 (22:45 +0300)]
Check for wordexp() explicitly

11 months agovideo_output: compute force_refresh earlier
Steve Lhomme [Fri, 16 Oct 2020 12:54:48 +0000 (14:54 +0200)]
video_output: compute force_refresh earlier

First if a re-display is needed. And then if the current frame has changed it
doesn't need to be displayed ASAP, we know it's within the render delay.

Merge force_refresh and render_now since they mean the same thing.

11 months agovideo_output: rename is_forced to render_now in ThreadDisplayRenderPicture
Steve Lhomme [Fri, 16 Oct 2020 14:15:47 +0000 (16:15 +0200)]
video_output: rename is_forced to render_now in ThreadDisplayRenderPicture

The rendering will happen anyway. The flag tells we must not wait and do it
right away.

11 months agovideo_output: drop the current frame as soon as we know we should
Steve Lhomme [Fri, 16 Oct 2020 12:42:46 +0000 (14:42 +0200)]
video_output: drop the current frame as soon as we know we should

In the non-frame_by_frame mode. Sometimes we skip the current frame and use the
next frame.

We should actually loop in the "next" frames available until the last one
that still have time to display.

Renamed drop_next_frame to dropped_current_frame so it's clearer that it
already happened.

11 months agovideo_output: handle the case where frame_by_frame is set separately
Steve Lhomme [Fri, 16 Oct 2020 12:13:46 +0000 (14:13 +0200)]
video_output: handle the case where frame_by_frame is set separately

Simply add "if (frame_by_frame) {} else {}" and double the code. Then simplify
the code for always true or always false conditions.

in the end it's clear the frame_by_frame part only gets the next picture to set
in the current one (and reuse the store displayed.next if there was one).

force_refresh is set to true when frame_by_frame is true, so we can simplify
the is_forced test. (it was false before but is_forced would end up true anyway).

11 months agovideo_output: explicitly use the displayed.XXX pictures as filter chain inputs
Steve Lhomme [Fri, 16 Oct 2020 11:36:04 +0000 (13:36 +0200)]
video_output: explicitly use the displayed.XXX pictures as filter chain inputs

11 months agovideo_output: check for paused state in the clock even when not dropping frames
Steve Lhomme [Fri, 16 Oct 2020 10:57:37 +0000 (12:57 +0200)]
video_output: check for paused state in the clock even when not dropping frames

And only check the "late" value if we can drop frames.

is_late_dropped doesn't need to use the pause state, now they are exclusive.

11 months agovideo_output: remove uneeded loop on displayed.next reading
Steve Lhomme [Fri, 16 Oct 2020 11:56:17 +0000 (13:56 +0200)]
video_output: remove uneeded loop on displayed.next reading

If the value is set we never read it.
If the value is not set we read it. Then the loop exits, regardless if we got a
value or not.

11 months agovideo_output: return a pre-rendered picture from ThreadDisplayPreparePicture
Steve Lhomme [Wed, 16 Sep 2020 11:14:55 +0000 (13:14 +0200)]
video_output: return a pre-rendered picture from ThreadDisplayPreparePicture

Let ThreadDisplayPicture decide what to do with it.

In the first call sys->displayed.current is NULL, so that's always the value
read. We can copy the assert on sys->displayed.next from the original code.

In the second call sys->displayed.current is never NULL, so we already read
the sys->displayed.next value. The assert on sys->displayed.next from the
original code is not needed.
The while loop was ending if ThreadDisplayPreparePicture didn't return SUCCESS
so that's when sys->displayed.next is read as NULL.

11 months agovideo_output: explicitly check the VLC value from ThreadDisplayPreparePicture
Steve Lhomme [Fri, 16 Oct 2020 11:38:43 +0000 (13:38 +0200)]
video_output: explicitly check the VLC value from ThreadDisplayPreparePicture

It doesn't return a boolean.

11 months agovideo_output: don't set a value on unused variable
Steve Lhomme [Wed, 16 Sep 2020 11:14:24 +0000 (13:14 +0200)]
video_output: don't set a value on unused variable

At this stage paused will not be used anymore. No need to set the value.

Only keep the "else" part of the "if".

11 months agovideo_output: add missing else in next_system_pts check
Steve Lhomme [Fri, 16 Oct 2020 12:23:26 +0000 (14:23 +0200)]
video_output: add missing else in next_system_pts check

If next_system_pts is INT64_MAX the date_next value cannot be computed
correctly.

Probably missing from 23d2a4ccc0a65e706b2bef69221761d55c6ba4e3.

11 months agovideo_output: express late frame threshold as the frame duration divided by 2
Steve Lhomme [Fri, 16 Oct 2020 13:22:23 +0000 (15:22 +0200)]
video_output: express late frame threshold as the frame duration divided by 2

Rather than something looking like a delay.

11 months agovideo_output: use VLC_TICK_0 instead of hardcoded value 1
Steve Lhomme [Fri, 16 Oct 2020 11:33:00 +0000 (13:33 +0200)]
video_output: use VLC_TICK_0 instead of hardcoded value 1

11 months agovideo_output: rename reuse to reuse_decoded in ThreadDisplayPreparePicture
Steve Lhomme [Fri, 16 Oct 2020 11:17:45 +0000 (13:17 +0200)]
video_output: rename reuse to reuse_decoded in ThreadDisplayPreparePicture

11 months agovideo_output: rename variable for consistency with other similar calls
Steve Lhomme [Fri, 16 Oct 2020 09:41:22 +0000 (11:41 +0200)]
video_output: rename variable for consistency with other similar calls

11 months agomacosx: Add explanatory strings for access to restricted resources
David Fuhrmann [Sat, 17 Oct 2020 11:15:10 +0000 (13:15 +0200)]
macosx: Add explanatory strings for access to restricted resources

Those strings are read directly by the mac OS to show some reason
in ressource request dialogs.

The strings for NSAppleEventsUsageDescription, NSCameraUsageDescription
and NSMicrophoneUsageDescription are mandatory, otherwise the
application will crash.

InfoPlist.strings needs to be translated to show localized variants
of those strings.

refs #21378

11 months agomacosx: Do not generate InfoPlist.strings anymore
David Fuhrmann [Sat, 17 Oct 2020 10:46:52 +0000 (12:46 +0200)]
macosx: Do not generate InfoPlist.strings anymore

11 months agomacosx: Remove HumanReadableCopyright from InfoPlist.strings
David Fuhrmann [Sat, 17 Oct 2020 10:26:31 +0000 (12:26 +0200)]
macosx: Remove HumanReadableCopyright from InfoPlist.strings

The translation file should not need to be generated by the build
system to allow more simple translation. In this case the string
cannot be reconstructed during runtime (its read out by the OS),
thus drop the translation.