3 months agodirect3d11: only send HDR metadata when we don't tone map the source
Steve Lhomme [Wed, 25 Mar 2020 10:40:53 +0000 (11:40 +0100)]
direct3d11: only send HDR metadata when we don't tone map the source

3 months agodirect3d11: only send the HDR metadata when they change
Steve Lhomme [Wed, 25 Mar 2020 10:32:39 +0000 (11:32 +0100)]
direct3d11: only send the HDR metadata when they change

Newer Windows issue this warning if we send metadata with each picture:

DXGI WARNING: IDXGISwapChain4::SetHDRMetaData: Redundant invocation on unchanged
metadata could result in presentation performance inefficiency. [ MISCELLANEOUS WARNING #295: ]

3 months agodemux: adaptive: add AV1 in es comparison
Francois Cartegnie [Mon, 23 Mar 2020 18:39:23 +0000 (19:39 +0100)]
demux: adaptive: add AV1 in es comparison

3 months agodemux: adaptive: add new buffering control options
Francois Cartegnie [Mon, 23 Mar 2020 17:43:31 +0000 (18:43 +0100)]
demux: adaptive: add new buffering control options

3 months agodemux: adaptive: use new buffering logic
Francois Cartegnie [Mon, 23 Mar 2020 18:37:17 +0000 (19:37 +0100)]
demux: adaptive: use new buffering logic

3 months agodemux: adaptive: add new BufferingLogic
Francois Cartegnie [Fri, 20 Mar 2020 16:11:18 +0000 (17:11 +0100)]
demux: adaptive: add new BufferingLogic

3 months agodemux: adaptive: always retrieve start segment number for live
Francois Cartegnie [Sun, 22 Mar 2020 18:07:55 +0000 (19:07 +0100)]
demux: adaptive: always retrieve start segment number for live

3 months agodemux: adaptive: fix timeline getMinAhead
Francois Cartegnie [Wed, 18 Mar 2020 17:04:02 +0000 (18:04 +0100)]
demux: adaptive: fix timeline getMinAhead

3 months agodemux: adaptive: expose inheritSegment*
Francois Cartegnie [Sun, 22 Mar 2020 15:23:20 +0000 (16:23 +0100)]
demux: adaptive: expose inheritSegment*

3 months agodemux: adaptive: don't hold esoutLock while downloading chunk
Francois Cartegnie [Fri, 14 Feb 2020 13:38:07 +0000 (14:38 +0100)]
demux: adaptive: don't hold esoutLock while downloading chunk

3 months agodemux: adaptive: create low latency flag on playlist
Francois Cartegnie [Tue, 24 Mar 2020 15:26:58 +0000 (16:26 +0100)]
demux: adaptive: create low latency flag on playlist

3 months agodemux: adaptive: add timeoffset/timecomplete
Francois Cartegnie [Mon, 16 Mar 2020 23:58:18 +0000 (00:58 +0100)]
demux: adaptive: add timeoffset/timecomplete

3 months agodemux: adaptive: replace tribool with template
Francois Cartegnie [Tue, 17 Mar 2020 12:21:29 +0000 (13:21 +0100)]
demux: adaptive: replace tribool with template

3 months agocompat: add test for clock_nanosleep on darwin
Marvin Scholz [Fri, 13 Mar 2020 18:45:37 +0000 (19:45 +0100)]
compat: add test for clock_nanosleep on darwin

3 months agocompat: add clock_getres for darwin
Marvin Scholz [Sun, 22 Mar 2020 08:19:50 +0000 (09:19 +0100)]
compat: add clock_getres for darwin

3 months agocompat: add clock_nanosleep for darwin
Marvin Scholz [Sun, 22 Mar 2020 08:19:21 +0000 (09:19 +0100)]
compat: add clock_nanosleep for darwin

3 months agocompat: add clock_gettime for darwin
Marvin Scholz [Thu, 5 Mar 2020 22:58:47 +0000 (23:58 +0100)]
compat: add clock_gettime for darwin

3 months agotospdif: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:37:23 +0000 (13:37 +0100)]
tospdif: use vlc_align helper

3 months agodirectx_va: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:36:47 +0000 (13:36 +0100)]
directx_va: use vlc_align helper

3 months agocodec/qsv: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:36:35 +0000 (13:36 +0100)]
codec/qsv: use vlc_align helper

