Commit b99b1271 authored by Laurent Aimar's avatar Laurent Aimar

* es_out: reorder meta infos.

parent 3104e5dc
......@@ -2,7 +2,7 @@
* es_out.c: Es Out handler for input.
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id: es_out.c,v 1.24 2004/01/31 20:02:26 fenrir Exp $
* $Id: es_out.c,v 1.25 2004/01/31 20:21:47 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -407,78 +407,78 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
( p_playlist = (playlist_t *)vlc_object_find( p_input,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ) ) )
{
/* Add information */
char *psz_type;
switch( fmt->i_cat )
{
case AUDIO_ES:
if( fmt->psz_description )
psz_type = _("Audio");
break;
case VIDEO_ES:
psz_type = _("Video");
break;
case SPU_ES:
psz_type = _("Subtitle");
break;
default:
psz_type = NULL;
break;
}
if( psz_type )
{
input_AddInfo( p_cat, _("Description"), "%s",
fmt->psz_description );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Description"), "%s",
fmt->psz_description );
input_AddInfo( p_cat, _("Type"), psz_type );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Type"), psz_type );
}
input_AddInfo( p_cat, _("Codec"), "%.4s", (char*)&fmt->i_codec );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Codec"),
"%.4s",(char*)&fmt->i_codec );
if( *psz_description )
{
input_AddInfo( p_cat, _("Language"), psz_description );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Language"),
"%s", psz_description );
}
if( fmt->psz_description && *fmt->psz_description )
{
input_AddInfo( p_cat, _("Description"), "%s", fmt->psz_description );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Description"),
"%s", fmt->psz_description );
}
input_AddInfo( p_cat, _("Codec"), "%.4s",
(char*)&fmt->i_codec );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Codec"),"%.4s",(char*)&fmt->i_codec );
input_AddInfo( p_cat, _("Type"), _("Audio") );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Type"), _("Audio") );
/* Add information */
switch( fmt->i_cat )
{
case AUDIO_ES:
if( fmt->audio.i_channels > 0 )
{
input_AddInfo( p_cat, _("Channels"), "%d",
fmt->audio.i_channels );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Channels"), "%d", fmt->audio.i_channels );
input_AddInfo( p_cat, _("Channels"),
"%d", fmt->audio.i_channels );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Channels"),
"%d", fmt->audio.i_channels );
}
if( fmt->audio.i_rate > 0 )
{
input_AddInfo( p_cat, _("Sample rate"), _("%d Hz"),
fmt->audio.i_rate );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Sample rate"), _("%d Hz"),
fmt->audio.i_rate );
input_AddInfo( p_cat, _("Sample rate"),
_("%d Hz"), fmt->audio.i_rate );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Sample rate"),
_("%d Hz"), fmt->audio.i_rate );
}
if( fmt->i_bitrate > 0 )
if( fmt->audio.i_bitspersample > 0 )
{
input_AddInfo( p_cat, _("Bitrate"), _("%d bps"),
fmt->i_bitrate );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Bitrate"), _("%d bps"),
fmt->i_bitrate );
input_AddInfo( p_cat, _("Bits per sample"),
"%d", fmt->audio.i_bitspersample );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Bits per sample"),
"%d", fmt->audio.i_bitspersample );
}
if( fmt->audio.i_bitspersample )
if( fmt->i_bitrate > 0 )
{
input_AddInfo( p_cat, _("Bits per sample"), "%d",
fmt->audio.i_bitspersample );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Bits per sample"), "%d",
fmt->audio.i_bitspersample );
input_AddInfo( p_cat, _("Bitrate"),
_("%d bps"), fmt->i_bitrate );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Bitrate"),
_("%d bps"), fmt->i_bitrate );
}
break;
case VIDEO_ES:
if( fmt->psz_description )
{
input_AddInfo( p_cat, _("Description"), "%s",
fmt->psz_description );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Description"), "%s",
fmt->psz_description );
}
input_AddInfo( p_cat, _("Type"), _("Video") );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Type"), _("Video") );
input_AddInfo( p_cat, _("Codec"), "%.4s",
(char*)&fmt->i_codec );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Codec"), "%.4s",
(char*)&fmt->i_codec );
case VIDEO_ES:
if( fmt->video.i_width > 0 && fmt->video.i_height > 0 )
{
input_AddInfo( p_cat, _("Resolution"), "%dx%d",
......@@ -499,27 +499,13 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
fmt->video.i_visible_height);
}
break;
case SPU_ES:
input_AddInfo( p_cat, _("Type"), _("Subtitle") );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Type"), _("Subtitle") );
input_AddInfo( p_cat, _("Codec"), "%.4s",
(char*)&fmt->i_codec );
playlist_AddInfo( p_playlist, -1, psz_cat,
_("Codec"), "%.4s",
(char*)&fmt->i_codec );
break;
default:
break;
}
if( p_playlist ) vlc_object_release( p_playlist );
}
if( *psz_description )
{
input_AddInfo( p_cat, _("Language"), psz_description );
playlist_AddInfo( p_playlist, -1, psz_cat, _("Language"), "%s", psz_description );
}
free( psz_description );
es_format_Copy( &es->p_es->fmt, fmt );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment