Use navigation from demux controls instead of hacking "key-action"
callbacks.
This allow to fallback to seek/volume handling if the mkv does not
handle navigation (=> PCI).
Before this commit, both seek/volume and mkv navigation were processed.
This also avoid to alloc, lock, append, wake up a thread when the user
press a key (not only, the nav ones).
Apart from the stand-alone window provider (which requires server-side
decorations), this provider cannot practically be used - unless
reference counting is supported.
So check that reference counting is supported and fail safe otherwise.
As it stands, uri (result of input_item_GetURI()) is leaked when:
- path is NULL
- containingDir is not a dir
- file is not a local file
- none of the early returns are taken but uri is not NULL or empty
To tackle these all at once, use vlc::wrap_cptr.
Fixes: 1b95adaae5
Also free the pointer when returning in case the path is not a
directory (this error condition was added later). To make sure this leak
does not resurface, use vlc::wrap_cptr.
Fixes: 73f7b18619
Using GBM device to provide the EGL display fix scenarios where
EGL_KHR_display_reference extension isn't available and the display ends up
being shared with the UI, causing it to be destroyed when the video output is
closed.
It should be possible to mux raw text directly without having to use a
VTT encoder. For context, both the HLS and whisper stream output modules
will eventually output raw text subtitles.
After commit 050c31bfaf, rmask was used as
a sentinel value to initialize the default value of masks.
The check on rmask was removed because the value assigned in that case
in commit 47af51ec58 because the RGB mask
was always assigned to 0.
But now, there's nothing guaranteeing that the value are correctly
initialized since nothing guarantees that any format will be found.
Since BI_BITFIELDS indicate that a mask is required, we can throw an
error if the fourcc chroma has no mask defined instead. To ensure that
it is correctly signaled in the code for the user and compiler, we also
use the iteration variable instead of a sentinel.
Fix the following warnings:
In file included from vlc/modules/demux/avi/avi.c:50:
vlc/modules/demux/avi/bitmapinfoheader.h:324:26: warning: variable 'i_gmask' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
for( size_t i=0; i<ARRAY_SIZE(bitmap_rgb_masks); i++ )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:336:35: note: uninitialized use occurs here
SetDWLE( &p_bmiColors[4], i_gmask );
^~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:324:26: note: remove the condition if it is always true
for( size_t i=0; i<ARRAY_SIZE(bitmap_rgb_masks); i++ )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:323:37: note: initialize the variable 'i_gmask' to silence this warning
uint32_t i_rmask = 0,i_gmask,i_bmask, i_amask;
^
= 0
vlc/modules/demux/avi/bitmapinfoheader.h:324:26: warning: variable 'i_bmask' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
for( size_t i=0; i<ARRAY_SIZE(bitmap_rgb_masks); i++ )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:337:35: note: uninitialized use occurs here
SetDWLE( &p_bmiColors[8], i_bmask );
^~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:324:26: note: remove the condition if it is always true
for( size_t i=0; i<ARRAY_SIZE(bitmap_rgb_masks); i++ )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vlc/modules/demux/avi/bitmapinfoheader.h:323:45: note: initialize the variable 'i_bmask' to silence this warning
uint32_t i_rmask = 0,i_gmask,i_bmask, i_amask;
^
= 0