1
mirror of https://code.videolan.org/videolan/vlc synced 2024-08-27 04:21:53 +02:00
Commit Graph

967 Commits

Author SHA1 Message Date
Francois Cartegnie
cea941e930 demux/mux: ps: map MPEG-H 2022-04-23 13:30:17 +00:00
Francois Cartegnie
8ac99ac7d7 mux: ps: map HEVC 2022-04-23 13:30:17 +00:00
Francois Cartegnie
79ec2f0c7d mux: ps: fix mapping of AAC audio 2022-04-23 13:30:17 +00:00
Alexandre Janniaux
6b7a57f984 modules: fix typos
Typos found and reworked from codespell.
2022-01-08 15:19:32 +00:00
Lyndon Brown
6f68f89498 plugins: purge use of set_category()
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.
2021-12-20 09:45:01 +00:00
Zhao Zhili
53d7fd3971 mux:ts: use block_chain to send data
So access_out can combine multiple ts packets into single chunk.
2021-09-03 07:00:29 +00:00
Rémi Denis-Courmont
dd20ace531 Rename VLC_EBADVAR to VLC_EINVAL 2021-07-14 14:53:16 +00:00
Romain Vimont
e5d44f6af0 vlc_tick: add MIN and MAX constants
Replace INT64_MIN and INT64_MAX used as vlc_tick_t values by
VLC_TICK_MIN and VLC_TICK_MAX.
2021-07-10 14:26:56 +00:00
Lyndon Brown
145a112e7f mux/ps,ts: simplify debug message construction
per suggestion in MR review.
2021-06-12 13:09:35 +00:00
Lyndon Brown
3ffbe14cd9 iso639: add capability for 'any-field' alternate searches
esout, dvdnav and bluray are currently using a very old hack of searching
all fields of the raw language table for searches where they want to allow
matches against the names, not just codes. this is a step towards getting
rid of that ugly old hack by offering proper functionality for doing such
a search.

the implementation currently duplicates that used by the three previously
mentioned use cases. i intend to rework the implementation in a subsequent
commit; first though we need to just set things up for simply removing the
hack. that new implementation will better justify this being done with a
flag rather than a separate function.
2021-06-12 13:09:35 +00:00
Lyndon Brown
1ea387054f iso639: ditch use of the 'unknown' record
just return NULL instead - much more simple and efficient.
2021-06-12 13:09:35 +00:00
Lyndon Brown
61bdcc3ff6 iso639: de-duplicate code lookup handling
...with a new function, which also replaces direct use of the three
code-specific functions.

all users of these three functions had a common pattern of using the
iso-639-1 lookup for len==2 codes, and for len==3 doing a 2B lookup,
falling back to a 2T lookup if that failed.

this pattern is now implemented in the new `vlc_find_iso639()` function.

the three individual functions are now made private, not being needed
publicly anymore. they also now just do a straight `strcmp()` rather than
`strncmp()` because they are only called for the right length of strings.

the implementation will be tweaked slightly in the next commit.
2021-06-12 13:09:35 +00:00
Lyndon Brown
570a218dec mux/ts: ditch unnecessary helper function
this was introduced in b8774b3c1a as part of
de-duplicating code, however the two blocks that used the relevant code
were also merged in the same commit, making the function unnecessary.

this is being done partly as cleanup before the next commit, which would
remove it anyway, but doing it separately first makes the diffs more
clear.

this brings the use of the lookup functions back into line with use
everywhere else in the codebase.
2021-06-12 13:09:35 +00:00
Lyndon Brown
740d1347f0 mux/ts: fix buggy iso639 handling
a handful of small mistakes were made in "simplifying" the iso-639
handling back in b8774b3c1a. this
corrects those mistakes, and in doing so brings this back into line
with all other use of the iso-639 lookup functions.

the mistakes:

 1. the english/native comments were added the wrong way around.

 2. the 2T fallback lookup was made unreachable.

    after searching with the 2B code, we either have a match, or the
    'unknown' record (which uses '?' characters). since every single entry
    in the table has a non-empty 2T code (ignoring the irrelevant end
    marker), and since the 'unknown' item also has a non-empty 2T code
    ("???"), the fallback path to search with 2T would never be triggered.

 3. the avoidance of storing language code on failed lookup was broken.

    the `*code` condition would always be true, since matching records
    always have a 2T code, and for no match "???" is always returned from
    the 'unknown' record. this means that for failed matches, "???" would
    be unintentionally written into the entry.

 4. the len==3 condition on iso-639-2 lookup was lost.

    the previous code conditionally only performed an iso-639-2 lookup if
    the string length is 3, just like all other cases of such lookups
    throughout the codebase. there was no specific reason for this to have
    been removed here. (this is going to get restored anyway momentarily
    when the code gets de-duplicated by a new function).

 5. an incorrect comment was given to the newly introduced function.

    the new `GetIso639_2LangCode()` helper function it introduced always
    returns len==3 strings, never len==0.
2021-06-12 13:09:35 +00:00
Romain Vimont
3716a7da5b config: remove remaining "advanced" flags
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.
2021-06-06 08:42:50 +00:00
Lyndon Brown
3ca23043d0 asf: purge long unused constant
unused since 8f45b1e59d
2021-05-29 19:21:35 +01:00
Lyndon Brown
d7410abecd ts: obsolete --sout-ts-bmin and --sout-ts-bmax
just as hinted in the option long descriptions, these options are actually
obsolete, but were never converted to actual obsolete options

a little code was left that read, stored and reacted to the option values,
however it really did nothing at all useful:
 1) if min > max, gives warning and sets to zero - POINTLESS
 2) if min or max > 0, gives error about not supported - POINTLESS
 3) if bit rate goes above max, gives warning - POINTLESS
