...unless they were forced to relative locally.
decoder_NewSubpicture() calls spu.buffer_new which always calls subpicture_New().
And subpicture_New() sets subpictures are absolute by default.
This separates the region type from its container.
The drawback is that it makes the structure bigger. But we get plenty
of helpers. There might be other containers suitable but we use a mix of
append and prepend.
Fix the -Wstringop-truncation warning by setting a correct size to the
line being read:
../../modules/codec/telx.c: In function ‘Decode’:
../../modules/codec/telx.c:583:9: warning: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 255 [-Wstringop-truncation]
583 | strncpy( p_sys->ppsz_lines[0], psz_line,
| ^
../../modules/codec/telx.c:535:9: warning: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 255 [-Wstringop-truncation]
535 | strncpy( p_sys->ppsz_lines[row], t,
| ^
../../modules/codec/telx.c:501:9: warning: ‘__builtin_strncpy’ output may be truncated copying 127 bytes from a string of length 255 [-Wstringop-truncation]
501 | strncpy( p_sys->ppsz_lines[0], psz_line,
| ^
Since at most `len` characters are read from the input, and an utf-8
caracter is written in the output for each character from the input,
and since the to_utf8 function only supports utf-8 characters with at
most 3 characters, then it's not possible to write more than 3 times len
into the output buffer, without accounting the terminating character.
Additional related changes are made to:
- Move the creation of psz_line close to decode_string, since that's
the main first user and it needs the size of the buffer, helping
readability.
- Add assertion checking that we don't extend utf-8 to 4 bytes, which
is mainly for development, since the function will not outreach the
bounds of psz_line anyway.
- Add some documentation for `decode_string` so it's clearer how the
length of the buffer should be assigned.
We don't need to know it's a pointer and can save 2 characters.
No functional changes. This is simply renaming "dec->p_fmt_in",
"decoder->p_fmt_in", "dec.p_fmt_in" and "packetizer->p_fmt_in"
see e967f81f6a.
note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
The config "advanced" flag was unused and has been removed by
6a7a137f7b.
It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
Make sure the dbg macro can't compile down to nothing, so it can be used in
if statements without braces.
codec/telx.c: In function ‘Decode’:
codec/telx.c:686:81: warning: suggest braces around empty body in an ‘if’
statement [-Wempty-body]
(long int)(p_sys->prev_pts+1500000)));
^
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Do not declare *_sys_t typedefs globally in vlc_common.h. Instead,
declare them locally in each module that provides a definition.
This paves the way to move C++ definitions into anonymous namespaces in
order to respect C++ ODR.
The picture_resource_t and sout_stream_id_sys_t typedefs will be handled
separately, since they require specific additional changes.
See #18033
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Use only one callback for every decoder types:
int (*pf_decode)(decoder_t *, block_t *p_block);
There is now only one way to send output frames/blocks from a decoder module:
using decoder_QueueVideo(), decoder_QueueAudio() and decoder_QueueSub()
functions.
This fixes transcoding not receiving any output when a decoder used
decoder_Queue*() function.
The pf_packetize callback is kept unchanged. A packetizer shouldn't be
asynchronous at all (and this simplify the locking for decoder core).
The pf_decode callback returns, for now, only one value: SUCCESS. This will
allow a module to send more status.
Re-license almost all the playback modules to LGPLv2.1+ with
authorization from their respective contributors (230+)
This includes:
- access, codec, packetizers, demux
- audio filters, audio mixers, audio output
- video filters, video chroma, video output
- text renderers
- XML parser
- ARM NEON and SSE2 optimisations (mostly for chromas and filters)
Some modules are not concerned:
- BDA and DShow access modules because Manol Manolov is AWOL
- Real RTSP, because it is derived from Xine
- x264 and t140 because they are encoders only
- DLL Loader, because it is derived from MPlayer
- DTS packetizer, because Jon Lech Johansen is AWOL
- Shine and WMAfixed, because they are derived from Rockbox
- Real demuxer, as it is derived from MPlayer and Wang Bo is AWOL
- MPC demuxer, as Yavor Doganov is AWOL
- Tivo demuxer, because it is derived from an MPlayer fork
- Playlist demuxer, (WPL and ZPL parts missing), because suheaven is AWOL
- iOS audio output and video display, because author refuses the license change
- Equalizer and compressor, because Ronald Wright is AWOL
- Mono, Headphone and Dolby, because author refuses the license change
- hqdn3d and yadif, because they are from MPlayer/libavfilter
- remoteosd, because it derives from RealVNC code
- MMX optimisations, because Ollie Lho, from SiS, is AWOL
- Rotate, because it depends on GPL motion
Nota Bene:
- Some modules depend on GPL-only libraries, a LGPL module does not mean
that the resulting binary module will be LGPL.
Libraries affected would include liba52, libdvdcss, libdvdnav, libdvdread,
faad2, libdca, libmad, libmpeg2, libpostproc, SRC, sid, zvbi and probably others.
- This is needed for proper seek/pause/fast forward/...
- The decoder/packetizer do not need to scale packet length anymore as the
decoder thread do it.