3 months agonvdec: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:35:27 +0000 (13:35 +0100)]
nvdec: use vlc_align helper

3 months agokms: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:35:04 +0000 (13:35 +0100)]
kms: use vlc_align helper

3 months agoopengl: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:34:46 +0000 (13:34 +0100)]
opengl: use vlc_align helper

3 months agovideotoolbox: use vlc_align helper
Marvin Scholz [Tue, 24 Mar 2020 12:33:58 +0000 (13:33 +0100)]
videotoolbox: use vlc_align helper

3 months agovlc_common: add vlc_align helper
Marvin Scholz [Fri, 10 Jan 2020 18:29:48 +0000 (19:29 +0100)]
vlc_common: add vlc_align helper

3 months agoconfigure: check socklen_t as int first
KO Myung-Hun [Sat, 15 Jun 2019 12:55:33 +0000 (21:55 +0900)]
configure: check socklen_t as int first

OS/2 socket APIs use int not unsigned int in place of socklen_t. As
a result, compilation is stopped at function call requiring socklen_t *
because of type mismatch between int * and unsigned int *.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 months agoconfigure: check the C compiler needs -latomic to support atomics
Steve Lhomme [Mon, 13 Jan 2020 12:24:41 +0000 (13:24 +0100)]
configure: check the C compiler needs -latomic to support atomics

At least gcc 8 for the Raspberry Pi needs it.

3 months agopackage/win32: build.sh: add option to do more checks during VLC compilation
Steve Lhomme [Mon, 10 Feb 2020 07:49:07 +0000 (08:49 +0100)]
package/win32: build.sh: add option to do more checks during VLC compilation

Mismatching pointers are usually a result of using the incorrect pointer and
might trigger crashes.

Missing initializers are useful for structures of callbacks, to make sure a new
callback is not missing by accident. It's always possible to put NULL, on
purpose, knowingly.

Both flags produce no error on win32/win64 with clang or gcc. But they cannot
be set globally outside of the build script as many contribs will likely fail
these tests and we shouldn't refuse/patch a contrib just for that.

I have been compiling with these flags for weeks without issues. It helped find
some issue (48442d3536edae578f1a384e73346d1e2a4c0061) that were pushed
unnoticed without these checks.

3 months agocontrib: Bump libdsm to 0.3.2
Hugo Beauzée-Luyssen [Thu, 19 Mar 2020 15:03:53 +0000 (16:03 +0100)]
contrib: Bump libdsm to 0.3.2

3 months agonvdec: wait copies before releasing the CUDA frame
Quentin Chateau [Mon, 23 Mar 2020 17:11:41 +0000 (18:11 +0100)]
nvdec: wait copies before releasing the CUDA frame

3 months agonvdec: added missing CUDA context pop in error path
Quentin Chateau [Mon, 23 Mar 2020 17:11:40 +0000 (18:11 +0100)]
nvdec: added missing CUDA context pop in error path

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 months agoconfigure.ac: Require microdns 0.1.2
Hugo Beauzée-Luyssen [Mon, 23 Mar 2020 13:31:00 +0000 (14:31 +0100)]
configure.ac: Require microdns 0.1.2

3 months agocontrib: Bump libmicrodns to 0.1.2
Hugo Beauzée-Luyssen [Fri, 20 Mar 2020 09:25:57 +0000 (10:25 +0100)]
contrib: Bump libmicrodns to 0.1.2

3 months agocontrib: microdns: Don't build for iOS
Hugo Beauzée-Luyssen [Fri, 20 Mar 2020 11:31:02 +0000 (12:31 +0100)]
contrib: microdns: Don't build for iOS

3 months agocontrib: Provide a correct PKG_CONFIG_PATH to meson
Hugo Beauzée-Luyssen [Thu, 19 Mar 2020 15:04:07 +0000 (16:04 +0100)]
contrib: Provide a correct PKG_CONFIG_PATH to meson

3 months agoopengl: remove unused source format parameter
Romain Vimont [Fri, 31 Jan 2020 10:01:35 +0000 (11:01 +0100)]
opengl: remove unused source format parameter

The video_format_t parameter of vout_display_opengl_Display() is not
used anymore. Remove it.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: move paddings computation to _Prepare()
Romain Vimont [Fri, 31 Jan 2020 12:08:18 +0000 (13:08 +0100)]
opengl: move paddings computation to _Prepare()

