vlc.git
6 weeks agomkv: remove typeid code in EBML dispatcher
Alexandre Janniaux [Mon, 15 Jun 2020 14:30:53 +0000 (16:30 +0200)]
mkv: remove typeid code in EBML dispatcher

EBML can associate multiple class to a single EBML ID, which mean that
it potentially needs typeid checks. However, libmatroska always exposes
a single type per EBML ID, so it never needs those checks.

In addition, those checks are leading to warnings (attached below) and
issues depending on the visibility and optimization level on clang. See
the following mail on the mailing list for reference:

https://lists.llvm.org/pipermail/llvm-dev/2014-June/073465.html

To sum up, typeinfo are becoming different between libmatroska and the
matroska modules for the same classes, so the matroska demuxer is never
able to open correctly in those case, and it fallbacks on avformat
demuxer if available.

Compilation warning fixed by this patch:

    ../../../modules/demux/mkv/chapter_command.cpp:35:13: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid'
          [-Wpotentially-evaluated-expression]
            if( MKV_CHECKED_PTR_DECL( p_cpt, KaxChapterProcessTime const, command[i] ) )
                ^
    ../../../modules/demux/mkv/mkv.hpp:116:63: note: expanded from macro 'MKV_CHECKED_PTR_DECL'
    #define MKV_CHECKED_PTR_DECL( name, type, src ) type * name = MKV_IS_ID(src, type) ? static_cast<type*>(src) : NULL
                                                                  ^
    ../../../modules/demux/mkv/mkv.hpp:115:52: note: expanded from macro 'MKV_IS_ID'
    #define MKV_IS_ID( el, C ) ( el != NULL && typeid( *el ) == typeid( C ) )
                                                       ^
    ../../../modules/demux/mkv/chapter_command.cpp:44:13: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid'
          [-Wpotentially-evaluated-expression]
            if( MKV_CHECKED_PTR_DECL( p_cpd, KaxChapterProcessData const, command[i] ) )
                ^
    ../../../modules/demux/mkv/mkv.hpp:116:63: note: expanded from macro 'MKV_CHECKED_PTR_DECL'
    #define MKV_CHECKED_PTR_DECL( name, type, src ) type * name = MKV_IS_ID(src, type) ? static_cast<type*>(src) : NULL
                                                                  ^
    ../../../modules/demux/mkv/mkv.hpp:115:52: note: expanded from macro 'MKV_IS_ID'
    #define MKV_IS_ID( el, C ) ( el != NULL && typeid( *el ) == typeid( C ) )

The issue was initially spotted through link-time warnings mentionning
incompatible visibility settings between the library archives and the
final static libvlc archive when compiling for iOS.

Fix videolan/VLCKit#372

6 weeks agoCI: add a UWP x86_64 libvlc target
Steve Lhomme [Fri, 29 May 2020 05:12:24 +0000 (07:12 +0200)]
CI: add a UWP x86_64 libvlc target

6 weeks agotest: teletext: fix use of conditionals
Francois Cartegnie [Wed, 17 Jun 2020 09:36:20 +0000 (11:36 +0200)]
test: teletext: fix use of conditionals

telx is also optional

6 weeks agosnap: make sure we don't fail with a missing git version
Steve Lhomme [Mon, 15 Jun 2020 14:33:25 +0000 (16:33 +0200)]
snap: make sure we don't fail with a missing git version

This fixes CI failure on branches with a lot of patches.

6 weeks agolib: media_player: document multiple audio track selection
Thomas Guillem [Tue, 16 Jun 2020 12:48:50 +0000 (14:48 +0200)]
lib: media_player: document multiple audio track selection

6 weeks agolib: media_track: hide internal function
Thomas Guillem [Mon, 15 Jun 2020 12:54:26 +0000 (14:54 +0200)]
lib: media_track: hide internal function

6 weeks agolib: media_player: rework multiple track selection API
Thomas Guillem [Mon, 15 Jun 2020 13:02:18 +0000 (15:02 +0200)]
lib: media_player: rework multiple track selection API

The libvlc_media_player_update_tracklist() design was not straight-forward and
was not easy to use on some languages. For example, vlcpp will expose a vector
of tracks instead of a tracklist, so requiring a tracklist pointer to select
multiple tracks adds a lot of complexity (returning a vector and keeping a
pointer to the tracklist).

6 weeks agolib: media_track: add a refcount
Thomas Guillem [Mon, 15 Jun 2020 11:59:55 +0000 (13:59 +0200)]
lib: media_track: add a refcount

libvlc_media_track_hold() can be used in order to have a track outliving the
tracklist.

6 weeks agolib: media_track: allocate medias separately
Thomas Guillem [Mon, 15 Jun 2020 12:29:59 +0000 (14:29 +0200)]
lib: media_track: allocate medias separately

Since libvlc_media_track_t will be refcounted.

6 weeks agoRevert "lib: media_track: assert that tracks are deleted correctly"
Thomas Guillem [Mon, 15 Jun 2020 12:00:19 +0000 (14:00 +0200)]
Revert "lib: media_track: assert that tracks are deleted correctly"

This reverts commit e597536f311e1d7cffa0103207a2e7e3e741a606.

6 weeks agolib: rename libvlc_media_track_delete to libvlc_media_track_release
Thomas Guillem [Mon, 15 Jun 2020 11:48:44 +0000 (13:48 +0200)]
lib: rename libvlc_media_track_delete to libvlc_media_track_release

Since libvlc_media_track_t will be refcounted.

6 weeks agotests: add vlc_player teletext
Francois Cartegnie [Fri, 29 May 2020 11:59:48 +0000 (13:59 +0200)]
tests: add vlc_player teletext

6 weeks agodemux: mock: add teletext codec parameters
Francois Cartegnie [Thu, 4 Jun 2020 13:38:07 +0000 (15:38 +0200)]
demux: mock: add teletext codec parameters

6 weeks agodemux: mock: parametrize subtitles codec
Francois Cartegnie [Wed, 3 Jun 2020 11:57:08 +0000 (13:57 +0200)]
demux: mock: parametrize subtitles codec

6 weeks agodemux: mock: process extra per track configuration
Francois Cartegnie [Tue, 2 Jun 2020 15:35:36 +0000 (17:35 +0200)]
demux: mock: process extra per track configuration

allows to override global options for each track
using type/creation index

--mock-config="video[0]{var=val,val=val}+video[2]{val=val}"

6 weeks agodemux: mock: split track configurations
Francois Cartegnie [Tue, 2 Jun 2020 15:32:01 +0000 (17:32 +0200)]
demux: mock: split track configurations

6 weeks agodemux: mock: assign variables per track and create all tracks
Francois Cartegnie [Fri, 29 May 2020 15:02:42 +0000 (17:02 +0200)]
demux: mock: assign variables per track and create all tracks

7 weeks agocodec: zvbi: handle fully transparent cleaning ttxt
Francois Cartegnie [Mon, 15 Jun 2020 07:57:09 +0000 (09:57 +0200)]
codec: zvbi: handle fully transparent cleaning ttxt

7 weeks agodemux: ts: fix reading ttml descriptor
Francois Cartegnie [Tue, 16 Jun 2020 09:24:52 +0000 (11:24 +0200)]
demux: ts: fix reading ttml descriptor

refs #24871

7 weeks agoopengl: keep a reference to vlc_gl_api
Romain Vimont [Thu, 4 Jun 2020 09:52:18 +0000 (11:52 +0200)]
opengl: keep a reference to vlc_gl_api

For convenience, use a local variable to reference the vlc_gl_api.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: rewrite error handling with gotos
Romain Vimont [Thu, 4 Jun 2020 09:52:17 +0000 (11:52 +0200)]
opengl: rewrite error handling with gotos

This avoids to rewrite consecutive cleanups on each error case.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: rename to plural form
Romain Vimont [Thu, 4 Jun 2020 09:52:16 +0000 (11:52 +0200)]
opengl: rename to plural form

The name of arrays variable should use the plural form for clarity.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: rename "prepare_shader" callback to "load"
Romain Vimont [Thu, 4 Jun 2020 09:52:15 +0000 (11:52 +0200)]
opengl: rename "prepare_shader" callback to "load"

The purpose of this callback is to load sampler data (bind textures,
load uniforms, etc.) to be used for the OpenGL draw call.

In addition, the name "load" also allows to possibly add an "unload"
function later (to reset bindings).

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: group sampler callbacks into struct ops
Romain Vimont [Thu, 4 Jun 2020 09:52:14 +0000 (11:52 +0200)]
opengl: group sampler callbacks into struct ops