2021-04-27 15:13:28 +00:00
Alexandre Janniaux
51b69b7f5d libmp4mux: fix zero initialization
The first element (initialized here by the = { 0 }) is an array, and
require braces. To avoid clunky braces, use the designated zero
initialization with a known simpler field.
2021-02-15 15:10:34 +01:00
Alexandre Janniaux
daf2388225 mpeg: ts: remove unused variable 2021-01-25 10:50:49 +01:00
Rémi Denis-Courmont
2a6cc8a2d3 mpjpeg mux: do not use block_FifoCount() 2021-01-19 19:26:11 +02:00
Francois Cartegnie
29bb1cf43c mux: ts/pes: add proper handling for payload injection
currently totally broken with blind double injection
of parameters creating empty access units
2021-01-13 17:53:48 +01:00
Francois Cartegnie
3dd29523ee mux: ts: don't write dts if dts==pts 2021-01-13 17:51:12 +01:00
Rémi Denis-Courmont
7a388292db csa: do not handle impossibly NULL object 2020-12-04 17:31:16 +02:00
Rémi Denis-Courmont
b66b683f07 mux/ts: add missing error check 2020-12-04 17:31:16 +02:00
Rémi Denis-Courmont
811b77c304 csa: do not handle impossible NULL argument
The CSA structure cannot be NULL in this context.
2020-12-04 17:30:57 +02:00
Hugo Beauzée-Luyssen
6d1b2b6edb libmp4mux: Pass a value to the initializer-list
A value is mandated by C standard
2020-12-04 11:09:06 +01:00
Steve Lhomme
5bfcd57fb5 mux: ps: use CLOCK_FREQ for vlc_tick_t based conversions
We don't have a helper, yet, to convert ticks to a bitrate.
2020-08-17 16:13:47 +02:00
Steve Lhomme
0e9c5de258 mux: ps: fix INT64_MAX used as a vlc_tick_t value 2020-08-13 14:06:55 +02:00
Francois Cartegnie
6b6387a509 mux: ts: fix rate shaping backward PCR bug
16y old bug with spu or es add..
2020-05-28 16:33:24 +02:00
Francois Cartegnie
77d9bd03e4 mux: mp4: mux PCM audio 2020-04-29 10:42:32 +02:00
Francois Cartegnie
a7112e52c8 mux: mp4: rework and fix audio samples descs 2020-04-29 10:42:32 +02:00
Francois Cartegnie
5cda7a2772 mux: mp4: remove unknown srcq
Unregistered, Unlisted, unexplained. (source quality ?)
Appears only with old mov.

Matrix_Reloaded_final_theatrical_trailer-SVQ3-mp4a.mov
program480_dl-small2.mov
2020-04-29 10:42:32 +02:00
Francois Cartegnie
20bbc02c3f mux: mp4: refactor wave box 2020-04-29 10:42:32 +02:00
Francois Cartegnie
8b0f67e2b7 mux: mp4: write sample rate box 2020-04-29 10:42:32 +02:00
Francois Cartegnie
9d86e976f0 mux: mp4: fix audio header 2020-04-29 10:42:32 +02:00
Rémi Denis-Courmont
2a2fd11f5a mux: remove MUX_GET_ADD_STREAM_WAIT
For now, assume that this is always true. Eventually, we probably want
to give more flexibility and responsibility to the muxer than the core,
but for now, this removes one dependency from muxer to the sout
instance.
2020-03-03 19:31:54 +02:00
Rémi Denis-Courmont
fe03aca9d9 mux: remove dead GET_STREAM_ADD_WAIT code
This makes no sense in a muxer which does not support adding streams
while muxing.
2020-03-03 19:31:54 +02:00
Rémi Denis-Courmont
a3226cf890 thread: remove vlc_mutex_destroy() 2020-02-21 19:16:09 +02:00
Francois Cartegnie
eb7ed18018 mux: mp4: set interlacing for YUV formats 2020-01-21 16:44:56 +01:00
Francois Cartegnie
b89ab562be mux: mp4: add quicktime yuv variants 2020-01-08 21:49:35 +01:00
Francois Cartegnie
5990e3769d mux: mp4: append colr box for yuv 2020-01-08 21:49:35 +01:00
Francois Cartegnie
3e4cc6b6dd mux: mp4: fix YUYV mapping 2020-01-08 21:49:35 +01:00
Francois Cartegnie
2f7480e923 mux: mp4: handle SPU with palette 2020-01-06 17:34:34 +01:00
Francois Cartegnie
0af9751167 mux: mp4: allow to pass arbitrary extradata in esds 2020-01-06 17:34:34 +01:00
Francois Cartegnie
3ff55d29f2 mux: mp4: fix SUBT codec mapping 2020-01-06 17:34:34 +01:00
Francois Cartegnie
ab56eb1642 mux: mp4: alloc late tracks in non fragmented mode
As we have proper edit list support, we can allow late streams.
Should solve issues with user doing transcoding without tuning
sout-mux-caching
2019-10-23 13:19:58 +02:00
Francois Cartegnie
fd52f2c265 mux: libmp4: fix type 2019-10-23 13:19:51 +02:00
Francois Cartegnie
51bd5ed742 mux: libmp4: check max samples 2019-10-23 13:19:51 +02:00
Francois Cartegnie
0dc6112834 mux: libmp4: use vlc_realloc_array 2019-10-23 13:19:51 +02:00
Francois Cartegnie
68b8d40f37 mux: libmp4: check id limits 2019-10-23 13:19:51 +02:00