Texture paddings were computed in _Display(), while the picture format
is known in _Prepare().

This will allow to remove the video_format_t parameter of _Display().

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: move down vlc_gl_renderer_Prepare()
Romain Vimont [Fri, 31 Jan 2020 12:05:29 +0000 (13:05 +0100)]
opengl: move down vlc_gl_renderer_Prepare()

It will be modified to depend on static functions. Move it below them.

This will make the diff more readable.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: merge successive loops
Romain Vimont [Tue, 4 Feb 2020 15:38:36 +0000 (16:38 +0100)]
opengl: merge successive loops

After the previous changes, two successive loops iterating tex_count
times can now be merged into one.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: apply stereo transform using a matrix
Romain Vimont [Tue, 4 Feb 2020 15:25:58 +0000 (16:25 +0100)]
opengl: apply stereo transform using a matrix

The multiview mode (stereo) was applied by changing the texture
paddings to crop only the left eye.

The problem is that these texture paddings are specific to the input
picture, while the stereo mode is specific to the renderer, which should
be independent of the input picture.

To separate these concerns, apply the stereo mode using a matrix to
transform the texture coordinates from the renderer.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: apply orientation in fragment shader
Romain Vimont [Tue, 4 Feb 2020 10:41:48 +0000 (11:41 +0100)]
opengl: apply orientation in fragment shader

Apply all texture coordinates transformation in the fragment shader.

This is necessary to be able to implement a renderer independent of the
input picture (i.e. without even knowing the details) by using a single
GLSL function "vlc_texture(vec2 pic_coords)".

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: setup coords once for all
Romain Vimont [Fri, 31 Jan 2020 12:01:52 +0000 (13:01 +0100)]
opengl: setup coords once for all

Now that the coordinates are independant of paddings (which are
transmitted via a separate transform matrix), there is no need to
recompute them when the paddings change.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: convert texture coords in fragment shader
Romain Vimont [Wed, 29 Jan 2020 16:34:18 +0000 (17:34 +0100)]
opengl: convert texture coords in fragment shader

A picture is stored in OpenGL textures (one per plane), possibly with
padding (the texture may be larger than the actual picture).

The conversion from picture coordinates to texture coordinates (which
takes the padding into account) was applied on the input coordinates,
before the vertex shader. As a consequence, the vertex shader received
one vector of input texture coordinates per plane (the padding is not
necessarily the same for all the planes):

    (before this commit)

   picture   texture
   coords    coords        (attributes)      (varyings)
          (1 per plane)

             (x0, y0) --> MultiTexCoord0     TexCoord0     fragment
   (x,y) --> (x1, y1) --> MultiTexCoord1 --> TexCoord1 --> shader
             (x2, y2) --> MultiTexCoord2     TexCoord2

This poses a problem to separate chroma conversion from rendering: the
renderer should be able to retrieve a pixel color in picture
coordinates, regarless of the input format or padding.

To solve this issue, pass the picture coordinates instead of the texture
coordinates as attribute, and initialize uniform matrices to convert
from picture to texture coordinates for each plane directly in the
fragment shader:

    (after this commit)

   coords    (attribute)     (varying)

   (x,y) --> PicCoordsIn --> PicCoords --> fragment shader
                             TexCoordsMap0 --'||
                (uniforms)   TexCoordsMap1 ---'|
                             TexCoordsMap2 ----'

Note that this also changes the multiplication order of
(non-commutative) matrices, from (semantically):

    TexCoords = Orientation * TexCoordsMap * PicCoords


    TexCoords = TexCoordsMap * Orientation * PicCoords

The latter is the correct one: the orientation defines how the input
picture is rotated, so it must apply to picture coordinates, regardless
of the actual coordinates in the texture.

As a side effect, BuildRectangle, BuildSphere and BuildCube are now
independant of both the number of planes and any texture padding.

For now, TexCoordsMap is computed from the renderer, but the goal is to
move it to a separate component (a "sampler").

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: expose npot support in gl_api
Romain Vimont [Fri, 31 Jan 2020 14:54:41 +0000 (15:54 +0100)]
opengl: expose npot support in gl_api