This makes explicit that these functions are set by the sampler
implementation and must be called by the user of sampler.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: make FetchLocations() infaillible
Romain Vimont [Thu, 4 Jun 2020 09:52:13 +0000 (11:52 +0200)]
opengl: make FetchLocations() infaillible

If GetUniformLocation() returns -1, then this is an implementation
error.

Assert instead of reporting the error to the caller.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: privatize sampler parts
Romain Vimont [Thu, 4 Jun 2020 09:52:12 +0000 (11:52 +0200)]
opengl: privatize sampler parts

Hide sampler implementation details from renderer.

This will allow to expose only what OpenGL filters need in the public
API.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: move "dump shaders" flag to renderer
Romain Vimont [Thu, 4 Jun 2020 09:52:11 +0000 (11:52 +0200)]
opengl: move "dump shaders" flag to renderer

For now, only the renderer dumps its shaders depending on the verbose
level.

This simplifies vlc_gl_renderer_New(), and paves the way to convert the
renderer to an OpenGL filter.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: merge fragment_shaders.c into sampler.c
Romain Vimont [Thu, 4 Jun 2020 09:52:10 +0000 (11:52 +0200)]
opengl: merge fragment_shaders.c into sampler.c

The code in fragment_shaders.c is part of the implementation of the
sampler: it generates the fragment shader to expose a GLSL function
"vlc_texture(vec2 coords)".

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agoopengl: merge DrawWithShaders() into _Draw()
Romain Vimont [Thu, 4 Jun 2020 09:52:09 +0000 (11:52 +0200)]
opengl: merge DrawWithShaders() into _Draw()

The function vlc_gl_renderer_Draw() (almost) just called
DrawWithShaders(). There is no need for a separate function.

Signed-off-by: Alexandre Janniaux <ajanni@videolabs.io>
7 weeks agolib: media_track: Add missing allocation checks
Hugo Beauzée-Luyssen [Fri, 12 Jun 2020 10:43:09 +0000 (12:43 +0200)]
lib: media_track: Add missing allocation checks

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
7 weeks agolib: media_track: improve documentation
Thomas Guillem [Fri, 12 Jun 2020 10:20:10 +0000 (12:20 +0200)]
lib: media_track: improve documentation

Add references to the functions creating tracks and tracklists from the delete
functions.

7 weeks agolib: event: add back i_id in media_player_es_changed
Thomas Guillem [Fri, 12 Jun 2020 09:25:49 +0000 (11:25 +0200)]
lib: event: add back i_id in media_player_es_changed

To keep compability with the old track API since VLC's ports are still using it.

This will be removed when the old track API is removed.

7 weeks agodxva: rename blacklist to blocklist
Steve Lhomme [Mon, 15 Jun 2020 05:29:29 +0000 (07:29 +0200)]
dxva: rename blacklist to blocklist

7 weeks agoUPnP discovery: Evaluate "TotalMatches" and "NumberReturned"
Andreas Krug [Fri, 1 May 2020 10:21:34 +0000 (12:21 +0200)]
UPnP discovery: Evaluate "TotalMatches" and "NumberReturned"

Browse again with increased "StartingIndex" and adapted "RequestCount".
    Solves
    #21381 Panasonic Viera returns maximal 20 items on uPnP
    #22496 DLNA/UPnP - Panasonic recorder 12 records limit

Fixes #15876

Signed-off-by: Felix Paul Kühne <felix@feepk.net>
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
7 weeks agoavi: Fix potential leak
Hugo Beauzée-Luyssen [Thu, 11 Jun 2020 14:14:58 +0000 (16:14 +0200)]
avi: Fix potential leak

When AVI_IndexLoad gets invoked multiple time on the same file, we end
up overwriting the previous index table.

7 weeks agoaout: wasapi: use a vlc_timer for the deferred start
Steve Lhomme [Tue, 7 Apr 2020 14:12:16 +0000 (16:12 +0200)]
aout: wasapi: use a vlc_timer for the deferred start

The timer API is not supported in Winstore builds so switch to something that
works for all.

The timer (thread based) is created once and armed/disarmed when needed.

7 weeks agotest: lib: media_player: test track API
Thomas Guillem [Wed, 10 Jun 2020 12:23:30 +0000 (14:23 +0200)]
test: lib: media_player: test track API

7 weeks agotest: lib: media_player: add event_ctx
Thomas Guillem [Wed, 10 Jun 2020 12:23:18 +0000 (14:23 +0200)]
test: lib: media_player: add event_ctx

This adds the possibility to pause the player callback, read the event, and
resume the player callback.

7 weeks agotest: lib: media_player: pause can now be always tested
Thomas Guillem [Tue, 9 Jun 2020 15:21:42 +0000 (17:21 +0200)]
test: lib: media_player: pause can now be always tested

Since the mock:// duration is 5seconds.

7 weeks agolib: media_player: fix wrong assert
Thomas Guillem [Tue, 9 Jun 2020 15:29:52 +0000 (17:29 +0200)]
lib: media_player: fix wrong assert

7 weeks agotest: media_player: use "mock://"
Thomas Guillem [Tue, 9 Jun 2020 13:29:10 +0000 (15:29 +0200)]
test: media_player: use "mock://"

7 weeks agolib: media_track: assert that tracks are deleted correctly
Thomas Guillem [Thu, 11 Jun 2020 12:24:04 +0000 (14:24 +0200)]
lib: media_track: assert that tracks are deleted correctly

This debug code assert that a track should not not deleted with
libvlc_media_track_delete() when it comes from a list.

7 weeks agolib: video: use libvlc_media_player_get_selected_track()
Thomas Guillem [Fri, 5 Jun 2020 09:00:29 +0000 (11:00 +0200)]
lib: video: use libvlc_media_player_get_selected_track()

7 weeks agotest: media: use libvlc_media_get_tracklist
Thomas Guillem [Fri, 5 Jun 2020 07:02:46 +0000 (09:02 +0200)]
test: media: use libvlc_media_get_tracklist

7 weeks agolib: update media_player track events
Thomas Guillem [Thu, 4 Jun 2020 21:13:49 +0000 (23:13 +0200)]
lib: update media_player track events

Use the string identifier from track events.

7 weeks agolib: add new player track API
Thomas Guillem [Thu, 4 Jun 2020 17:59:51 +0000 (19:59 +0200)]
lib: add new player track API

7 weeks agocore: fix vlc_es_id_IsStrIdStable not exposed
Thomas Guillem [Thu, 4 Jun 2020 21:06:30 +0000 (23:06 +0200)]
core: fix vlc_es_id_IsStrIdStable not exposed

7 weeks agolib: add libvlc_media_track_delete
Thomas Guillem [Thu, 4 Jun 2020 17:57:47 +0000 (19:57 +0200)]
lib: add libvlc_media_track_delete

7 weeks agolib: media_track: add new members
Thomas Guillem [Thu, 4 Jun 2020 17:56:54 +0000 (19:56 +0200)]
lib: media_track: add new members

That will be used by player tracks.

7 weeks agolib: add libvlc_media_get_tracklist()
Thomas Guillem [Tue, 2 Jun 2020 17:06:18 +0000 (19:06 +0200)]
lib: add libvlc_media_get_tracklist()

7 weeks agolib: add libvlc_media_tracklist API
Thomas Guillem [Tue, 2 Jun 2020 17:04:42 +0000 (19:04 +0200)]
lib: add libvlc_media_tracklist API

This common opaque struct will be used by the media and the media_player.

7 weeks agolib: move track in media_track.c
Thomas Guillem [Thu, 28 May 2020 14:13:40 +0000 (16:13 +0200)]
lib: move track in media_track.c

And use a trackpriv struct to hold the specific audio/video/sub part, removing
an extra alloc usage.

7 weeks agolib: move libvlc_media_track_t to a specific header
Thomas Guillem [Thu, 28 May 2020 13:35:39 +0000 (15:35 +0200)]
lib: move libvlc_media_track_t to a specific header

7 weeks agolib: media: factorize track type conversion
Thomas Guillem [Wed, 29 Jan 2020 12:24:57 +0000 (13:24 +0100)]
lib: media: factorize track type conversion

7 weeks agopicture_Export: Fill visible_width & visible_height
Hugo Beauzée-Luyssen [Wed, 10 Jun 2020 11:53:58 +0000 (13:53 +0200)]
picture_Export: Fill visible_width & visible_height

This is what's used to provide the thumbnails sizes through libvlc

7 weeks agodirect3d11: fix crash on early failure
Steve Lhomme [Thu, 11 Jun 2020 07:54:10 +0000 (09:54 +0200)]
direct3d11: fix crash on early failure

Close() is called if any error occurs in Open() so it should be safe from
uninitialized fields.

7 weeks agodemux: ts: handle broken ADTS as LATM
Francois Cartegnie [Wed, 10 Jun 2020 14:32:48 +0000 (16:32 +0200)]
demux: ts: handle broken ADTS as LATM

refs #24842

7 weeks agopacketizer: mpeg4audio: reject truncated data
Francois Cartegnie [Wed, 10 Jun 2020 14:29:46 +0000 (16:29 +0200)]
packetizer: mpeg4audio: reject truncated data

7 weeks agoNEWS: UWP is only supported for Windows 10
Steve Lhomme [Wed, 10 Jun 2020 12:27:09 +0000 (14:27 +0200)]
NEWS: UWP is only supported for Windows 10

7 weeks agoavcodec: remove avcodec-fast support
Marvin Scholz [Thu, 4 Jun 2020 22:09:07 +0000 (00:09 +0200)]
avcodec: remove avcodec-fast support

The avcodec-fast option, if enabled, sets the AV_CODEC_FLAG2_FAST
option. Using AV_CODEC_FLAG2_FAST can cause use of unsafe code in
avcodec which could lead to crashes.

7 weeks agoes_out: fix inverted opaque/transparent forwarding
Francois Cartegnie [Fri, 29 May 2020 09:50:23 +0000 (11:50 +0200)]
es_out: fix inverted opaque/transparent forwarding

7 weeks agoplayer: fix teletext handling
Francois Cartegnie [Tue, 4 Feb 2020 15:22:06 +0000 (16:22 +0100)]
player: fix teletext handling

7 weeks agocontrib: gnutls: fix forbidden calls in Winstore builds
Steve Lhomme [Tue, 19 May 2020 14:02:15 +0000 (16:02 +0200)]
contrib: gnutls: fix forbidden calls in Winstore builds

Backport a UNICODE fix that was merged after the GnuTLS code freeze.

Forbid call to GetHandleInformation(). fcntl never goes in that code section in
Winstore builds. It's only used for linux random number generation.

Do not allow calling SecureZeroMemory which is forbidden which is forbidden
and not available as an inline function in some cases.

7 weeks agowin32: use windowsappcompat instead of winstorecompat
Steve Lhomme [Fri, 29 May 2020 09:22:55 +0000 (11:22 +0200)]
win32: use windowsappcompat instead of winstorecompat

This is the proper counterpart to windowsapp.

Now that we have a proper Docker image to build it:
registry.videolan.org/vlc-debian-llvm-uwp:20200603145315

A recent mingw64 8 (unreleased) is needed to make use of this. It's available
in our Docker images and in msys2 (although it's using msvcrt so it will
probably fail to link properly)

The forced -lwindowsappcompat is added like the other LDFLAGS in configure.ac.

7 weeks agopackage/win32: build.sh: only force win10 API's for UWP builds
Steve Lhomme [Mon, 8 Jun 2020 11:46:44 +0000 (13:46 +0200)]
package/win32: build.sh: only force win10 API's for UWP builds

The other UCRT builds might work in win7.

7 weeks agofreetype: fix linking for Winstore builds
Steve Lhomme [Tue, 9 Jun 2020 10:35:05 +0000 (12:35 +0200)]
freetype: fix linking for Winstore builds

-luuid is needed as we use IID_IUnknown

Add missing $(AM_LIBADD) messing up the order of libraries

7 weeks agodsm: fix mismatched pointer
Steve Lhomme [Mon, 8 Jun 2020 15:13:55 +0000 (17:13 +0200)]
dsm: fix mismatched pointer

Fixes this warning with clang10:
incompatible pointer types passing 'u_long *' (aka 'unsigned long *') to parameter of type 'uint32_t *' (aka 'unsigned int *')

Similar to what is done in access/smb2.c

8 weeks agoqml: use constants for Video and Music track list sizes
Prince Gupta [Fri, 5 Jun 2020 15:27:25 +0000 (20:57 +0530)]
qml: use constants for Video and Music track list sizes

8 weeks agoqml: add sizes for video and music tracklist in VLCStyle
Prince Gupta [Fri, 5 Jun 2020 15:27:24 +0000 (20:57 +0530)]
qml: add sizes for video and music tracklist in VLCStyle

8 weeks agoqml: show bgHover color when row has focus in KeyNavigableTableView
Prince Gupta [Fri, 5 Jun 2020 15:27:23 +0000 (20:57 +0530)]
qml: show bgHover color when row has focus in KeyNavigableTableView

8 weeks agoqml: change bgHover of VLCColors to match designs
Prince Gupta [Fri, 5 Jun 2020 15:27:22 +0000 (20:57 +0530)]
qml: change bgHover of VLCColors to match designs

8 weeks agoqml: show play cover on VideoList cover images
Prince Gupta [Fri, 5 Jun 2020 15:27:21 +0000 (20:57 +0530)]
qml: show play cover on VideoList cover images

8 weeks agoqml: show play cover on MusicTrackList cover images
Prince Gupta [Fri, 5 Jun 2020 15:27:20 +0000 (20:57 +0530)]
qml: show play cover on MusicTrackList cover images

8 weeks agoqml: add table cover border and cover icon size constants to KeyNavigableTableView
Prince Gupta [Fri, 5 Jun 2020 15:27:19 +0000 (20:57 +0530)]
qml: add table cover border and cover icon size constants to KeyNavigableTableView

8 weeks agoqml: attach containsMouse and currentlyFocused property to delegates in KeyNavigableT...
Prince Gupta [Fri, 5 Jun 2020 15:27:18 +0000 (20:57 +0530)]
qml: attach containsMouse and currentlyFocused property to delegates in KeyNavigableTableView

8 weeks agoqml: introduce PlayCover widget
Prince Gupta [Fri, 5 Jun 2020 15:27:17 +0000 (20:57 +0530)]
qml: introduce PlayCover widget

8 weeks agoconfigure: fix pollfd test ordering
Rémi Denis-Courmont [Mon, 8 Jun 2020 15:02:45 +0000 (18:02 +0300)]
configure: fix pollfd test ordering

8 weeks agoCheck for <poll.h> explicitly
Rémi Denis-Courmont [Sat, 6 Jun 2020 13:47:43 +0000 (16:47 +0300)]
Check for <poll.h> explicitly

8 weeks agohttpd: don't wait until all clients are idle
Rémi Denis-Courmont [Sat, 6 Jun 2020 17:26:48 +0000 (20:26 +0300)]
httpd: don't wait until all clients are idle

As long as at least one client is active, we need to keep trying to
read/write to drain the RX buffers or fill the TX buffers.

We still need to poll (with zero timeout) to detect new connections.

Fixes #24824.

8 weeks agohttpd: process client I/O before polling
Rémi Denis-Courmont [Sat, 6 Jun 2020 17:21:10 +0000 (20:21 +0300)]
httpd: process client I/O before polling

In case of TLS, the TCP socket poll state does not necessarily match
the TLS stream state: data may be in the library-side TLS buffers.
So we need to try to read/write regardless of the socket events.

Refs #24824.

8 weeks agohttpd: update activity time on actual activity
Rémi Denis-Courmont [Sat, 6 Jun 2020 17:04:16 +0000 (20:04 +0300)]
httpd: update activity time on actual activity

Account for actual data read or written, rather than iteration of the
poll loop.

Note: This won't count TLS handshake progress as activity. But if
the client cannot complete the handshake within a time-out interval,
we might as well drop it.

8 weeks agohttpd: return progress status from I/O functions
Rémi Denis-Courmont [Sat, 6 Jun 2020 16:59:56 +0000 (19:59 +0300)]
httpd: return progress status from I/O functions

So the caller knows if the client needs to be polled or not.

8 weeks agohttpd: reduce variable scope
Rémi Denis-Courmont [Sat, 6 Jun 2020 17:09:57 +0000 (20:09 +0300)]
httpd: reduce variable scope

8 weeks agohttpd: don't bother processing failed connection
Rémi Denis-Courmont [Sat, 6 Jun 2020 16:56:10 +0000 (19:56 +0300)]
httpd: don't bother processing failed connection

