Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7c5028ac
Commit
7c5028ac
authored
Jun 28, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* es_out: re-enabled meta infos about ES.
parent
e4c110a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
68 deletions
+76
-68
src/input/es_out.c
src/input/es_out.c
+76
-68
No files found.
src/input/es_out.c
View file @
7c5028ac
...
...
@@ -109,6 +109,7 @@ static void EsOutDel ( es_out_t *, es_out_id_t * );
static
void
EsOutSelect
(
es_out_t
*
out
,
es_out_id_t
*
es
,
vlc_bool_t
b_force
);
static
int
EsOutControl
(
es_out_t
*
,
int
i_query
,
va_list
);
static
void
EsOutAddInfo
(
es_out_t
*
,
es_out_id_t
*
es
);
static
void
EsSelect
(
es_out_t
*
out
,
es_out_id_t
*
es
);
static
void
EsUnselect
(
es_out_t
*
out
,
es_out_id_t
*
es
,
vlc_bool_t
b_update
);
...
...
@@ -474,74 +475,6 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
if
(
es
->
p_pgrm
==
p_sys
->
p_pgrm
)
EsOutESVarUpdate
(
out
,
es
,
VLC_FALSE
);
#if 0
/* Add stream info */
sprintf( psz_cat, _("Stream %d"), out->p_sys->i_id - 1 );
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),
"%.4s", (char*)&fmt->i_codec );
if( *psz_description )
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Language"),
"%s", psz_description );
if( fmt->psz_description && *fmt->psz_description )
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Description"),
"%s", fmt->psz_description );
/* Add information */
switch( fmt->i_cat )
{
case AUDIO_ES:
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Type"), _("Audio") );
if( fmt->audio.i_channels > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Channels"),
"%d", fmt->audio.i_channels );
if( fmt->audio.i_rate > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Sample rate"),
_("%d Hz"), fmt->audio.i_rate );
if( fmt->audio.i_bitspersample > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Bits per sample"), "%d",
fmt->audio.i_bitspersample );
if( fmt->i_bitrate > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Bitrate"),
_("%d bps"), fmt->i_bitrate );
break;
case VIDEO_ES:
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Type"), _("Video") );
if( fmt->video.i_width > 0 && fmt->video.i_height > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Resolution"), "%dx%d",
fmt->video.i_width, fmt->video.i_height );
if( fmt->video.i_visible_width > 0 &&
fmt->video.i_visible_height > 0 )
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Display resolution"), "%dx%d",
fmt->video.i_visible_width,
fmt->video.i_visible_height);
break;
case SPU_ES:
input_Control( p_input, INPUT_ADD_INFO, psz_cat,
_("Type"), _("Subtitle") );
break;
default:
break;
}
free( psz_description );
#endif
/* Select it if needed */
EsOutSelect
(
out
,
es
,
VLC_FALSE
);
...
...
@@ -561,6 +494,8 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
break
;
}
EsOutAddInfo
(
out
,
es
);
return
es
;
}
...
...
@@ -1104,3 +1039,76 @@ static char *LanguageGetName( const char *psz_code )
return
strdup
(
pl
->
psz_eng_name
);
}
}
/****************************************************************************
* EsOutAddInfo:
* - add meta info to the playlist item
****************************************************************************/
static
void
EsOutAddInfo
(
es_out_t
*
out
,
es_out_id_t
*
es
)
{
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
es_format_t
*
fmt
=
&
es
->
fmt
;
char
psz_cat
[
strlen
(
_
(
"Stream %d"
))
+
12
];
/* Add stream info */
sprintf
(
psz_cat
,
_
(
"Stream %d"
),
out
->
p_sys
->
i_id
-
1
);
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Codec"
),
"%.4s"
,
(
char
*
)
&
fmt
->
i_codec
);
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Language"
),
"%s"
,
es
->
psz_description
);
/* Add information */
switch
(
fmt
->
i_cat
)
{
case
AUDIO_ES
:
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Type"
),
_
(
"Audio"
)
);
if
(
fmt
->
audio
.
i_channels
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Channels"
),
"%d"
,
fmt
->
audio
.
i_channels
);
if
(
fmt
->
audio
.
i_rate
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Sample rate"
),
_
(
"%d Hz"
),
fmt
->
audio
.
i_rate
);
if
(
fmt
->
audio
.
i_bitspersample
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Bits per sample"
),
"%d"
,
fmt
->
audio
.
i_bitspersample
);
if
(
fmt
->
i_bitrate
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Bitrate"
),
_
(
"%d kb/s"
),
fmt
->
i_bitrate
/
1000
);
break
;
case
VIDEO_ES
:
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Type"
),
_
(
"Video"
)
);
if
(
fmt
->
video
.
i_width
>
0
&&
fmt
->
video
.
i_height
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Resolution"
),
"%dx%d"
,
fmt
->
video
.
i_width
,
fmt
->
video
.
i_height
);
if
(
fmt
->
video
.
i_visible_width
>
0
&&
fmt
->
video
.
i_visible_height
>
0
)
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Display resolution"
),
"%dx%d"
,
fmt
->
video
.
i_visible_width
,
fmt
->
video
.
i_visible_height
);
break
;
case
SPU_ES
:
input_Control
(
p_input
,
INPUT_ADD_INFO
,
psz_cat
,
_
(
"Type"
),
_
(
"Subtitle"
)
);
break
;
default:
break
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment