[vlc-devel] [PATCH 2/2] input: es_out: differentiate decoded & source audio formats
Rémi Denis-Courmont
remi at remlab.net
Mon Jan 27 15:54:49 CET 2020
Hi,
That won't change anything w.r.t. to id10t errors. Decoded parameters will still be confusing, until/unless they are removed completely (and I'd rather close bugs as invalid than conceal some meta).
Le 27 janvier 2020 16:17:31 GMT+02:00, Francois Cartegnie <fcvlcdev at free.fr> a écrit :
>Because users can't get it. Too many invalid bugs.
>---
> src/input/es_out.c | 47 +++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 36 insertions(+), 11 deletions(-)
>
>diff --git a/src/input/es_out.c b/src/input/es_out.c
>index 2a8dd6ce8d..df4bd89f84 100644
>--- a/src/input/es_out.c
>+++ b/src/input/es_out.c
>@@ -3802,22 +3802,47 @@ static void EsOutUpdateInfo( es_out_t *out,
>es_out_id_t *es, const vlc_meta_t *p
> case AUDIO_ES:
> info_category_AddInfo( p_cat, _("Type"), _("Audio") );
>
>- if( fmt->audio.i_physical_channels )
>+ if( p_fmt_es->audio.i_physical_channels )
> info_category_AddInfo( p_cat, _("Channels"), "%s",
>- vlc_gettext( aout_FormatPrintChannels( &fmt->audio ) )
>);
>+ vlc_gettext( aout_FormatPrintChannels(
>&p_fmt_es->audio ) ) );
>
>- if( fmt->audio.i_rate != 0 )
>- {
>+ if( p_fmt_es->audio.i_rate )
> info_category_AddInfo( p_cat, _("Sample rate"), _("%u Hz"),
>- fmt->audio.i_rate );
>- }
>+ p_fmt_es->audio.i_rate );
>
>- unsigned int i_bitspersample = fmt->audio.i_bitspersample;
>- if( i_bitspersample == 0 )
>- i_bitspersample = aout_BitsPerSample( fmt->i_codec );
>- if( i_bitspersample != 0 )
>+ unsigned int i_orgbps = p_fmt_es->audio.i_bitspersample;
>+ if( i_orgbps == 0 )
>+ i_orgbps = aout_BitsPerSample( p_fmt_es->i_codec );
>+ if( i_orgbps != 0 )
> info_category_AddInfo( p_cat, _("Bits per sample"), "%u",
>- i_bitspersample );
>+ i_orgbps );
>+
>+ if( fmt->audio.i_format &&
>+ fmt->audio.i_format != p_fmt_es->i_codec )
>+ {
>+ psz_codec_description = vlc_fourcc_GetDescription(
>AUDIO_ES,
>+
>fmt->audio.i_format );
>+ info_category_AddCodecInfo( p_cat, _("Decoded format"),
>+ fmt->audio.i_format,
>+ psz_codec_description );
>+ }
>+
>+ if( fmt->audio.i_physical_channels &&
>+ fmt->audio.i_physical_channels !=
>p_fmt_es->audio.i_physical_channels )
>+ info_category_AddInfo( p_cat, _("Decoded channels"), "%s",
>+ vlc_gettext( aout_FormatPrintChannels( &fmt->audio ) )
>);
>+
>+ if( fmt->audio.i_rate &&
>+ fmt->audio.i_rate != p_fmt_es->audio.i_rate )
>+ info_category_AddInfo( p_cat, _("Decoded sample rate"),
>_("%u Hz"),
>+ fmt->audio.i_rate );
>+
>+ unsigned i_outbps = fmt->audio.i_bitspersample;
>+ if( i_outbps == 0 )
>+ i_outbps = aout_BitsPerSample( fmt->i_codec );
>+ if( i_outbps != 0 && i_outbps != i_orgbps )
>+ info_category_AddInfo( p_cat, _("Decoded bits per
>sample"), "%u",
>+ i_outbps );
>
> if( fmt->i_bitrate != 0 )
> {
>--
>2.24.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200127/3d8247f4/attachment.html>
More information about the vlc-devel
mailing list