If the underlying stream failed, there's no point processing an
outstanding request. It's most likely incomplete, and in any case, we
won't be able to send the response.

That corner case only made sense for connections half-closed on read
end. (Even then, it's a little questionable, because half-closed
connections eventually time out if not fully closed.)

8 weeks agohttpd: match protocol before request verb
Rémi Denis-Courmont [Sat, 6 Jun 2020 16:50:57 +0000 (19:50 +0300)]
httpd: match protocol before request verb

8 weeks agohttpd: use ARRAY_SIZE()
Rémi Denis-Courmont [Sat, 6 Jun 2020 16:48:27 +0000 (19:48 +0300)]
httpd: use ARRAY_SIZE()

8 weeks agohttpd: reorder, de-indent
Rémi Denis-Courmont [Sat, 6 Jun 2020 16:45:10 +0000 (19:45 +0300)]
httpd: reorder, de-indent

(No functional changes)

8 weeks agomjpeg: fix incorrect vlc_object_t pointer usage
Steve Lhomme [Mon, 8 Jun 2020 11:27:21 +0000 (13:27 +0200)]
mjpeg: fix incorrect vlc_object_t pointer usage

"passing argument 1 of ‘vlc_obj_malloc’ from incompatible pointer type"
"expected ‘vlc_object_t *’ {aka ‘struct vlc_object_t *’} but argument is of type ‘demux_t *’"

Warnings introduced in

9a55abf4e2b9f37d577152df0cb3962b29e55002

8 weeks agodemux: adaptive: make Content-Type no longer authoritative
Francois Cartegnie [Sun, 7 Jun 2020 17:55:21 +0000 (19:55 +0200)]
demux: adaptive: make Content-Type no longer authoritative

tired of bogus HLS configs
ref #24817

8 weeks agortp: ignore MSG_TRUNC if missing
Rémi Denis-Courmont [Sun, 7 Jun 2020 07:35:02 +0000 (10:35 +0300)]
rtp: ignore MSG_TRUNC if missing

(same as VLC 3.0 does)

8 weeks agomjpeg: fix leak
Rémi Denis-Courmont [Sat, 6 Jun 2020 14:23:37 +0000 (17:23 +0300)]
mjpeg: fix leak

8 weeks agortp: fix include order
Rémi Denis-Courmont [Sat, 6 Jun 2020 13:46:31 +0000 (16:46 +0300)]
rtp: fix include order

System headers must be included before VLC ones, especially on Windows.

8 weeks agortp: fix typo
Rémi Denis-Courmont [Sat, 6 Jun 2020 13:41:00 +0000 (16:41 +0300)]
rtp: fix typo

8 weeks agortp: add missing HAVE_POLL guard
Rémi Denis-Courmont [Sat, 6 Jun 2020 09:05:10 +0000 (12:05 +0300)]
rtp: add missing HAVE_POLL guard

8 weeks agortp: fix build without SRTP
Rémi Denis-Courmont [Sat, 6 Jun 2020 09:04:12 +0000 (12:04 +0300)]
rtp: fix build without SRTP

8 weeks agognutls: remove EXPORT priority option (fixes #24823)
Rémi Denis-Courmont [Sat, 6 Jun 2020 06:04:10 +0000 (09:04 +0300)]
gnutls: remove EXPORT priority option (fixes #24823)

This does not or no longer exist.

8 weeks agoblock: fix copy paste error (fixes #24811)
Rémi Denis-Courmont [Wed, 3 Jun 2020 16:35:21 +0000 (19:35 +0300)]
block: fix copy paste error (fixes #24811)

8 weeks agoblock: zero counters on block_FifoEmpty()
Rémi Denis-Courmont [Wed, 3 Jun 2020 16:30:02 +0000 (19:30 +0300)]
block: zero counters on block_FifoEmpty()

Call vlc_fifo_DequeueAllUnlocked() so that the block and byte counters
are correctly reset to zero.

Refs #24811.

8 weeks agortp: remove constant thread_ready flag
Rémi Denis-Courmont [Sun, 26 Apr 2020 12:54:38 +0000 (15:54 +0300)]
rtp: remove constant thread_ready flag

8 weeks agortp: use struct vlc_dtls
Rémi Denis-Courmont [Sun, 10 May 2020 12:11:08 +0000 (15:11 +0300)]
rtp: use struct vlc_dtls