Expose in vlc_gl_api whether it supports non-power of 2 textures.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: move fields from interop to gl_api
Romain Vimont [Thu, 30 Jan 2020 14:37:00 +0000 (15:37 +0100)]
opengl: move fields from interop to gl_api

The fields is_gles and glexts (extensions) are not specific to interop,
and may be useful without an interop instance.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: pass vlc_gl_api instead of virtual table
Romain Vimont [Thu, 30 Jan 2020 14:29:05 +0000 (15:29 +0100)]
opengl: pass vlc_gl_api instead of virtual table

Pass the whole structure (which will have new fields soon) to interop
and renderers, instead of the virtual table only.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: move vtable to vlc_gl_api
Romain Vimont [Thu, 30 Jan 2020 14:02:52 +0000 (15:02 +0100)]
opengl: move vtable to vlc_gl_api

Use a separate component for storing OpenGL API-specific utils (for now,
only the vtable).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: fix unused variable
Romain Vimont [Tue, 10 Mar 2020 12:29:44 +0000 (13:29 +0100)]
opengl: fix unused variable

The opengl_vtable_t is used only if USE_OPENGL_ES2 is not defined.
Declare it inside the ifdef-block.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: factorize program creation
Romain Vimont [Tue, 28 Jan 2020 13:42:10 +0000 (14:42 +0100)]
opengl: factorize program creation

Expose a single function to create an OpenGL program for a vertex shader
and a fragment shader.

This simplify the code, and handles the errors in the same way

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoopengl: define compatibility constants
Romain Vimont [Fri, 18 Oct 2019 14:49:59 +0000 (16:49 +0200)]
opengl: define compatibility constants

OpenGL ES 2 does not necessarily define all these constants, but
supports them as extensions.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
3 months agoextras: raspberry: fix the tools build folder
Steve Lhomme [Mon, 23 Mar 2020 08:07:22 +0000 (09:07 +0100)]
extras: raspberry: fix the tools build folder

It's expected to be in extras/tools

3 months agoplayer: fix null-deref with corks callbacks
Thomas Guillem [Thu, 19 Mar 2020 13:13:11 +0000 (14:13 +0100)]
player: fix null-deref with corks callbacks

3 months agoContribs: update libbluray to 1.2.0
Jean-Baptiste Kempf [Sun, 22 Mar 2020 20:17:33 +0000 (21:17 +0100)]
Contribs: update libbluray to 1.2.0

3 months agoContrib: update dvdnav to 6.1.0
Jean-Baptiste Kempf [Sat, 21 Mar 2020 20:57:29 +0000 (21:57 +0100)]
Contrib: update dvdnav to 6.1.0

3 months agoContribs: update dvdread to 6.1.0
Jean-Baptiste Kempf [Sat, 21 Mar 2020 20:54:34 +0000 (21:54 +0100)]
Contribs: update dvdread to 6.1.0

3 months agoextras: raspberry: unbreak lua compilation when using prebuilt contribs
Konstantin Pavlov [Fri, 20 Mar 2020 17:19:23 +0000 (20:19 +0300)]
extras: raspberry: unbreak lua compilation when using prebuilt contribs

3 months agovideo_output: remove wrong assertion
Alexandre Janniaux [Tue, 17 Mar 2020 09:15:52 +0000 (10:15 +0100)]
video_output: remove wrong assertion

If the display fails to open and a libvlc application request the media
player to pause, it will assert although you don't need a display to
pause the video output.

3 months agoFakeESOut: fix uninitialized member
Alexandre Janniaux [Fri, 20 Mar 2020 11:47:56 +0000 (12:47 +0100)]
FakeESOut: fix uninitialized member

priv_control must be NULL if created from a module.

3 months agoCI: add a Raspbian 32-bit target
Steve Lhomme [Thu, 30 Jan 2020 13:08:43 +0000 (14:08 +0100)]
CI: add a Raspbian 32-bit target

3 months agoextra: packages: add a Raspberry Pi build script
Steve Lhomme [Tue, 21 Jan 2020 11:51:47 +0000 (12:51 +0100)]
extra: packages: add a Raspberry Pi build script

Tested cross compiling for armv7 with this docker image

3 months agocontrib: qtquickcontrols2: fix compilation in msys
Steve Lhomme [Thu, 19 Mar 2020 14:17:57 +0000 (15:17 +0100)]
contrib: qtquickcontrols2: fix compilation in msys

