Compare commits
153 Commits
Author | SHA256 | Date | |
---|---|---|---|
f3e2b6924c | |||
0da0a64aaa | |||
cc43f90749 | |||
90cf284cf4 | |||
7052296496 | |||
f8931d8e16 | |||
6aaa7565f3 | |||
c50f93f5d8 | |||
037b8e7b56 | |||
32f723070b | |||
5fa80ba325 | |||
c8fb519bd5 | |||
4982495d81 | |||
b2d529be40 | |||
0953d1a233 | |||
4d6b327c96 | |||
0ea898ed7d | |||
46a5e0ab1d | |||
7dd518e74c | |||
492ebba9ea | |||
d40eb72e81 | |||
93b91daf9a | |||
cfd58babf9 | |||
2c078b5253 | |||
b6adcf6647 | |||
d30747330e | |||
71a71fe72a | |||
022ce4a695 | |||
093f4ccc7d | |||
9e70399876 | |||
360ed494c0 | |||
f797e8b937 | |||
3e6032ed4a | |||
1dc08930d3 | |||
106f7d02ad | |||
aa357694f9 | |||
3fa8d9ea9b | |||
315d3dfa22 | |||
6399c0bd27 | |||
0410563808 | |||
|
24f4ced017 | ||
0dca2a1888 | |||
3868242037 | |||
c728f1663d | |||
465dc10706 | |||
fed4d390af | |||
b58171e977 | |||
4b5a9234a2 | |||
21c4a02f28 | |||
e8602af0dd | |||
02ffeca138 | |||
23bb770596 | |||
5cf1297353 | |||
66701c0fa6 | |||
0b77b9d5fc | |||
4609491f46 | |||
7466b1831e | |||
b746b4b54a | |||
8050e20b4a | |||
f57b491ee1 | |||
dcafea02e6 | |||
e28a6501a8 | |||
7a004ec6c7 | |||
dc491ff9a5 | |||
|
13bf05eb8f | ||
32f637d785 | |||
8f517445ed | |||
e0bf38d3dd | |||
01eaffbd10 | |||
046d57a571 | |||
60011ac364 | |||
1df2224988 | |||
af6f70cf26 | |||
f3ac3a4f41 | |||
b0b1630bd4 | |||
974bd89e60 | |||
f1d17069be | |||
f3974dd3d9 | |||
5dba059adf | |||
2194f0664a | |||
f014f871bc | |||
fda1a957d3 | |||
aa723f371d | |||
5d922ba110 | |||
76149c9cc5 | |||
0036181509 | |||
31544b27e0 | |||
930dfcd6d0 | |||
3f45258a50 | |||
f5083701c7 | |||
8c38ac889e | |||
a49c78f644 | |||
ebd500c7d6 | |||
ecbe9040be | |||
6ff312410d | |||
1ffb812fc3 | |||
e73a65902f | |||
7e26732018 | |||
1e4285afab | |||
e698373517 | |||
e3a1a2e40c | |||
4b1fdd960b | |||
d0126770a3 | |||
67a9e416f0 | |||
c3b0f652b5 | |||
52c38baa1c | |||
5e2acc8ec0 | |||
3867a2a6ce | |||
4d9d52edbd | |||
|
2318cf177f | ||
43db5770c7 | |||
924de4cd12 | |||
955661ae04 | |||
4aba174a64 | |||
|
398f42be0c | ||
|
8d36eb3017 | ||
6e6f2b2b69 | |||
38b5f84776 | |||
|
7ef0bc84d9 | ||
ddcaeb1d63 | |||
8556638af1 | |||
172829a7fa | |||
518a6828de | |||
1cefba4698 | |||
276a7b0a58 | |||
f5a171af1d | |||
|
1dd41520ba | ||
|
28d9240a68 | ||
|
6f2427c28f | ||
|
75f2d78b74 | ||
|
46b7fa1c7e | ||
|
60647b0c9d | ||
|
01c965c4e6 | ||
|
005f647e19 | ||
|
7206d15251 | ||
|
d212c1a987 | ||
|
2127725990 | ||
|
4dd0b9e0c1 | ||
|
8d4f64949d | ||
|
e6a9b0a989 | ||
|
de9a5bd906 | ||
|
8d42aff6b7 | ||
|
000a8cfdf5 | ||
|
f198e392b5 | ||
|
51b4ebe559 | ||
|
e6ab0a710d | ||
|
7c0dd3aa60 | ||
|
2d777ba574 | ||
|
115dab779f | ||
|
ad4ea17918 | ||
|
6ba3824b58 | ||
|
8e25aaea5f | ||
|
c4dd7f0688 |
177
4645.patch
177
4645.patch
@@ -1,177 +0,0 @@
|
||||
From 1e2918115ca2f5c4ffde00dc02ad89525714f6c2 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Guillem <thomas@gllm.fr>
|
||||
Date: Tue, 5 Dec 2023 09:23:35 +0100
|
||||
Subject: [PATCH 1/5] input: fix incompatible-pointer-types assignment
|
||||
|
||||
Fixes #28441
|
||||
---
|
||||
src/input/input_internal.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
|
||||
index d29731edca1b..ea02f39f5add 100644
|
||||
--- a/src/input/input_internal.h
|
||||
+++ b/src/input/input_internal.h
|
||||
@@ -117,7 +117,7 @@ typedef struct input_thread_private_t
|
||||
|
||||
/* Title infos FIXME multi-input (not easy) ? */
|
||||
int i_title;
|
||||
- const input_title_t **title;
|
||||
+ input_title_t * const *title;
|
||||
|
||||
int i_title_offset;
|
||||
int i_seekpoint_offset;
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From adcf4e66e2ce2c382bb97957c91bfde040f4f3ca Mon Sep 17 00:00:00 2001
|
||||
From: Zhao Zhili <quinkblack@foxmail.com>
|
||||
Date: Thu, 1 Mar 2018 14:25:59 +0800
|
||||
Subject: [PATCH 2/5] yadif: fix variable type
|
||||
|
||||
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
|
||||
(cherry picked from commit 77b86f4452be4dbe0d56a9cd1b66da61b116da60)
|
||||
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
|
||||
---
|
||||
modules/video_filter/deinterlace/yadif.h | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules/video_filter/deinterlace/yadif.h b/modules/video_filter/deinterlace/yadif.h
|
||||
index 4bc592ba9307..af16443d0804 100644
|
||||
--- a/modules/video_filter/deinterlace/yadif.h
|
||||
+++ b/modules/video_filter/deinterlace/yadif.h
|
||||
@@ -140,10 +140,10 @@ static void yadif_filter_line_c(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8
|
||||
}
|
||||
|
||||
static void yadif_filter_line_c_16bit(uint8_t *dst8, uint8_t *prev8, uint8_t *cur8, uint8_t *next8, int w, int prefs, int mrefs, int parity, int mode) {
|
||||
- uint8_t *dst = (uint8_t *)dst8;
|
||||
- uint8_t *prev = (uint8_t *)prev8;
|
||||
- uint8_t *cur = (uint8_t *)cur8;
|
||||
- uint8_t *next = (uint8_t *)next8;
|
||||
+ uint16_t *dst = (uint16_t *)dst8;
|
||||
+ uint16_t *prev = (uint16_t *)prev8;
|
||||
+ uint16_t *cur = (uint16_t *)cur8;
|
||||
+ uint16_t *next = (uint16_t *)next8;
|
||||
int x;
|
||||
uint16_t *prev2= parity ? prev : cur ;
|
||||
uint16_t *next2= parity ? cur : next;
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 45198e5328ff2b2f4eb2fb76add0789fec26270f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Sun, 3 Mar 2019 09:59:10 +0200
|
||||
Subject: [PATCH 3/5] swscale: avoid invalid pointer conversion
|
||||
|
||||
(cherry picked from commit ab00e6c59d42e05ab08893091783d8b5febc0058)
|
||||
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
|
||||
---
|
||||
modules/video_chroma/swscale.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
|
||||
index 8993d11ec5dd..11897527355c 100644
|
||||
--- a/modules/video_chroma/swscale.c
|
||||
+++ b/modules/video_chroma/swscale.c
|
||||
@@ -588,8 +588,9 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
|
||||
{
|
||||
filter_sys_t *p_sys = p_filter->p_sys;
|
||||
uint8_t palette[AVPALETTE_SIZE];
|
||||
- uint8_t *src[4]; int src_stride[4];
|
||||
- uint8_t *dst[4]; int dst_stride[4];
|
||||
+ uint8_t *src[4], *dst[4];
|
||||
+ const uint8_t *csrc[4];
|
||||
+ int src_stride[4], dst_stride[4];
|
||||
|
||||
GetPixels( src, src_stride, p_sys->desc_in, &p_filter->fmt_in.video,
|
||||
p_src, i_plane_count, b_swap_uvi );
|
||||
@@ -606,11 +607,14 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
|
||||
GetPixels( dst, dst_stride, p_sys->desc_out, &p_filter->fmt_out.video,
|
||||
p_dst, i_plane_count, b_swap_uvo );
|
||||
|
||||
+ for (size_t i = 0; i < ARRAY_SIZE(src); i++)
|
||||
+ csrc[i] = src[i];
|
||||
+
|
||||
#if LIBSWSCALE_VERSION_INT >= ((0<<16)+(5<<8)+0)
|
||||
- sws_scale( ctx, src, src_stride, 0, i_height,
|
||||
+ sws_scale( ctx, csrc, src_stride, 0, i_height,
|
||||
dst, dst_stride );
|
||||
#else
|
||||
- sws_scale_ordered( ctx, src, src_stride, 0, i_height,
|
||||
+ sws_scale_ordered( ctx, csrc, src_stride, 0, i_height,
|
||||
dst, dst_stride );
|
||||
#endif
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 4431076ad4a21fdcabd3f7ef1d61c45891689b0c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Sun, 3 Mar 2019 17:20:04 +0200
|
||||
Subject: [PATCH 4/5] dynamicoverlay: fix variable shadowing
|
||||
|
||||
(cherry picked from commit d42e05d6b2c061ae352c131d5aebf8c8d8aa6d35)
|
||||
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
|
||||
---
|
||||
modules/spu/dynamicoverlay/dynamicoverlay_commands.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
index a93462925e8a..a85f9aafb0b9 100644
|
||||
--- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
+++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
@@ -899,12 +899,11 @@ static const commanddesc_static_t p_commands[] =
|
||||
void RegisterCommand( filter_t *p_filter )
|
||||
{
|
||||
filter_sys_t *p_sys = (filter_sys_t*) p_filter->p_sys;
|
||||
- size_t i_index = 0;
|
||||
|
||||
p_sys->i_commands = ARRAY_SIZE(p_commands);
|
||||
p_sys->pp_commands = (commanddesc_t **) calloc( p_sys->i_commands, sizeof(commanddesc_t*) );
|
||||
if( !p_sys->pp_commands ) return;
|
||||
- for( i_index = 0; i_index < p_sys->i_commands; i_index ++ )
|
||||
+ for( size_t i_index = 0; i_index < p_sys->i_commands; i_index ++ )
|
||||
{
|
||||
p_sys->pp_commands[i_index] = (commanddesc_t *) malloc( sizeof(commanddesc_t) );
|
||||
if( !p_sys->pp_commands[i_index] ) return;
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From fda14fc7c013eb75291df10cc8b88336c51328ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Mon, 26 Feb 2018 20:43:03 +0200
|
||||
Subject: [PATCH 5/5] dynamicoverlay: fix memory corruption
|
||||
|
||||
Font alpha is 8-bits, not 32-bits.
|
||||
|
||||
(cherry picked from commit 6f14081af7325d334a53126c4eea52bc30fc08a0)
|
||||
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
|
||||
---
|
||||
modules/spu/dynamicoverlay/dynamicoverlay_commands.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
index a85f9aafb0b9..7a71c6f2373a 100644
|
||||
--- a/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
+++ b/modules/spu/dynamicoverlay/dynamicoverlay_commands.c
|
||||
@@ -234,8 +234,12 @@ static int parser_SetTextAlpha( char *psz_command, char *psz_end,
|
||||
skip_space( &psz_command );
|
||||
if( isdigit( (unsigned char)*psz_command ) )
|
||||
{
|
||||
- if( parse_digit( &psz_command, &p_params->fontstyle.i_font_alpha ) == VLC_EGENERIC )
|
||||
+ int32_t value;
|
||||
+
|
||||
+ if( parse_digit( &psz_command, &value ) == VLC_EGENERIC )
|
||||
return VLC_EGENERIC;
|
||||
+
|
||||
+ p_params->fontstyle.i_font_alpha = value;
|
||||
}
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
775
5574.patch
Normal file
775
5574.patch
Normal file
@@ -0,0 +1,775 @@
|
||||
From 81d6d56df6e5a66ed99970e2c559539858f4a0b7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Sat, 5 May 2018 15:28:15 +0300
|
||||
Subject: [PATCH 01/11] avcodec: avoid signedness mismatch warning
|
||||
|
||||
Bitmask should be unsigned, but ffmpeg seems confused with itself.
|
||||
|
||||
(cherry picked from commit 8544233e7fde2965435e32a445494898440ecc30)
|
||||
---
|
||||
modules/codec/avcodec/audio.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
|
||||
index 50a76c7a18e1..e5af0ca5f2f8 100644
|
||||
--- a/modules/codec/avcodec/audio.c
|
||||
+++ b/modules/codec/avcodec/audio.c
|
||||
@@ -593,9 +593,9 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
uint32_t pi_order_src[i_order_max];
|
||||
|
||||
int i_channels_src = 0;
|
||||
- int64_t channel_layout =
|
||||
+ uint64_t channel_layout =
|
||||
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
|
||||
- av_get_default_channel_layout( p_sys->p_context->channels );
|
||||
+ (uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
|
||||
|
||||
if( channel_layout )
|
||||
{
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From c7709e7a048eb69b656d7f9663debbc1dde1f591 Mon Sep 17 00:00:00 2001
|
||||
From: Ilkka Ollakka <ileoo@videolan.org>
|
||||
Date: Wed, 5 Jul 2023 12:51:34 +0300
|
||||
Subject: [PATCH 02/11] avcodec: use p_dec->fmt_out instead of context channels
|
||||
on audio channel-count
|
||||
|
||||
reduces the need of ifdefs when adding ch_layout support
|
||||
|
||||
(cherry picked from commit bddf5ba19111d1cc4463d9876c4bc4ba75f82d7f)
|
||||
---
|
||||
modules/codec/avcodec/audio.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
|
||||
index e5af0ca5f2f8..26166c084e51 100644
|
||||
--- a/modules/codec/avcodec/audio.c
|
||||
+++ b/modules/codec/avcodec/audio.c
|
||||
@@ -484,15 +484,15 @@ static block_t * ConvertAVFrame( decoder_t *p_dec, AVFrame *frame )
|
||||
/* Interleave audio if required */
|
||||
if( av_sample_fmt_is_planar( ctx->sample_fmt ) )
|
||||
{
|
||||
- p_block = block_Alloc(frame->linesize[0] * ctx->channels);
|
||||
+ p_block = block_Alloc(frame->linesize[0] * p_dec->fmt_out.audio.i_channels );
|
||||
if ( likely(p_block) )
|
||||
{
|
||||
- const void *planes[ctx->channels];
|
||||
- for (int i = 0; i < ctx->channels; i++)
|
||||
+ const void *planes[p_dec->fmt_out.audio.i_channels];
|
||||
+ for (int i = 0; i < p_dec->fmt_out.audio.i_channels; i++)
|
||||
planes[i] = frame->extended_data[i];
|
||||
|
||||
aout_Interleave(p_block->p_buffer, planes, frame->nb_samples,
|
||||
- ctx->channels, p_dec->fmt_out.audio.i_format);
|
||||
+ p_dec->fmt_out.audio.i_channels, p_dec->fmt_out.audio.i_format);
|
||||
p_block->i_nb_samples = frame->nb_samples;
|
||||
}
|
||||
av_frame_free(&frame);
|
||||
@@ -511,7 +511,7 @@ static block_t * ConvertAVFrame( decoder_t *p_dec, AVFrame *frame )
|
||||
{
|
||||
aout_ChannelExtract( p_buffer->p_buffer,
|
||||
p_dec->fmt_out.audio.i_channels,
|
||||
- p_block->p_buffer, ctx->channels,
|
||||
+ p_block->p_buffer, p_dec->fmt_out.audio.i_channels,
|
||||
p_block->i_nb_samples, p_sys->pi_extraction,
|
||||
p_dec->fmt_out.audio.i_bitspersample );
|
||||
p_buffer->i_nb_samples = p_block->i_nb_samples;
|
||||
@@ -600,13 +600,13 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
if( channel_layout )
|
||||
{
|
||||
for( unsigned i = 0; i < i_order_max
|
||||
- && i_channels_src < p_sys->p_context->channels; i++ )
|
||||
+ && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ )
|
||||
{
|
||||
if( channel_layout & pi_channels_map[i][0] )
|
||||
pi_order_src[i_channels_src++] = pi_channels_map[i][1];
|
||||
}
|
||||
|
||||
- if( i_channels_src != p_sys->p_context->channels && b_trust )
|
||||
+ if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust )
|
||||
msg_Err( p_dec, "Channel layout not understood" );
|
||||
|
||||
/* Detect special dual mono case */
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 99b14966182995314f5b29fd972d6a9000ea3e00 Mon Sep 17 00:00:00 2001
|
||||
From: Ilkka Ollakka <ileoo@videolan.org>
|
||||
Date: Wed, 5 Jul 2023 13:33:09 +0300
|
||||
Subject: [PATCH 03/11] avcodec: audio decoder to use ch_layout
|
||||
|
||||
(cherry picked from commit 496f0f2a659c1339d1e37330d446e9b6ce96e76b)
|
||||
---
|
||||
modules/codec/avcodec/audio.c | 42 ++++++++++++++++++++++++++++-------
|
||||
1 file changed, 34 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
|
||||
index 26166c084e51..ad8a40ab4ed6 100644
|
||||
--- a/modules/codec/avcodec/audio.c
|
||||
+++ b/modules/codec/avcodec/audio.c
|
||||
@@ -139,7 +139,11 @@ static int OpenAudioCodec( decoder_t *p_dec )
|
||||
}
|
||||
|
||||
ctx->sample_rate = p_dec->fmt_in.audio.i_rate;
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ av_channel_layout_default( &ctx->ch_layout, p_dec->fmt_in.audio.i_channels );
|
||||
+#else
|
||||
ctx->channels = p_dec->fmt_in.audio.i_channels;
|
||||
+#endif
|
||||
ctx->block_align = p_dec->fmt_in.audio.i_blockalign;
|
||||
ctx->bit_rate = p_dec->fmt_in.i_bitrate;
|
||||
ctx->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample;
|
||||
@@ -395,12 +399,17 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
|
||||
ret = avcodec_receive_frame( ctx, frame );
|
||||
if( ret == 0 )
|
||||
{
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ int channels = frame->ch_layout.nb_channels;
|
||||
+#else
|
||||
+ int channels = ctx->channels;
|
||||
+#endif
|
||||
/* checks and init from first decoded frame */
|
||||
- if( ctx->channels <= 0 || ctx->channels > INPUT_CHAN_MAX
|
||||
+ if( channels <= 0 || channels > INPUT_CHAN_MAX
|
||||
|| ctx->sample_rate <= 0 )
|
||||
{
|
||||
msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d",
|
||||
- ctx->channels, ctx->sample_rate );
|
||||
+ channels, ctx->sample_rate );
|
||||
goto drop;
|
||||
}
|
||||
else if( p_dec->fmt_out.audio.i_rate != (unsigned int)ctx->sample_rate )
|
||||
@@ -580,6 +589,16 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
p_dec->fmt_out.audio.i_rate = p_sys->p_context->sample_rate;
|
||||
|
||||
/* */
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ if( p_sys->i_previous_channels == p_sys->p_context->ch_layout.nb_channels &&
|
||||
+ p_sys->i_previous_layout == p_sys->p_context->ch_layout.u.mask )
|
||||
+ return;
|
||||
+ if( b_trust )
|
||||
+ {
|
||||
+ p_sys->i_previous_channels = p_sys->p_context->ch_layout.nb_channels;
|
||||
+ p_sys->i_previous_layout = p_sys->p_context->ch_layout.u.mask;
|
||||
+ }
|
||||
+#else
|
||||
if( p_sys->i_previous_channels == p_sys->p_context->channels &&
|
||||
p_sys->i_previous_layout == p_sys->p_context->channel_layout )
|
||||
return;
|
||||
@@ -588,25 +607,32 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
p_sys->i_previous_channels = p_sys->p_context->channels;
|
||||
p_sys->i_previous_layout = p_sys->p_context->channel_layout;
|
||||
}
|
||||
+#endif
|
||||
|
||||
const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map);
|
||||
uint32_t pi_order_src[i_order_max];
|
||||
|
||||
int i_channels_src = 0;
|
||||
- uint64_t channel_layout =
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ uint64_t channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
|
||||
+ int channel_count = p_sys->p_context->ch_layout.nb_channels;
|
||||
+#else
|
||||
+ uint64_t channel_layout_mask =
|
||||
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
|
||||
(uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
|
||||
+ int channel_count = p_sys->p_context->channels;
|
||||
+#endif
|
||||
|
||||
- if( channel_layout )
|
||||
+ if( channel_layout_mask )
|
||||
{
|
||||
for( unsigned i = 0; i < i_order_max
|
||||
- && i_channels_src < p_dec->fmt_out.audio.i_channels; i++ )
|
||||
+ && i_channels_src < channel_count; i++ )
|
||||
{
|
||||
- if( channel_layout & pi_channels_map[i][0] )
|
||||
+ if( channel_layout_mask & pi_channels_map[i][0] )
|
||||
pi_order_src[i_channels_src++] = pi_channels_map[i][1];
|
||||
}
|
||||
|
||||
- if( i_channels_src != p_dec->fmt_out.audio.i_channels && b_trust )
|
||||
+ if( i_channels_src != channel_count && b_trust )
|
||||
msg_Err( p_dec, "Channel layout not understood" );
|
||||
|
||||
/* Detect special dual mono case */
|
||||
@@ -638,7 +664,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
{
|
||||
msg_Warn( p_dec, "no channel layout found");
|
||||
p_dec->fmt_out.audio.i_physical_channels = 0;
|
||||
- p_dec->fmt_out.audio.i_channels = p_sys->p_context->channels;
|
||||
+ p_dec->fmt_out.audio.i_channels = channel_count;
|
||||
}
|
||||
|
||||
aout_FormatPrepare( &p_dec->fmt_out.audio );
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From c44edb85e4f25cbc7a848211d2d3ca9f03bd46e6 Mon Sep 17 00:00:00 2001
|
||||
From: Ilkka Ollakka <ileoo@videolan.org>
|
||||
Date: Tue, 4 Jul 2023 16:52:38 +0300
|
||||
Subject: [PATCH 04/11] avcodec: use p_enc audio channels instead of context
|
||||
channels in encoder
|
||||
|
||||
Allows to have less conditions in code when adding new ch_layout use
|
||||
|
||||
(cherry-picked from commit 29747a8abb98ba53a64aa6761983891eeed2e0e4)
|
||||
---
|
||||
modules/codec/avcodec/encoder.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
|
||||
index 4919ccf0e0e4..52848de06587 100644
|
||||
--- a/modules/codec/avcodec/encoder.c
|
||||
+++ b/modules/codec/avcodec/encoder.c
|
||||
@@ -790,7 +790,7 @@ int InitVideoEnc( vlc_object_t *p_this )
|
||||
}
|
||||
}
|
||||
}
|
||||
- if( i_channels_src != p_context->channels )
|
||||
+ if( i_channels_src != p_enc->fmt_out.audio.i_channels )
|
||||
msg_Err( p_enc, "Channel layout not understood" );
|
||||
|
||||
p_sys->i_channels_to_reorder =
|
||||
@@ -897,7 +897,7 @@ int InitVideoEnc( vlc_object_t *p_this )
|
||||
if( ret )
|
||||
{
|
||||
if( p_enc->fmt_in.i_cat != AUDIO_ES ||
|
||||
- (p_context->channels <= 2 && i_codec_id != AV_CODEC_ID_MP2
|
||||
+ (p_enc->fmt_out.audio.i_channels <= 2 && i_codec_id != AV_CODEC_ID_MP2
|
||||
&& i_codec_id != AV_CODEC_ID_MP3) )
|
||||
errmsg:
|
||||
{
|
||||
@@ -922,7 +922,7 @@ errmsg:
|
||||
goto error;
|
||||
}
|
||||
|
||||
- if( p_context->channels > 2 )
|
||||
+ if( p_enc->fmt_out.audio.i_channels > 2 )
|
||||
{
|
||||
p_context->channels = 2;
|
||||
p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
@@ -1028,7 +1028,7 @@ errmsg:
|
||||
p_context->frame_size :
|
||||
AV_INPUT_BUFFER_MIN_SIZE;
|
||||
p_sys->i_buffer_out = av_samples_get_buffer_size(NULL,
|
||||
- p_sys->p_context->channels, p_sys->i_frame_size,
|
||||
+ p_enc->fmt_out.audio.i_channels, p_sys->i_frame_size,
|
||||
p_sys->p_context->sample_fmt, DEFAULT_ALIGN);
|
||||
p_sys->p_buffer = av_malloc( p_sys->i_buffer_out );
|
||||
if ( unlikely( p_sys->p_buffer == NULL ) )
|
||||
@@ -1278,7 +1278,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
|
||||
{
|
||||
block_t *p_block = NULL;
|
||||
//How much we need to copy from new packet
|
||||
- const size_t leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
|
||||
+ const size_t leftover = leftover_samples * p_enc->fmt_out.audio.i_channels * p_sys->i_sample_bytes;
|
||||
|
||||
av_frame_unref( p_sys->frame );
|
||||
p_sys->frame->format = p_sys->p_context->sample_fmt;
|
||||
@@ -1301,7 +1301,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
|
||||
// We need to deinterleave from p_aout_buf to p_buffer the leftover bytes
|
||||
if( p_sys->b_planar )
|
||||
aout_Deinterleave( p_sys->p_interleave_buf, p_sys->p_buffer,
|
||||
- p_sys->i_frame_size, p_sys->p_context->channels, p_enc->fmt_in.i_codec );
|
||||
+ p_sys->i_frame_size, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec );
|
||||
else
|
||||
memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer, leftover);
|
||||
|
||||
@@ -1319,7 +1319,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
|
||||
memset( p_sys->p_buffer + (leftover+buffer_delay), 0, padding_size );
|
||||
buffer_delay += padding_size;
|
||||
}
|
||||
- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
|
||||
+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels,
|
||||
p_sys->p_context->sample_fmt, p_sys->b_planar ? p_sys->p_interleave_buf : p_sys->p_buffer,
|
||||
p_sys->i_buffer_out,
|
||||
DEFAULT_ALIGN) < 0 )
|
||||
@@ -1349,7 +1349,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
|
||||
|
||||
//i_bytes_left is amount of bytes we get
|
||||
i_samples_left = p_aout_buf ? p_aout_buf->i_nb_samples : 0;
|
||||
- buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_sys->p_context->channels;
|
||||
+ buffer_delay = p_sys->i_samples_delay * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels;
|
||||
|
||||
//p_sys->i_buffer_out = p_sys->i_frame_size * chan * p_sys->i_sample_bytes
|
||||
//Calculate how many bytes we would need from current buffer to fill frame
|
||||
@@ -1418,12 +1418,12 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
|
||||
p_sys->frame->channels = p_sys->p_context->channels;
|
||||
|
||||
const int in_bytes = p_sys->frame->nb_samples *
|
||||
- p_sys->p_context->channels * p_sys->i_sample_bytes;
|
||||
+ p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes;
|
||||
|
||||
if( p_sys->b_planar )
|
||||
{
|
||||
aout_Deinterleave( p_sys->p_buffer, p_aout_buf->p_buffer,
|
||||
- p_sys->frame->nb_samples, p_sys->p_context->channels, p_enc->fmt_in.i_codec );
|
||||
+ p_sys->frame->nb_samples, p_enc->fmt_out.audio.i_channels, p_enc->fmt_in.i_codec );
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1431,7 +1431,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
|
||||
memcpy(p_sys->p_buffer, p_aout_buf->p_buffer, in_bytes);
|
||||
}
|
||||
|
||||
- if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
|
||||
+ if( avcodec_fill_audio_frame( p_sys->frame, p_enc->fmt_out.audio.i_channels,
|
||||
p_sys->p_context->sample_fmt,
|
||||
p_sys->p_buffer,
|
||||
p_sys->i_buffer_out,
|
||||
@@ -1457,7 +1457,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
|
||||
if( p_aout_buf->i_nb_samples > 0 )
|
||||
{
|
||||
memcpy( p_sys->p_buffer + buffer_delay, p_aout_buf->p_buffer,
|
||||
- p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_sys->p_context->channels);
|
||||
+ p_aout_buf->i_nb_samples * p_sys->i_sample_bytes * p_enc->fmt_out.audio.i_channels);
|
||||
p_sys->i_samples_delay += p_aout_buf->i_nb_samples;
|
||||
}
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From b8ad80a20e9e84082dac2848070d251fa68412c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Tue, 23 Apr 2024 13:13:30 +0700
|
||||
Subject: [PATCH 05/11] codec: avcodec: map AYUV as RAWVIDEO with ffmpeg 6.0
|
||||
|
||||
(cherry picked from commit 955ef939467a628eb8da08e0d5eaefc9a3484cba)
|
||||
---
|
||||
modules/codec/avcodec/fourcc.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
|
||||
index 33c6cae09abc..97f3188211d3 100644
|
||||
--- a/modules/codec/avcodec/fourcc.c
|
||||
+++ b/modules/codec/avcodec/fourcc.c
|
||||
@@ -182,8 +182,12 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
|
||||
/* AV_CODEC_ID_V210X */
|
||||
{ VLC_CODEC_TMV, AV_CODEC_ID_TMV },
|
||||
{ VLC_CODEC_V210, AV_CODEC_ID_V210 },
|
||||
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
|
||||
+#if LIBAVCODEC_VERSION_MICRO >= 100
|
||||
+# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 42, 102 )
|
||||
+ { VLC_CODEC_VUYA, AV_CODEC_ID_RAWVIDEO },
|
||||
+# elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 50, 100 )
|
||||
{ VLC_CODEC_VUYA, AV_CODEC_ID_AYUV },
|
||||
+# endif
|
||||
#endif
|
||||
/* AV_CODEC_ID_DPX */
|
||||
{ VLC_CODEC_MAD, AV_CODEC_ID_MAD },
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 58c05240c26b6eef56e7c5ab35b14ccd8377667f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Thu, 13 Jun 2024 12:21:58 +0700
|
||||
Subject: [PATCH 06/11] avcodec: encoder: fix channel_layout conditionals
|
||||
|
||||
---
|
||||
modules/codec/avcodec/encoder.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
|
||||
index 52848de06587..6bd58f5071d2 100644
|
||||
--- a/modules/codec/avcodec/encoder.c
|
||||
+++ b/modules/codec/avcodec/encoder.c
|
||||
@@ -43,12 +43,13 @@
|
||||
#include <vlc_cpu.h>
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
-#include <libavutil/channel_layout.h>
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "avcommon.h"
|
||||
|
||||
-#if LIBAVUTIL_VERSION_CHECK( 52,2,6,0,0 )
|
||||
+#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
|
||||
+
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
# include <libavutil/channel_layout.h>
|
||||
#endif
|
||||
|
||||
@@ -157,6 +158,7 @@ struct encoder_sys_t
|
||||
|
||||
|
||||
/* Taken from audio.c*/
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
static const uint64_t pi_channels_map[][2] =
|
||||
{
|
||||
{ AV_CH_FRONT_LEFT, AOUT_CHAN_LEFT },
|
||||
@@ -193,6 +195,7 @@ static const uint32_t channel_mask[][2] = {
|
||||
{AOUT_CHANS_7_1, AV_CH_LAYOUT_7POINT1},
|
||||
{AOUT_CHANS_8_1, AV_CH_LAYOUT_OCTAGONAL},
|
||||
};
|
||||
+#endif
|
||||
|
||||
static const char *const ppsz_enc_options[] = {
|
||||
"keyint", "bframes", "vt", "qmin", "qmax", "codec", "hq",
|
||||
@@ -746,7 +749,7 @@ int InitVideoEnc( vlc_object_t *p_this )
|
||||
p_context->time_base.num = 1;
|
||||
p_context->time_base.den = p_context->sample_rate;
|
||||
p_context->channels = p_enc->fmt_out.audio.i_channels;
|
||||
-#if LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 0)
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
|
||||
/* Setup Channel ordering for multichannel audio
|
||||
@@ -925,7 +928,9 @@ errmsg:
|
||||
if( p_enc->fmt_out.audio.i_channels > 2 )
|
||||
{
|
||||
p_context->channels = 2;
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
+#endif
|
||||
|
||||
/* Change fmt_in in order to ask for a channels conversion */
|
||||
p_enc->fmt_in.audio.i_channels =
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 3db6e677680a1a94e473fe9d9fc121af34cdcf2b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Sat, 17 Aug 2024 11:22:33 +0700
|
||||
Subject: [PATCH 07/11] codec: avcodec: fix audio channel_layout conditionals
|
||||
|
||||
---
|
||||
modules/codec/avcodec/audio.c | 23 +++++++++++++++--------
|
||||
1 file changed, 15 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
|
||||
index ad8a40ab4ed6..c74757c76ae5 100644
|
||||
--- a/modules/codec/avcodec/audio.c
|
||||
+++ b/modules/codec/avcodec/audio.c
|
||||
@@ -41,8 +41,11 @@
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/mem.h>
|
||||
|
||||
-#include <libavutil/channel_layout.h>
|
||||
+#define API_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_CHECK( 52, 2, 6, 0, 100))
|
||||
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
+# include <libavutil/channel_layout.h>
|
||||
+#endif
|
||||
|
||||
/*****************************************************************************
|
||||
* decoder_sys_t : decoder descriptor
|
||||
@@ -598,7 +601,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
p_sys->i_previous_channels = p_sys->p_context->ch_layout.nb_channels;
|
||||
p_sys->i_previous_layout = p_sys->p_context->ch_layout.u.mask;
|
||||
}
|
||||
-#else
|
||||
+#elif API_CHANNEL_LAYOUT
|
||||
if( p_sys->i_previous_channels == p_sys->p_context->channels &&
|
||||
p_sys->i_previous_layout == p_sys->p_context->channel_layout )
|
||||
return;
|
||||
@@ -612,15 +615,19 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
|
||||
const unsigned i_order_max = sizeof(pi_channels_map)/sizeof(*pi_channels_map);
|
||||
uint32_t pi_order_src[i_order_max];
|
||||
|
||||
- int i_channels_src = 0;
|
||||
+ int i_channels_src = 0, channel_count;
|
||||
+ uint64_t channel_layout_mask;
|
||||
#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
- uint64_t channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
|
||||
- int channel_count = p_sys->p_context->ch_layout.nb_channels;
|
||||
-#else
|
||||
- uint64_t channel_layout_mask =
|
||||
+ channel_layout_mask = p_sys->p_context->ch_layout.u.mask;
|
||||
+ channel_count = p_sys->p_context->ch_layout.nb_channels;
|
||||
+#elif API_CHANNEL_LAYOUT
|
||||
+ channel_layout_mask =
|
||||
p_sys->p_context->channel_layout ? p_sys->p_context->channel_layout :
|
||||
(uint64_t)av_get_default_channel_layout( p_sys->p_context->channels );
|
||||
- int channel_count = p_sys->p_context->channels;
|
||||
+ channel_count = p_sys->p_context->channels;
|
||||
+#else
|
||||
+ channel_layout_mask = NULL;
|
||||
+ channel_count = p_sys->p_context->channels;
|
||||
#endif
|
||||
|
||||
if( channel_layout_mask )
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From b5bb9bda03a06fc1cfd682dacb571b688b5558d9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Tue, 23 Apr 2024 13:14:53 +0700
|
||||
Subject: [PATCH 08/11] demux/mux: avformat: use ch_layout from ffmpeg 5.1
|
||||
|
||||
merger pick from commit a55ec32ab3760d9edb6f05481cd3a981aa42878d
|
||||
and fixup 195f0c98599b55950c49a62f98d9d3495be310df
|
||||
---
|
||||
modules/demux/avformat/demux.c | 4 ++++
|
||||
modules/demux/avformat/mux.c | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
|
||||
index 3b355bb3faec..830dc0157e2b 100644
|
||||
--- a/modules/demux/avformat/demux.c
|
||||
+++ b/modules/demux/avformat/demux.c
|
||||
@@ -401,7 +401,11 @@ int avformat_OpenDemux( vlc_object_t *p_this )
|
||||
es_format_Init( &es_fmt, AUDIO_ES, fcc );
|
||||
es_fmt.i_original_fourcc = CodecTagToFourcc( cp->codec_tag );
|
||||
es_fmt.i_bitrate = cp->bit_rate;
|
||||
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 24, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
|
||||
+ es_fmt.audio.i_channels = cp->ch_layout.nb_channels;
|
||||
+#else
|
||||
es_fmt.audio.i_channels = cp->channels;
|
||||
+#endif
|
||||
es_fmt.audio.i_rate = cp->sample_rate;
|
||||
es_fmt.audio.i_bitspersample = cp->bits_per_coded_sample;
|
||||
es_fmt.audio.i_blockalign = cp->block_align;
|
||||
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
|
||||
index c708276954ce..8bf8735885f5 100644
|
||||
--- a/modules/demux/avformat/mux.c
|
||||
+++ b/modules/demux/avformat/mux.c
|
||||
@@ -267,7 +267,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
|
||||
{
|
||||
case AUDIO_ES:
|
||||
codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 59, 24, 100 ) && LIBAVCODEC_VERSION_MICRO >= 100
|
||||
+ av_channel_layout_default( &codecpar->ch_layout, fmt->audio.i_channels );
|
||||
+#else
|
||||
codecpar->channels = fmt->audio.i_channels;
|
||||
+#endif
|
||||
codecpar->sample_rate = fmt->audio.i_rate;
|
||||
stream->time_base = (AVRational){1, codecpar->sample_rate};
|
||||
if (fmt->i_bitrate == 0) {
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From fa001cda7f6b22843438c39dfc078050bb54c72a Mon Sep 17 00:00:00 2001
|
||||
From: Ilkka Ollakka <ileoo@videolan.org>
|
||||
Date: Tue, 4 Jul 2023 16:53:43 +0300
|
||||
Subject: [PATCH 09/11] avcodec: add handling of new ch_layout in audio encoder
|
||||
|
||||
conditioned to avcodec version where is it added
|
||||
|
||||
(cherry picked from commit c4302ca59dd79efd7208a45a3fcdc44388fd03a8)
|
||||
---
|
||||
modules/codec/avcodec/encoder.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
|
||||
index 6bd58f5071d2..757f93b46845 100644
|
||||
--- a/modules/codec/avcodec/encoder.c
|
||||
+++ b/modules/codec/avcodec/encoder.c
|
||||
@@ -927,11 +927,14 @@ errmsg:
|
||||
|
||||
if( p_enc->fmt_out.audio.i_channels > 2 )
|
||||
{
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ av_channel_layout_default( &p_context->ch_layout, 2 );
|
||||
+#else
|
||||
p_context->channels = 2;
|
||||
-#if API_CHANNEL_LAYOUT
|
||||
+# if API_CHANNEL_LAYOUT
|
||||
p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
+# endif
|
||||
#endif
|
||||
-
|
||||
/* Change fmt_in in order to ask for a channels conversion */
|
||||
p_enc->fmt_in.audio.i_channels =
|
||||
p_enc->fmt_out.audio.i_channels = 2;
|
||||
@@ -1288,8 +1291,12 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, uns
|
||||
av_frame_unref( p_sys->frame );
|
||||
p_sys->frame->format = p_sys->p_context->sample_fmt;
|
||||
p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout);
|
||||
+#else
|
||||
p_sys->frame->channel_layout = p_sys->p_context->channel_layout;
|
||||
p_sys->frame->channels = p_sys->p_context->channels;
|
||||
+#endif
|
||||
|
||||
p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den /
|
||||
CLOCK_FREQ / p_sys->p_context->time_base.num;
|
||||
@@ -1419,8 +1426,12 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
|
||||
p_sys->frame->pts = date_Get( &p_sys->buffer_date ) * p_sys->p_context->time_base.den /
|
||||
CLOCK_FREQ / p_sys->p_context->time_base.num;
|
||||
|
||||
+#if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ av_channel_layout_copy(&p_sys->frame->ch_layout, &p_sys->p_context->ch_layout);
|
||||
+#else
|
||||
p_sys->frame->channel_layout = p_sys->p_context->channel_layout;
|
||||
p_sys->frame->channels = p_sys->p_context->channels;
|
||||
+#endif
|
||||
|
||||
const int in_bytes = p_sys->frame->nb_samples *
|
||||
p_enc->fmt_out.audio.i_channels* p_sys->i_sample_bytes;
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From bb62989ccc12866d308e6f38dc1513de9cb1c6da Mon Sep 17 00:00:00 2001
|
||||
From: Ilkka Ollakka <ileoo@videolan.org>
|
||||
Date: Tue, 4 Jul 2023 16:55:28 +0300
|
||||
Subject: [PATCH 10/11] avcodec: use ch_layout for channel layout in audio
|
||||
encoder
|
||||
|
||||
channels and channel_layout has been deprecated in FFMPEG 5.1 and will be removed eventually
|
||||
|
||||
also always create the mapping, as ch_layout is always there
|
||||
|
||||
(cherry picked from commit b73dc8841d999c6be9de718cd2cd3aeb13279792)
|
||||
---
|
||||
modules/codec/avcodec/encoder.c | 53 ++++++++++++++-------------------
|
||||
1 file changed, 22 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
|
||||
index 757f93b46845..ae746c99fc89 100644
|
||||
--- a/modules/codec/avcodec/encoder.c
|
||||
+++ b/modules/codec/avcodec/encoder.c
|
||||
@@ -183,6 +183,7 @@ static const uint64_t pi_channels_map[][2] =
|
||||
{ AV_CH_STEREO_RIGHT, 0 },
|
||||
};
|
||||
|
||||
+# if !LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
static const uint32_t channel_mask[][2] = {
|
||||
{0,0},
|
||||
{AOUT_CHAN_CENTER, AV_CH_LAYOUT_MONO},
|
||||
@@ -195,6 +196,7 @@ static const uint32_t channel_mask[][2] = {
|
||||
{AOUT_CHANS_7_1, AV_CH_LAYOUT_7POINT1},
|
||||
{AOUT_CHANS_8_1, AV_CH_LAYOUT_OCTAGONAL},
|
||||
};
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
static const char *const ppsz_enc_options[] = {
|
||||
@@ -748,49 +750,36 @@ int InitVideoEnc( vlc_object_t *p_this )
|
||||
date_Set( &p_sys->buffer_date, AV_NOPTS_VALUE );
|
||||
p_context->time_base.num = 1;
|
||||
p_context->time_base.den = p_context->sample_rate;
|
||||
- p_context->channels = p_enc->fmt_out.audio.i_channels;
|
||||
-#if API_CHANNEL_LAYOUT
|
||||
- p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
|
||||
- /* Setup Channel ordering for multichannel audio
|
||||
+ /* Setup Channel ordering for audio
|
||||
* as VLC channel order isn't same as libavcodec expects
|
||||
*/
|
||||
|
||||
p_sys->i_channels_to_reorder = 0;
|
||||
|
||||
- /* Specified order
|
||||
+ /* Create channel layout for avcodec
|
||||
* Copied from audio.c
|
||||
*/
|
||||
- const unsigned i_order_max = 8 * sizeof(p_context->channel_layout);
|
||||
- uint32_t pi_order_dst[AOUT_CHAN_MAX] = { };
|
||||
+#if API_CHANNEL_LAYOUT
|
||||
+ uint32_t pi_order_dst[AOUT_CHAN_MAX] = { 0 };
|
||||
uint32_t order_mask = 0;
|
||||
int i_channels_src = 0;
|
||||
-
|
||||
- if( p_context->channel_layout )
|
||||
- {
|
||||
- msg_Dbg( p_enc, "Creating channel order for reordering");
|
||||
- for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ )
|
||||
- {
|
||||
- if( p_context->channel_layout & pi_channels_map[i][0] )
|
||||
- {
|
||||
- msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]);
|
||||
- pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
|
||||
- order_mask |= pi_channels_map[i][1];
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
+ msg_Dbg( p_enc, "Creating channel order for reordering");
|
||||
+# if LIBAVCODEC_VERSION_CHECK(59, 999, 999, 24, 100)
|
||||
+ av_channel_layout_default( &p_context->ch_layout, p_enc->fmt_out.audio.i_channels );
|
||||
+ uint64_t channel_mask = p_context->ch_layout.u.mask;
|
||||
+# else
|
||||
+ p_context->channels = p_enc->fmt_out.audio.i_channels;
|
||||
+ p_context->channel_layout = channel_mask[p_context->channels][1];
|
||||
+ uint64_t channel_mask = p_context->channel_layout;
|
||||
+# endif
|
||||
+ for( unsigned i = 0; i < sizeof(pi_channels_map)/sizeof(*pi_channels_map); i++ )
|
||||
{
|
||||
- msg_Dbg( p_enc, "Creating default channel order for reordering");
|
||||
- /* Create default order */
|
||||
- for( unsigned int i = 0; i < __MIN( i_order_max, (unsigned)p_sys->p_context->channels ); i++ )
|
||||
+ if( channel_mask & pi_channels_map[i][0] )
|
||||
{
|
||||
- if( i < sizeof(pi_channels_map)/sizeof(*pi_channels_map) )
|
||||
- {
|
||||
- msg_Dbg( p_enc, "%d channel is %"PRIx64"", i_channels_src, pi_channels_map[i][1]);
|
||||
- pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
|
||||
- order_mask |= pi_channels_map[i][1];
|
||||
- }
|
||||
+ msg_Dbg( p_enc, "%d %"PRIx64" mapped to %"PRIx64"", i_channels_src, pi_channels_map[i][0], pi_channels_map[i][1]);
|
||||
+ pi_order_dst[i_channels_src++] = pi_channels_map[i][1];
|
||||
+ order_mask |= pi_channels_map[i][1];
|
||||
}
|
||||
}
|
||||
if( i_channels_src != p_enc->fmt_out.audio.i_channels )
|
||||
@@ -799,6 +788,8 @@ int InitVideoEnc( vlc_object_t *p_this )
|
||||
p_sys->i_channels_to_reorder =
|
||||
aout_CheckChannelReorder( NULL, pi_order_dst, order_mask,
|
||||
p_sys->pi_reorder_layout );
|
||||
+#else
|
||||
+ p_context->channels = p_enc->fmt_out.audio.i_channels;
|
||||
#endif
|
||||
|
||||
if ( p_enc->fmt_out.i_codec == VLC_CODEC_MP4A )
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From e020f9abb31809584e33d740593d6ae5a190771d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Mon, 12 Aug 2024 19:32:42 +0700
|
||||
Subject: [PATCH 11/11] codec: avcodec: bypass removed define for Intel
|
||||
workarounds
|
||||
|
||||
adapted from cherry picked commit 1280728ad305f00ceba3491ce11bf66107017a6c
|
||||
---
|
||||
modules/codec/avcodec/d3d11va.c | 4 ++++
|
||||
modules/codec/avcodec/dxva2.c | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
|
||||
index e1560a9312cc..5260628364f0 100644
|
||||
--- a/modules/codec/avcodec/d3d11va.c
|
||||
+++ b/modules/codec/avcodec/d3d11va.c
|
||||
@@ -55,6 +55,10 @@
|
||||
#define D3D_DecoderSurface ID3D11VideoDecoderOutputView
|
||||
#include "directx_va.h"
|
||||
|
||||
+#ifndef FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO
|
||||
+# define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 // moved to libavcodec/dxva2_internal.h :/
|
||||
+#endif
|
||||
+
|
||||
static int Open(vlc_va_t *, AVCodecContext *, const AVPixFmtDescriptor *, enum PixelFormat,
|
||||
const es_format_t *, picture_sys_t *p_sys);
|
||||
static void Close(vlc_va_t *, void **);
|
||||
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
|
||||
index 2e6809a05410..037ad7d44887 100644
|
||||
--- a/modules/codec/avcodec/dxva2.c
|
||||
+++ b/modules/codec/avcodec/dxva2.c
|
||||
@@ -43,6 +43,10 @@
|
||||
#define D3D_DecoderSurface IDirect3DSurface9
|
||||
#include "directx_va.h"
|
||||
|
||||
+#ifndef FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO
|
||||
+# define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 // moved to libavcodec/dxva2_internal.h :/
|
||||
+#endif
|
||||
+
|
||||
static int Open(vlc_va_t *, AVCodecContext *, const AVPixFmtDescriptor *, enum PixelFormat,
|
||||
const es_format_t *, picture_sys_t *p_sys);
|
||||
static void Close(vlc_va_t *, void **);
|
||||
--
|
||||
GitLab
|
||||
|
28
5590.patch
Normal file
28
5590.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From a761e1c202b632e7865d18fcf11a2b9e285ea9ae Mon Sep 17 00:00:00 2001
|
||||
From: Tristan Matthews <tmatth@videolan.org>
|
||||
Date: Wed, 1 Feb 2023 23:39:36 -0500
|
||||
Subject: [PATCH] opus_header: fix channel mapping family 1 parsing
|
||||
|
||||
Fixes #27808
|
||||
|
||||
(cherry picked from commit 79fa6af0a98921f9d34933761f4fe20ef6c35309)
|
||||
---
|
||||
modules/codec/opus_header.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/codec/opus_header.c b/modules/codec/opus_header.c
|
||||
index 4069a5cf4613..b134b20b625b 100644
|
||||
--- a/modules/codec/opus_header.c
|
||||
+++ b/modules/codec/opus_header.c
|
||||
@@ -205,7 +205,7 @@ int opus_header_parse(const unsigned char *packet, int len, OpusHeader *h)
|
||||
h->nb_coupled = ch;
|
||||
|
||||
/* Multi-stream support */
|
||||
- if(h->channel_mapping == 2)
|
||||
+ if(h->channel_mapping <= 2)
|
||||
{
|
||||
if (h->nb_coupled + h->nb_streams > 255)
|
||||
return 0;
|
||||
--
|
||||
GitLab
|
||||
|
82
6168.patch
Normal file
82
6168.patch
Normal file
@@ -0,0 +1,82 @@
|
||||
From a618e31cf209168ae420e95750734a37359969e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fran=C3=A7ois=20Cartegnie?= <fcvlcdev@free.fr>
|
||||
Date: Sun, 7 Jul 2024 11:14:05 +0200
|
||||
Subject: [PATCH] mux: avformat: fix avio callbacks signature with ffmpeg 6.1
|
||||
|
||||
API signature changes introduced depending on a positive define,
|
||||
then removed later, making it break prior or post removal...
|
||||
|
||||
(adapted from commit 503c04fad9239420be26d67aab4d5f63c53eb4f7)
|
||||
---
|
||||
modules/codec/avcodec/avcommon_compat.h | 3 +++
|
||||
modules/demux/avformat/mux.c | 18 ++++++++++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
|
||||
index 9d16b3dc47d9..561ad83f99f9 100644
|
||||
--- a/modules/codec/avcodec/avcommon_compat.h
|
||||
+++ b/modules/codec/avcodec/avcommon_compat.h
|
||||
@@ -77,6 +77,9 @@
|
||||
#ifndef FF_MAX_B_FRAMES
|
||||
# define FF_MAX_B_FRAMES 16 // FIXME: remove this
|
||||
#endif
|
||||
+#ifndef FF_API_AVIO_WRITE_NONCONST // removed in ffmpeg 7
|
||||
+# define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61)
|
||||
+#endif
|
||||
|
||||
#endif /* HAVE_LIBAVCODEC_AVCODEC_H */
|
||||
|
||||
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
|
||||
index 8bf8735885f5..033a87bdaaad 100644
|
||||
--- a/modules/demux/avformat/mux.c
|
||||
+++ b/modules/demux/avformat/mux.c
|
||||
@@ -74,11 +74,20 @@ static int AddStream( sout_mux_t *, sout_input_t * );
|
||||
static void DelStream( sout_mux_t *, sout_input_t * );
|
||||
static int Mux ( sout_mux_t * );
|
||||
|
||||
+#if FF_API_AVIO_WRITE_NONCONST
|
||||
static int IOWrite( void *opaque, uint8_t *buf, int buf_size );
|
||||
+#else
|
||||
+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size );
|
||||
+#endif
|
||||
static int64_t IOSeek( void *opaque, int64_t offset, int whence );
|
||||
#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 )
|
||||
+# if FF_API_AVIO_WRITE_NONCONST
|
||||
static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
|
||||
enum AVIODataMarkerType type, int64_t time);
|
||||
+# else
|
||||
+int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size,
|
||||
+ enum AVIODataMarkerType type, int64_t time);
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -411,8 +420,13 @@ static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
|
||||
}
|
||||
|
||||
#if LIBAVFORMAT_VERSION_CHECK( 57, 7, 0, 40, 100 )
|
||||
+# if FF_API_AVIO_WRITE_NONCONST
|
||||
int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
|
||||
enum AVIODataMarkerType type, int64_t time)
|
||||
+# else
|
||||
+int IOWriteTyped(void *opaque, const uint8_t *buf, int buf_size,
|
||||
+ enum AVIODataMarkerType type, int64_t time)
|
||||
+# endif
|
||||
{
|
||||
VLC_UNUSED(time);
|
||||
|
||||
@@ -512,7 +526,11 @@ static int Control( sout_mux_t *p_mux, int i_query, va_list args )
|
||||
/*****************************************************************************
|
||||
* I/O wrappers for libavformat
|
||||
*****************************************************************************/
|
||||
+#if FF_API_AVIO_WRITE_NONCONST
|
||||
static int IOWrite( void *opaque, uint8_t *buf, int buf_size )
|
||||
+#else
|
||||
+static int IOWrite( void *opaque, const uint8_t *buf, int buf_size )
|
||||
+#endif
|
||||
{
|
||||
sout_mux_t *p_mux = opaque;
|
||||
sout_mux_sys_t *p_sys = p_mux->p_sys;
|
||||
--
|
||||
GitLab
|
||||
|
1430
6273.patch
Normal file
1430
6273.patch
Normal file
File diff suppressed because it is too large
Load Diff
46
6527.patch
Normal file
46
6527.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc Mon Sep 17 00:00:00 2001
|
||||
From: Steve Lhomme <robux4@ycbcr.xyz>
|
||||
Date: Mon, 16 Dec 2024 09:28:55 +0100
|
||||
Subject: [PATCH] nfs: fix libnfs API v2 support
|
||||
|
||||
Introduced in libnfs 6.0.0.
|
||||
|
||||
Co-authored-by: ronnie sahlberg <ronniesahlberg@gmail.com>
|
||||
Co-authored-by: Thomas Guillem <thomas@gllm.fr>
|
||||
---
|
||||
modules/access/nfs.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/access/nfs.c b/modules/access/nfs.c
|
||||
index f164cda86499..3510c3fe1f14 100644
|
||||
--- a/modules/access/nfs.c
|
||||
+++ b/modules/access/nfs.c
|
||||
@@ -188,7 +188,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
|
||||
else
|
||||
{
|
||||
p_sys->res.read.i_len = i_status;
|
||||
- memcpy(p_sys->res.read.p_buf, p_data, i_status);
|
||||
+ if (p_sys->res.read.p_buf != NULL && p_data != NULL)
|
||||
+ memcpy(p_sys->res.read.p_buf, p_data, i_status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,9 +209,15 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
|
||||
return 0;
|
||||
|
||||
p_sys->res.read.i_len = 0;
|
||||
+#ifdef LIBNFS_API_V2
|
||||
+ p_sys->res.read.p_buf = NULL;
|
||||
+ if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
|
||||
+ p_access) < 0)
|
||||
+#else
|
||||
p_sys->res.read.p_buf = p_buf;
|
||||
if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
|
||||
p_access) < 0)
|
||||
+#endif
|
||||
{
|
||||
msg_Err(p_access, "nfs_read_async failed");
|
||||
return 0;
|
||||
--
|
||||
GitLab
|
||||
|
149
6606.patch
Normal file
149
6606.patch
Normal file
@@ -0,0 +1,149 @@
|
||||
From ba5dc03aecc1d96f81b76838f845ebde7348cf62 Mon Sep 17 00:00:00 2001
|
||||
From: David Rosca <nowrep@gmail.com>
|
||||
Date: Fri, 20 Dec 2024 20:24:36 +0100
|
||||
Subject: [PATCH] avcodec: vaapi: Support VAAPI with latest FFmpeg
|
||||
|
||||
---
|
||||
configure.ac | 20 +------------
|
||||
modules/codec/Makefile.am | 2 +-
|
||||
modules/codec/avcodec/avcommon_compat.h | 3 ++
|
||||
modules/codec/avcodec/vaapi.c | 38 +++++++++++++++++++++++--
|
||||
4 files changed, 41 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 00afb063c455..089339e10e0b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2550,25 +2550,7 @@ AM_CONDITIONAL([HAVE_VAAPI], [test "${have_vaapi}" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_VAAPI_WL], [test "${have_vaapi_wl}" = "yes"])
|
||||
-
|
||||
-have_avcodec_vaapi="no"
|
||||
-AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
|
||||
- VLC_SAVE_FLAGS
|
||||
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
|
||||
- CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
|
||||
- AC_CHECK_HEADERS([libavcodec/vaapi.h], [
|
||||
- AC_MSG_NOTICE([VA API acceleration activated])
|
||||
- have_avcodec_vaapi="yes"
|
||||
- ],[
|
||||
- AS_IF([test -n "${enable_libva}"], [
|
||||
- AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
|
||||
- ], [
|
||||
- AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
|
||||
- ])
|
||||
- ])
|
||||
- VLC_RESTORE_FLAGS
|
||||
-])
|
||||
-AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
|
||||
+AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"])
|
||||
|
||||
dnl
|
||||
dnl dxva2 needs avcodec
|
||||
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
|
||||
index 6d9465fdaef9..dd04391c1bf7 100644
|
||||
--- a/modules/codec/Makefile.am
|
||||
+++ b/modules/codec/Makefile.am
|
||||
@@ -416,7 +416,7 @@ libvaapi_plugin_la_SOURCES = \
|
||||
codec/avcodec/vaapi.c hw/vaapi/vlc_vaapi.c hw/vaapi/vlc_vaapi.h
|
||||
libvaapi_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
libvaapi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
|
||||
-libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS)
|
||||
+libvaapi_plugin_la_LIBADD = $(LIBVA_LIBS) $(AVCODEC_LIBS)
|
||||
if HAVE_AVCODEC_VAAPI
|
||||
if HAVE_VAAPI_DRM
|
||||
codec_LTLIBRARIES += libvaapi_drm_plugin.la
|
||||
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
|
||||
index ac02c06d2339..8ab6910f3250 100644
|
||||
--- a/modules/codec/avcodec/avcommon_compat.h
|
||||
+++ b/modules/codec/avcodec/avcommon_compat.h
|
||||
@@ -84,6 +84,9 @@
|
||||
#ifndef FF_API_AVIO_WRITE_NONCONST // removed in ffmpeg 7
|
||||
# define FF_API_AVIO_WRITE_NONCONST (LIBAVFORMAT_VERSION_MAJOR < 61)
|
||||
#endif
|
||||
+#ifndef FF_API_STRUCT_VAAPI_CONTEXT
|
||||
+# define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
+#endif
|
||||
|
||||
#endif /* HAVE_LIBAVCODEC_AVCODEC_H */
|
||||
|
||||
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
|
||||
index c83269e43f30..e203baaf9ee2 100644
|
||||
--- a/modules/codec/avcodec/vaapi.c
|
||||
+++ b/modules/codec/avcodec/vaapi.c
|
||||
@@ -42,12 +42,25 @@
|
||||
# include <va/va_drm.h>
|
||||
#endif
|
||||
#include <libavcodec/avcodec.h>
|
||||
+#if FF_API_STRUCT_VAAPI_CONTEXT
|
||||
#include <libavcodec/vaapi.h>
|
||||
+#else
|
||||
+#include <libavutil/hwcontext_vaapi.h>
|
||||
+#endif
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "va.h"
|
||||
#include "../../hw/vaapi/vlc_vaapi.h"
|
||||
|
||||
+#if !FF_API_STRUCT_VAAPI_CONTEXT
|
||||
+struct vaapi_context
|
||||
+{
|
||||
+ VADisplay display;
|
||||
+ VAConfigID config_id;
|
||||
+ VAContextID context_id;
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
struct vlc_va_sys_t
|
||||
{
|
||||
struct vlc_vaapi_instance *va_inst;
|
||||
@@ -145,8 +158,10 @@ static void Delete(vlc_va_t *va, void **hwctx)
|
||||
|
||||
(void) hwctx;
|
||||
|
||||
- vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id);
|
||||
- vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id);
|
||||
+ if (sys->hw_ctx.context_id != VA_INVALID_ID)
|
||||
+ vlc_vaapi_DestroyContext(o, sys->hw_ctx.display, sys->hw_ctx.context_id);
|
||||
+ if (sys->hw_ctx.config_id != VA_INVALID_ID)
|
||||
+ vlc_vaapi_DestroyConfig(o, sys->hw_ctx.display, sys->hw_ctx.config_id);
|
||||
vlc_vaapi_ReleaseInstance(sys->va_inst);
|
||||
free(sys);
|
||||
}
|
||||
@@ -196,6 +211,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
|
||||
sys->hw_ctx.config_id = VA_INVALID_ID;
|
||||
sys->hw_ctx.context_id = VA_INVALID_ID;
|
||||
|
||||
+#if FF_API_STRUCT_VAAPI_CONTEXT
|
||||
sys->hw_ctx.config_id =
|
||||
vlc_vaapi_CreateConfigChecked(o, sys->hw_ctx.display, i_profile,
|
||||
VAEntrypointVLD, i_vlc_chroma);
|
||||
@@ -211,6 +227,24 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
|
||||
goto error;
|
||||
|
||||
ctx->hwaccel_context = &sys->hw_ctx;
|
||||
+#else
|
||||
+ AVBufferRef *hwdev_ref = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_VAAPI);
|
||||
+ if (hwdev_ref == NULL)
|
||||
+ goto error;
|
||||
+
|
||||
+ AVHWDeviceContext *hwdev_ctx = (void *) hwdev_ref->data;
|
||||
+ AVVAAPIDeviceContext *vadev_ctx = hwdev_ctx->hwctx;
|
||||
+ vadev_ctx->display = va_dpy;
|
||||
+
|
||||
+ if (av_hwdevice_ctx_init(hwdev_ref) < 0)
|
||||
+ {
|
||||
+ av_buffer_unref(&hwdev_ref);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ ctx->hw_device_ctx = hwdev_ref;
|
||||
+#endif
|
||||
+
|
||||
va->sys = sys;
|
||||
va->description = vaQueryVendorString(sys->hw_ctx.display);
|
||||
va->get = Get;
|
||||
--
|
||||
GitLab
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From 770789f265761fc7ab2de69ca105fec4ad93d9e2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
|
||||
Date: Mon, 26 Feb 2018 20:36:29 +0200
|
||||
Subject: [PATCH] chromaprint: missing cast
|
||||
|
||||
(cherry picked from commit 7bd5bab3e43ae187f7219db61ed85d06d2ba0547)
|
||||
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
|
||||
---
|
||||
modules/stream_out/chromaprint.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/stream_out/chromaprint.c b/modules/stream_out/chromaprint.c
|
||||
index 80ec31ba2590..c76cbda3c2bb 100644
|
||||
--- a/modules/stream_out/chromaprint.c
|
||||
+++ b/modules/stream_out/chromaprint.c
|
||||
@@ -231,7 +231,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
|
||||
if ( !p_sys->b_finished && id->i_samples > 0 && p_buf->i_buffer )
|
||||
{
|
||||
if(! chromaprint_feed( p_sys->p_chromaprint_ctx,
|
||||
- p_buf->p_buffer,
|
||||
+ (int16_t *)p_buf->p_buffer,
|
||||
p_buf->i_buffer / BYTESPERSAMPLE ) )
|
||||
msg_Warn( p_stream, "feed error" );
|
||||
id->i_samples -= i_samples;
|
||||
--
|
||||
GitLab
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:adc7285b4d2721cddf40eb5270cada2aaa10a334cb546fd55a06353447ba29b5
|
||||
size 25596392
|
@@ -1,6 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCZUCo4QAKCRBxgHE75Y0a
|
||||
3GimAJ4k9yxWiDibQ99KrHLXsRdZ3WUEnQCgmp6N6qQM3WxC8EbfrkoAgv6U/Io=
|
||||
=gCZR
|
||||
-----END PGP SIGNATURE-----
|
3
vlc-3.0.21.tar.xz
Normal file
3
vlc-3.0.21.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24dbbe1d7dfaeea0994d5def0bbde200177347136dbfe573f5b6a4cee25afbb0
|
||||
size 25649288
|
6
vlc-3.0.21.tar.xz.asc
Normal file
6
vlc-3.0.21.tar.xz.asc
Normal file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iF0EABECAB0WIQRl98a0IGvQV6frc3hxgHE75Y0a3AUCZmN15gAKCRBxgHE75Y0a
|
||||
3PDaAKCGjcMhmC7+t5FwH2nVc1Cuy2dPeQCfe2/pEfZUpMPG2rfu/wO71uZ+vMo=
|
||||
=Mt0w
|
||||
-----END PGP SIGNATURE-----
|
102
vlc.changes
102
vlc.changes
@@ -1,3 +1,105 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 20 12:54:30 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Port to current ffmpeg-7: Remove version constraints on ffmpeg
|
||||
BuildRequires, add upstream patches and pass disable-vdpau to
|
||||
configure, this disables build/shipping of vdpau subpackage.
|
||||
Patches added: 5574.patch, 6168.patch, 6273.patch, 6606.patch and
|
||||
6527.patch.
|
||||
- Add missing vlc Requires to devel sub-package, previously pulled
|
||||
in via vlc-vdpau package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 7 09:27:34 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Drop obsolete and unused libxvidcore-devel BuildRequires.
|
||||
- Switch faad build_cond to without and move plugin to main
|
||||
package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 13 06:38:45 UTC 2025 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Add 5590.patch: opus_header: fix channel mapping family 1 parsing
|
||||
(boo#1244167).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 27 11:32:35 UTC 2025 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Drop opencv sub-package, and hence no longer needed
|
||||
pkgconfig(opencv) BuildRequires and various provides, Supplements
|
||||
and Conflicts.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 11:11:11 UTC 2024 - olaf@aepfle.de
|
||||
|
||||
- Convert BuildRequires from libfaad-devel to pkgconfig(faad2)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 2 10:48:44 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Drop the requres_ge libbluray1 statement, which was added as a
|
||||
hack due to a libbluray ABI brak at version 0.5. By now libbluray
|
||||
is at .so.2, so that statement was actually a NOP. as RPM simply
|
||||
ignored in-existing package dependencies.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 27 13:54:03 UTC 2024 - Manfred Hollstein <manfred.h@gmx.net>
|
||||
|
||||
- Restrict required version for libav* to avoid pulling in ffmpeg-6
|
||||
packages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 14 13:14:32 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Build dca support only on Leap 15.6 and newer when not using 3rd
|
||||
party repositories (BUILD_ORIG): Leap prior to 15.6 do not have
|
||||
libdca.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 13 12:34:45 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Disable chromecast support on Leap < 15.6: not supported as
|
||||
of now.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 12 14:26:44 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Updte to version 3.0.21:
|
||||
+ Decoders:
|
||||
* Improve Opus ambisonic support
|
||||
* Fix some ASS subtitle rendering issues
|
||||
* Fix Opus in MP4 behaviour
|
||||
* Fix VAAPI hw decoding with some drivers
|
||||
+ Input:
|
||||
* Add support for HTTP content range handling according to RFC
|
||||
9110
|
||||
* Fix some HLS Adaptive Streaming not working in audio-only
|
||||
mode
|
||||
+ Video Output:
|
||||
* Super Resolution scaling with AMD GPUs
|
||||
* The D3D11 HDR option can also turn on/off HDR for all sources
|
||||
regardless of the display
|
||||
* Improve subtitles rendering on Apple platforms of notably
|
||||
Asian languages by correcting font fallback lookups
|
||||
+ Video Filter:
|
||||
* New AMD VQ Enhancer filter
|
||||
* Add D3D11 option to use NVIDIA TrueHDR to generate HDR from
|
||||
SDR sources
|
||||
+ Audio Output:
|
||||
* Fix regression on macOS causing crashes when using audio
|
||||
devices with more than 9 channels
|
||||
+ Services Discovery:
|
||||
* Fix exposed UPnP directory URL schemes to be compliant with
|
||||
RFC 3986
|
||||
+ libVLC:
|
||||
* the HWND passed to libvlc_media_player_set_hwnd must have the
|
||||
WS_CLIPCHILDREN style set.
|
||||
* Fix crashes when using caopengllayer
|
||||
+ Misc:
|
||||
* Fix various warnings, leaks and potential crashes
|
||||
* Fix security integer overflow in MMS module
|
||||
- Drop 4645.patch and 770789f2.patch: fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 22 12:52:19 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
153
vlc.spec
153
vlc.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package vlc
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2012 Dominique Leuenberger, Amsterdam, The Netherlands
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -29,10 +29,12 @@
|
||||
%bcond_without fluidsynth
|
||||
# VNC support - the module is not really usable in most cases tested so far (e.g. against qemu-kvm -vnc :xx)
|
||||
%bcond_with vnc
|
||||
%bcond_with faad
|
||||
%bcond_without faad
|
||||
%define chromecast 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600
|
||||
%define dca 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150600 || 0%{?BUILD_ORIG}
|
||||
|
||||
Name: vlc
|
||||
Version: 3.0.20
|
||||
Version: 3.0.21
|
||||
Release: 0
|
||||
Summary: Graphical media player
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
@@ -55,13 +57,23 @@ Patch5: vlc-libplacebo-5.patch
|
||||
# PATCH-FIX-UPSTREAM vlc-taglib-2.0.patch dimstar@opensuse.org -- Fix build against taglib 2.0
|
||||
Patch6: vlc-taglib-2.0.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch7: https://code.videolan.org/videolan/vlc/-/merge_requests/4645.patch
|
||||
# PATCH-FIX-UPSTREAM -- chromaprint, missing cast
|
||||
Patch8: https://code.videolan.org/videolan/vlc/-/commit/770789f2.patch
|
||||
Patch7: https://code.videolan.org/videolan/vlc/-/merge_requests/5590.patch
|
||||
# PATCH-FEATURE-OPENSUSE vlc-projectM-qt5.patch -- Build against projectM-qt5; openSUSE provides projectM as -qt and -qt5 variant
|
||||
Patch100: vlc-projectM-qt5.patch
|
||||
# PATCH-FIX-UPSTREAM -- Use OpenCV C++ API
|
||||
Patch103: 0001-Port-OpenCV-facedetect-example-to-C-API.patch
|
||||
|
||||
# PATCH-FIX-UPSTREAM -- add support for ffmpeg 7.0 (without VAAPI)
|
||||
Patch111: https://code.videolan.org/videolan/vlc/-/merge_requests/5574.patch
|
||||
# PATCH-FIX-UPSTREAM -- mux: avformat: fix avio callbacks signature with ffmpeg 6.1
|
||||
Patch112: https://code.videolan.org/videolan/vlc/-/merge_requests/6168.patch
|
||||
# PATCH-FIX-UPSTREAM -- ffmpeg: backport more channel checks
|
||||
Patch113: https://code.videolan.org/videolan/vlc/-/merge_requests/6273.patch
|
||||
# PATCH-FIX-UPSTREAM -- avcodec: vaapi: support VAAPI with latest FFmpeg
|
||||
Patch114: https://code.videolan.org/videolan/vlc/-/merge_requests/6606.patch
|
||||
# PATCH-FIX-UPSTREAM -- nfs: fix libnfs API v2 support
|
||||
Patch115: https://code.videolan.org/videolan/vlc/-/merge_requests/6527.patch
|
||||
|
||||
BuildRequires: Mesa-devel
|
||||
BuildRequires: aalib-devel
|
||||
BuildRequires: alsa-devel >= 1.0.24
|
||||
@@ -121,9 +133,6 @@ BuildRequires: pkgconfig(libplacebo) < 6.292.0
|
||||
BuildRequires: speex-devel >= 1.0.5
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: vcdimager-devel
|
||||
BuildRequires: (pkgconfig(libavcodec) >= 57.37.100 with pkgconfig(libavcodec) < 59)
|
||||
BuildRequires: (pkgconfig(libavformat) >= 53.21.0 with pkgconfig(libavformat) < 59)
|
||||
BuildRequires: (pkgconfig(libavutil) >= 52.4.0 with pkgconfig(libavutil) < 57)
|
||||
BuildRequires: pkgconfig(Qt5Core) >= 5.5.0
|
||||
BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5Svg)
|
||||
@@ -137,8 +146,13 @@ BuildRequires: pkgconfig(fdk-aac)
|
||||
BuildRequires: pkgconfig(gnutls) >= 3.2.0
|
||||
BuildRequires: pkgconfig(libarchive) >= 3.1.0
|
||||
BuildRequires: pkgconfig(libass) >= 0.9.8
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libavformat)
|
||||
BuildRequires: pkgconfig(libavutil)
|
||||
BuildRequires: pkgconfig(libbluray) >= 0.6.2
|
||||
%if %dca
|
||||
BuildRequires: pkgconfig(libdca) >= 0.0.5
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libgme)
|
||||
#BuildRequires: pkgconfig(libmodplug) >= 0.8.9
|
||||
BuildRequires: pkgconfig(libmpeg2) > 0.3.2
|
||||
@@ -146,11 +160,11 @@ BuildRequires: pkgconfig(libmtp) >= 1.0.0
|
||||
%if 0%{?suse_version} >= 1500
|
||||
BuildRequires: pkgconfig(libnfs)
|
||||
%endif
|
||||
BuildRequires: (pkgconfig(libpostproc) with pkgconfig(libpostproc) < 56)
|
||||
BuildRequires: (pkgconfig(libswscale) with pkgconfig(libswscale) < 6)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
BuildRequires: pkgconfig(libpostproc)
|
||||
BuildRequires: pkgconfig(libpulse) >= 1.0
|
||||
BuildRequires: pkgconfig(libsecret-1) >= 0.18
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(libva)
|
||||
BuildRequires: pkgconfig(libva-x11)
|
||||
@@ -161,7 +175,7 @@ BuildRequires: pkgconfig(soxr)
|
||||
BuildRequires: pkgconfig(speexdsp)
|
||||
BuildRequires: pkgconfig(taglib) >= 1.9
|
||||
BuildRequires: pkgconfig(twolame)
|
||||
BuildRequires: pkgconfig(vdpau) >= 0.6
|
||||
%dnl BuildRequires: pkgconfig(vdpau) >= 0.6
|
||||
BuildRequires: pkgconfig(xcb) >= 1.6
|
||||
BuildRequires: pkgconfig(xcb-composite)
|
||||
BuildRequires: pkgconfig(xcb-keysyms) >= 0.3.4
|
||||
@@ -206,7 +220,6 @@ BuildRequires: pkgconfig(xi)
|
||||
%endif
|
||||
%if 0%{?is_opensuse}
|
||||
BuildRequires: pkgconfig(libupnp)
|
||||
BuildRequires: pkgconfig(opencv) > 2.0
|
||||
%ifarch %{ix86} x86_64
|
||||
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200
|
||||
BuildRequires: pkgconfig(libprojectM-qt5) >= 2.0.0
|
||||
@@ -230,14 +243,14 @@ BuildRequires: pkgconfig(libchromaprint) >= 0.6.0
|
||||
%if 0%{?suse_version} >= 1320
|
||||
BuildRequires: pkgconfig(ncursesw)
|
||||
%endif
|
||||
# Those are dependencies which are NOT provided in openSUSE, mostly for legal reasons.
|
||||
%if %{with faad}
|
||||
BuildRequires: pkgconfig(faad2)
|
||||
%endif
|
||||
|
||||
# These are dependencies which are NOT provided in openSUSE, mostly for legal reasons.
|
||||
%if 0%{?BUILD_ORIG}
|
||||
BuildRequires: libxvidcore-devel
|
||||
BuildRequires: pkgconfig(x264) >= 0.8.6
|
||||
BuildRequires: pkgconfig(x265)
|
||||
%if %{with faad}
|
||||
BuildRequires: libfaad-devel
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%description
|
||||
@@ -255,9 +268,10 @@ libraries, which may not have all codecs enabled that were just named.
|
||||
%package devel
|
||||
Summary: Development files for the VLC media player system
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name} = %{version}
|
||||
Requires: %{name}-jack = %{version}
|
||||
Requires: %{name}-noX = %{version}
|
||||
Requires: %{name}-vdpau = %{version}
|
||||
%dnl Requires: %{name}-vdpau = %{version}
|
||||
|
||||
%description devel
|
||||
These development headers are required if you plan on coding against VLC.
|
||||
@@ -281,12 +295,7 @@ Summary: VLC without X dependencies
|
||||
Group: Productivity/Multimedia/Video/Players
|
||||
Requires: libvlc%{libvlc} = %{version}-%{release}
|
||||
Requires: libvlccore%{libvlccore} = %{version}-%{release}
|
||||
# This is a hack only due to libbluray not having versioned symbols as well as
|
||||
# having a strange ABI/API break between 0.3 and 0.7
|
||||
%requires_ge libbluray1
|
||||
Recommends: %{name}-codecs
|
||||
# lang subpackage
|
||||
Recommends: %{name}-lang
|
||||
Recommends: libdvdcss
|
||||
Conflicts: %{conflicts}-noX
|
||||
# The lang-package was renamed to vlc-lang to assist AppStream building
|
||||
@@ -396,35 +405,23 @@ Conflicts: %{conflicts}-qt
|
||||
This subpackage provides a Qt interface for VLC and selects it by
|
||||
default when `vlc` is invoked from an X session.
|
||||
|
||||
%package opencv
|
||||
Summary: OpenCV plugins for VLC media player
|
||||
Group: Productivity/Multimedia/Video/Players
|
||||
Requires: %{name}-noX = %{version}-%{release}
|
||||
# We need the noX package first, as it contains vlc-cache-gen
|
||||
Requires(post): %{name}-noX
|
||||
# Package split
|
||||
Provides: %{name}:%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so
|
||||
Conflicts: %{name} < %{version}-%{release}
|
||||
Supplements: packageand(%{name}-noX:opencv3)
|
||||
# Data required for face detection
|
||||
Recommends: opencv3
|
||||
|
||||
%description opencv
|
||||
This subpackage provides a wrapper plugin for OpenCV for
|
||||
OpenCV based video filters and a face detection example.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
%patch -P 4 -p1
|
||||
%patch -P 6 -p1
|
||||
%patch -P 7 -p1
|
||||
%patch -P 8 -p1
|
||||
%if 0%{?suse_version} > 1320 && 0%{?suse_version} < 1550 && 0%{?sle_version} < 150200
|
||||
%patch -P 100 -p1
|
||||
%endif
|
||||
%patch -P 103 -p1
|
||||
|
||||
%patch -P 111 -p1
|
||||
%patch -P 112 -p1
|
||||
%patch -P 113 -p1
|
||||
%patch -P 114 -p1
|
||||
%patch -P 115 -p1
|
||||
|
||||
# a52_init() < 0.8.0 doesn't take any arguments
|
||||
if pkg-config --max-version 0.8 liba52; then
|
||||
%patch -P 0 -p1
|
||||
@@ -457,8 +454,16 @@ autoreconf -fiv
|
||||
--enable-aa \
|
||||
--enable-alsa \
|
||||
--enable-avcodec \
|
||||
%if %chromecast
|
||||
--enable-chromecast \
|
||||
%else
|
||||
--disable-chromecast \
|
||||
%endif
|
||||
%if %dca
|
||||
--enable-dca \
|
||||
%else
|
||||
--disable-dca \
|
||||
%endif
|
||||
--enable-dvbpsi \
|
||||
--enable-dvdnav \
|
||||
--enable-dvdread \
|
||||
@@ -495,7 +500,7 @@ autoreconf -fiv
|
||||
--enable-twolame \
|
||||
--enable-v4l2 \
|
||||
--enable-vcd \
|
||||
--enable-vdpau \
|
||||
--disable-vdpau \
|
||||
--enable-vorbis \
|
||||
--enable-xcb \
|
||||
--enable-xvideo \
|
||||
@@ -504,21 +509,19 @@ autoreconf -fiv
|
||||
%if %{with opengles}
|
||||
--enable-gles2 \
|
||||
%endif
|
||||
%if 0%{?is_opensuse}
|
||||
--enable-opencv \
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1500 && 0%{?is_opensuse}
|
||||
--enable-wayland \
|
||||
%else
|
||||
--disable-wayland \
|
||||
%endif
|
||||
%if 0%{?BUILD_ORIG}
|
||||
%if %{with faad}
|
||||
--enable-faad \
|
||||
%endif
|
||||
--enable-x265 \
|
||||
%else
|
||||
--disable-faad \
|
||||
%endif
|
||||
%if 0%{?BUILD_ORIG}
|
||||
--enable-x265 \
|
||||
%else
|
||||
--disable-x265 \
|
||||
%endif
|
||||
%{nil}
|
||||
@@ -639,16 +642,6 @@ if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then
|
||||
%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins
|
||||
fi
|
||||
|
||||
%post -n %{name}-opencv
|
||||
if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then
|
||||
%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins
|
||||
fi
|
||||
|
||||
%postun -n %{name}-opencv
|
||||
if [ -x %{_libdir}/vlc/vlc-cache-gen ]; then
|
||||
%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins
|
||||
fi
|
||||
|
||||
%files
|
||||
%exclude %{_libdir}/vlc/libcompat.a
|
||||
# The presence of the .desktop file is what gives AppStream the
|
||||
@@ -916,10 +909,15 @@ fi
|
||||
%if 0%{?suse_version} >= 1550
|
||||
%{_libdir}/vlc/plugins/codec/libdav1d_plugin.so
|
||||
%endif
|
||||
%if %dca
|
||||
%{_libdir}/vlc/plugins/codec/libdca_plugin.so
|
||||
%endif
|
||||
%{_libdir}/vlc/plugins/codec/libddummy_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libdvbsub_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libedummy_plugin.so
|
||||
%if %{with faad}
|
||||
%{_libdir}/vlc/plugins/codec/libfaad_plugin.so
|
||||
%endif
|
||||
%{_libdir}/vlc/plugins/codec/libfdkaac_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libflac_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libg711_plugin.so
|
||||
@@ -973,7 +971,9 @@ fi
|
||||
%{_libdir}/vlc/plugins/demux/libavi_plugin.so
|
||||
%{_libdir}/vlc/plugins/demux/libcaf_plugin.so
|
||||
%{_libdir}/vlc/plugins/demux/libdemux_cdg_plugin.so
|
||||
%if %chromecast
|
||||
%{_libdir}/vlc/plugins/demux/libdemux_chromecast_plugin.so
|
||||
%endif
|
||||
%{_libdir}/vlc/plugins/demux/libdemuxdump_plugin.so
|
||||
%{_libdir}/vlc/plugins/demux/libdemux_stl_plugin.so
|
||||
%{_libdir}/vlc/plugins/demux/libdiracsys_plugin.so
|
||||
@@ -1087,7 +1087,9 @@ fi
|
||||
%{_libdir}/vlc/plugins/stream_filter/libskiptags_plugin.so
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_autodel_plugin.so
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_bridge_plugin.so
|
||||
%if %chromecast
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_chromecast_plugin.so
|
||||
%endif
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_cycle_plugin.so
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_delay_plugin.so
|
||||
%{_libdir}/vlc/plugins/stream_out/libstream_out_description_plugin.so
|
||||
@@ -1208,23 +1210,17 @@ fi
|
||||
%{_libdir}/vlc/plugins/codec/libfluidsynth_plugin.so
|
||||
%endif
|
||||
|
||||
%files vdpau
|
||||
%dir %{_libdir}/vlc/plugins/vdpau
|
||||
%{_libdir}/vlc/libvlc_vdpau.so.0
|
||||
%{_libdir}/vlc/libvlc_vdpau.so.0.0.0
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so
|
||||
%{_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so
|
||||
%{_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%files opencv
|
||||
%{_libdir}/vlc/plugins/video_filter/libopencv_example_plugin.so
|
||||
%{_libdir}/vlc/plugins/video_filter/libopencv_wrapper_plugin.so
|
||||
%endif
|
||||
%dnl files vdpau
|
||||
%dnl dir %{_libdir}/vlc/plugins/vdpau
|
||||
%dnl {_libdir}/vlc/libvlc_vdpau.so.0
|
||||
%dnl {_libdir}/vlc/libvlc_vdpau.so.0.0.0
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_adjust_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_chroma_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_display_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so
|
||||
%dnl {_libdir}/vlc/plugins/video_output/libglconv_vdpau_plugin.so
|
||||
|
||||
%files -n libvlc%{libvlc}
|
||||
%{_libdir}/libvlc.so.%{libvlc}*
|
||||
@@ -1244,13 +1240,10 @@ fi
|
||||
%{_libdir}/pkgconfig/libvlc.pc
|
||||
%{_libdir}/pkgconfig/vlc-plugin.pc
|
||||
%{_libdir}/vlc/libcompat.a
|
||||
%{_libdir}/vlc/libvlc_vdpau.so
|
||||
%dnl {_libdir}/vlc/libvlc_vdpau.so
|
||||
|
||||
%if 0%{?BUILD_ORIG}
|
||||
%files codecs
|
||||
%if %{with faad}
|
||||
%{_libdir}/vlc/plugins/codec/libfaad_plugin.so
|
||||
%endif
|
||||
%{_libdir}/vlc/plugins/codec/libx264_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libx26410b_plugin.so
|
||||
%{_libdir}/vlc/plugins/codec/libx265_plugin.so
|
||||
|
Reference in New Issue
Block a user