gcc is stupid and doesn't use the folder relative to the file that loads the

3 months agocontrib: qtquickcontrols2: simplify the make calls
Steve Lhomme [Thu, 19 Mar 2020 15:57:51 +0000 (16:57 +0100)]
contrib: qtquickcontrols2: simplify the make calls

install_subtargets is equivalent to all three calls

3 months agocontrib: qt: fix the path of Angle compiled binaries in msys
Steve Lhomme [Thu, 19 Mar 2020 14:19:10 +0000 (15:19 +0100)]
contrib: qt: fix the path of Angle compiled binaries in msys

The pathes generated are too long for msys

3 months agocontrib: force the PKG_CONFIG_LIBDIR for CMake when compiling in msys
Steve Lhomme [Wed, 18 Mar 2020 15:00:27 +0000 (16:00 +0100)]
contrib: force the PKG_CONFIG_LIBDIR for CMake when compiling in msys

The pkg-config in msys overwrites/loses the PKG_CONFIG_PATH but not the
PKG_CONFIG_LIBDIR, so we set the PKG_CONFIG_LIBDIR (which is empty anyway) to
the value of PKG_CONFIG_PATH.

3 months agocontrib: qt: fix static path when compiled in msys
Steve Lhomme [Thu, 19 Mar 2020 10:54:04 +0000 (11:54 +0100)]
contrib: qt: fix static path when compiled in msys

3 months agodirect3d9: add an option to use DXVA-HD rather than StretchRect by default
Steve Lhomme [Thu, 12 Mar 2020 10:46:05 +0000 (11:46 +0100)]
direct3d9: add an option to use DXVA-HD rather than StretchRect by default

The driver may lie about its conversion capabilities (like Y410 to X8R8G8B8 on
Intel) when DXVA-HD works correctly. So we use this option by default.

3 months agocontrib: nettle: require a newer version
Steve Lhomme [Wed, 18 Mar 2020 15:04:37 +0000 (16:04 +0100)]
contrib: nettle: require a newer version

The gnutls version we build requires a minimum nettle version of 3.4.1.

3 months agocontrib: always use $(PKG_CONFIG) to find available dependencies
Steve Lhomme [Fri, 14 Feb 2020 10:53:39 +0000 (11:53 +0100)]
contrib: always use $(PKG_CONFIG) to find available dependencies

When cross-compiling the PKG_CONFIG is either forced by the environment, to find
what the user wants us to find, or we detect a usable one and set common system
pathes where we might find usable packages.

It's possible to disable the use of PKG_CONFIG like it used to be by setting
PKG_CONFIG=false in the environment, when building contribs.

We make sure PKG_CONFIG_LIBDIR is used when we set its value.

3 months agopackage/win32: build.sh: don't force the PKG_CONFIG_LIBDIR in contribs
Steve Lhomme [Fri, 14 Feb 2020 10:48:31 +0000 (11:48 +0100)]
package/win32: build.sh: don't force the PKG_CONFIG_LIBDIR in contribs

The contrib path is automatically added for contribs and for vlc.

We still need a proper environment to build VLC. We set the same values used in
contribs. They should always match. It could be removed once it's move into

It uses the same detection for bogus Debian $TRIPLET-pkg-config.

3 months agocontrib: detect the pkg-config variant to use when cross-compiling
Steve Lhomme [Fri, 31 Jan 2020 08:55:55 +0000 (09:55 +0100)]
contrib: detect the pkg-config variant to use when cross-compiling

And use it for all contribs detection and building.

on Debian, the x86_64-w64-mingw32-pkg-config may exist and run but give an
error when actually trying to find a package because the package architecture
doesn't exist for that target. So we have to test it thoroughly.

If we revert to pkg-config when cross-compiling we also force the
PKG_CONFIG_LIBDIR, otherwise we leave it untouched as the system/environment may
provide more that we know.

Both /usr/$(HOST)/lib/pkgconfig and /usr/lib/$(HOST)/pkgconfig variants exist,
at least on Debian.

3 months agocontrib: pass the PKG_CONFIG variable to all tools
Steve Lhomme [Fri, 31 Jan 2020 08:55:55 +0000 (09:55 +0100)]
contrib: pass the PKG_CONFIG variable to all tools

So it's used by make, meson and CMake.
No need to set it in the CMake toolchain file anymore.

3 months agocontrib: only use implicit variables for known implicit variables
Steve Lhomme [Wed, 18 Mar 2020 08:23:34 +0000 (09:23 +0100)]
contrib: only use implicit variables for known implicit variables

At least widl/windres are Windows tools that are not defined in GNU Make on
msys or Linux.

Neither ranlib or strip have implicit values either when I tested with make -p.

3 months agodecoder: rename input_Decoder*() to vlc_input_decoder_()
Thomas Guillem [Wed, 18 Mar 2020 14:09:20 +0000 (15:09 +0100)]
decoder: rename input_Decoder*() to vlc_input_decoder_()

In order to match with vlc_input_decoder_t.

3 months agovlc_decoder: use a specific opaque struct for input API
Thomas Guillem [Wed, 18 Mar 2020 13:13:50 +0000 (14:13 +0100)]
vlc_decoder: use a specific opaque struct for input API

That way, the input API can't be used with user decoder_t modules.

This is a prerequisite of the packetizer API rework.

3 months agodecoder: manage VBI from decoder.c
Thomas Guillem [Wed, 18 Mar 2020 13:23:00 +0000 (14:23 +0100)]
decoder: manage VBI from decoder.c

This is the only direct usage of the decoder_t created by input_DecoderCreate().
This will allow to use a new opaque struct for the decoder_t input API.

3 months agodecoder: remove unused variable
Thomas Guillem [Sat, 29 Feb 2020 17:54:47 +0000 (18:54 +0100)]
decoder: remove unused variable

3 months agoposix/wait: Fix timespec calculation
Marvin Scholz [Sat, 7 Mar 2020 10:44:47 +0000 (11:44 +0100)]
posix/wait: Fix timespec calculation

3 months agodemux: adaptive: allow to override max buffering
Francois Cartegnie [Thu, 13 Feb 2020 18:22:11 +0000 (19:22 +0100)]
demux: adaptive: allow to override max buffering

3 months agodemux: adaptive: recurse getPlaybackTimeDurationBySegmentNumber
Francois Cartegnie [Mon, 16 Mar 2020 16:06:04 +0000 (17:06 +0100)]
demux: adaptive: recurse getPlaybackTimeDurationBySegmentNumber

3 months agodemux: adaptive: fix getPlaybackTimeDurationBySegmentNumber startnumber offset
Francois Cartegnie [Mon, 9 Mar 2020 16:03:50 +0000 (17:03 +0100)]
demux: adaptive: fix getPlaybackTimeDurationBySegmentNumber startnumber offset

3 months agodemux: adaptive: fix live template period offset
Francois Cartegnie [Mon, 16 Mar 2020 08:33:00 +0000 (09:33 +0100)]
demux: adaptive: fix live template period offset

3 months agodemux: adaptive: remove unused playlist update parameters
Francois Cartegnie [Fri, 13 Mar 2020 13:55:30 +0000 (14:55 +0100)]
demux: adaptive: remove unused playlist update parameters

3 months agod3d11_player: assert on leaks
Steve Lhomme [Mon, 3 Feb 2020 13:12:21 +0000 (14:12 +0100)]
d3d11_player: assert on leaks

That could be used for testing leak regressions

3 months agonvdec: use the CudaFunctions and CUcontext from the decoder device
Steve Lhomme [Mon, 16 Mar 2020 14:46:26 +0000 (15:46 +0100)]
nvdec: use the CudaFunctions and CUcontext from the decoder device

No need to load the same resources twice. We hold a reference to the decoder
device with these objects.

3 months agonvdec: get the decoder device earlier
Steve Lhomme [Mon, 16 Mar 2020 14:33:03 +0000 (15:33 +0100)]
nvdec: get the decoder device earlier

If the decoder device doesn't match we shouldn't be using this decoder anyway.

3 months agoRevert "android: util: remove redundant strncmp"
Romain Vimont [Wed, 26 Feb 2020 14:46:32 +0000 (15:46 +0100)]
Revert "android: util: remove redundant strncmp"

This reverts commit 77aa424b72d8b6a1e7049c430c90303b9473ed7d.

The replacement was not equivalent:

    strncmp(a, b, strlen(b)) == 0  # test if a starts with b
    strcmp(a, b) == 0              # test if a equals b

In practice, it breaks OpenGL on Android when the vout_modules contains

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 months agoopengl: fix GL_ASSERT_NOERROR macro
Romain Vimont [Wed, 4 Mar 2020 07:53:49 +0000 (08:53 +0100)]
opengl: fix GL_ASSERT_NOERROR macro

The macro assumed a local variable vgl existed, which is not always the

Instead, pass a pointer to the opengl_vtable_t as parameter.

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
3 months agoqt: don't create the "window" variable in libvlc
Steve Lhomme [Fri, 13 Mar 2020 13:50:18 +0000 (14:50 +0100)]
qt: don't create the "window" variable in libvlc

The variable already already exists. If it doesn't exist the
var_SetString("window", "qt,any") should fail as the UI won't work properly

3 months agotest: player: don't create the "window" variable in libvlc
Steve Lhomme [Thu, 13 Feb 2020 08:06:33 +0000 (09:06 +0100)]
test: player: don't create the "window" variable in libvlc

The variable already exists in libvlc. If for some reason the variable is
removed from libvlc this test should fail as it's setting a variable that will
no longer be used.

3 months agoopengl: dxva2: fix indentation after previous commits
Steve Lhomme [Mon, 16 Mar 2020 12:26:37 +0000 (13:26 +0100)]
opengl: dxva2: fix indentation after previous commits

No functional changes

3 months agoopengl: dxva2: use DXVA-HD instead of StretchRect for NVIDIA GPUs
Steve Lhomme [Mon, 16 Mar 2020 12:24:43 +0000 (13:24 +0100)]
opengl: dxva2: use DXVA-HD instead of StretchRect for NVIDIA GPUs

The StretchRect we're using has the same issue as with the D3D9 vout.

3 months agoopengl: dxva2: make sure we can handle the conversion in StretchRect
Steve Lhomme [Mon, 16 Mar 2020 12:18:32 +0000 (13:18 +0100)]
opengl: dxva2: make sure we can handle the conversion in StretchRect

3 months agoopengl: dxva2: check we have a IDirect3DDevice9Ex earlier
Steve Lhomme [Mon, 16 Mar 2020 12:20:23 +0000 (13:20 +0100)]
opengl: dxva2: check we have a IDirect3DDevice9Ex earlier

3 months agodirect3d9: move the DXVA2 OpenGL Interop module in its own file
Steve Lhomme [Mon, 16 Mar 2020 11:02:22 +0000 (12:02 +0100)]
direct3d9: move the DXVA2 OpenGL Interop module in its own file

It shares nothing with the D3D9 module and will never be loaded at the same time.

No functional changes.

3 months agodemux: wav: fix wrong pts after a seek
Thomas Guillem [Thu, 12 Mar 2020 13:51:07 +0000 (14:51 +0100)]
demux: wav: fix wrong pts after a seek

3 months agodemux: wav: don't increment pts past data chunk bundary
Thomas Guillem [Thu, 12 Mar 2020 13:41:22 +0000 (14:41 +0100)]
demux: wav: don't increment pts past data chunk bundary

3 months agodemux: wav: use vlc_stream_GetSize()
Thomas Guillem [Fri, 13 Mar 2020 15:04:55 +0000 (16:04 +0100)]
demux: wav: use vlc_stream_GetSize()

3 months agodemux: wav: more robust chunk parsing
Thomas Guillem [Thu, 12 Mar 2020 12:20:11 +0000 (13:20 +0100)]
demux: wav: more robust chunk parsing

From the spec:
"There are no restrictions upon the order of the chunks within a WAVE file,
with the exception that the Format chunk must precede the Data chunk."

The Wav demuxer can now parse chunks in any order. I don't check that the fmt
chunk is before the data one in order to be more resilient to broken samples.

This commit will allow to add new chunks more easily, specially chunks that can
be after the 'data' one. I'm thinking about the ADM support, that need 2
chunks, 'chna' and 'axml' that is after the 'data' chunk.

3 months agodemux: wav: change i_size type
Thomas Guillem [Thu, 12 Mar 2020 12:28:48 +0000 (13:28 +0100)]
demux: wav: change i_size type

Use the same type than GetDWLE() that returns an uint32_t.

3 months agodemux: wav: change i_data_size sign
Thomas Guillem [Thu, 12 Mar 2020 12:24:05 +0000 (13:24 +0100)]
demux: wav: change i_data_size sign