Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
8a72c657
Commit
8a72c657
authored
Oct 26, 2010
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncurses: simplify metadata printing
parent
ad90962d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
56 deletions
+10
-56
modules/gui/ncurses.c
modules/gui/ncurses.c
+10
-56
No files found.
modules/gui/ncurses.c
View file @
8a72c657
...
@@ -1020,63 +1020,20 @@ static void Redraw(intf_thread_t *p_intf, time_t *t_last_refresh)
...
@@ -1020,63 +1020,20 @@ static void Redraw(intf_thread_t *p_intf, time_t *t_last_refresh)
if
(
p_input
)
if
(
p_input
)
{
{
int
i
;
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
vlc_mutex_lock
(
&
p_item
->
lock
);
vlc_mutex_lock
(
&
p_item
->
lock
);
for
(
i
=
0
;
i
<
VLC_META_TYPE_COUNT
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
VLC_META_TYPE_COUNT
;
i
++
)
{
{
if
(
y
>=
y_end
)
break
;
const
char
*
psz_meta
=
vlc_meta_Get
(
p_item
->
p_meta
,
i
);
const
char
*
psz_meta
=
vlc_meta_Get
(
p_item
->
p_meta
,
i
);
if
(
psz_meta
&&
*
psz_meta
)
if
(
!
psz_meta
||
!*
psz_meta
)
{
continue
;
const
char
*
psz_meta_title
;
switch
(
i
)
if
(
p_sys
->
b_color
)
wcolor_set
(
p_sys
->
w
,
C_CATEGORY
,
NULL
);
{
MainBoxWrite
(
p_intf
,
l
++
,
1
,
" [%s]"
,
case
0
:
vlc_meta_TypeToLocalizedString
(
i
));
psz_meta_title
=
VLC_META_TITLE
;
break
;
if
(
p_sys
->
b_color
)
wcolor_set
(
p_sys
->
w
,
C_DEFAULT
,
NULL
);
case
1
:
psz_meta_title
=
VLC_META_ARTIST
;
break
;
case
2
:
psz_meta_title
=
VLC_META_GENRE
;
break
;
case
3
:
psz_meta_title
=
VLC_META_COPYRIGHT
;
break
;
case
4
:
psz_meta_title
=
VLC_META_ALBUM
;
break
;
case
5
:
psz_meta_title
=
VLC_META_TRACK_NUMBER
;
break
;
case
6
:
psz_meta_title
=
VLC_META_DESCRIPTION
;
break
;
case
7
:
psz_meta_title
=
VLC_META_RATING
;
break
;
case
8
:
psz_meta_title
=
VLC_META_DATE
;
break
;
case
9
:
psz_meta_title
=
VLC_META_SETTING
;
break
;
case
10
:
psz_meta_title
=
VLC_META_URL
;
break
;
case
11
:
psz_meta_title
=
VLC_META_LANGUAGE
;
break
;
case
12
:
psz_meta_title
=
VLC_META_NOW_PLAYING
;
break
;
case
13
:
psz_meta_title
=
VLC_META_PUBLISHER
;
break
;
case
14
:
psz_meta_title
=
VLC_META_ENCODED_BY
;
break
;
case
15
:
psz_meta_title
=
VLC_META_ART_URL
;
break
;
case
16
:
psz_meta_title
=
VLC_META_TRACKID
;
break
;
default:
psz_meta_title
=
""
;
break
;
}
if
(
p_sys
->
b_color
)
wcolor_set
(
p_sys
->
w
,
C_CATEGORY
,
NULL
);
MainBoxWrite
(
p_intf
,
l
++
,
1
,
" [%s]"
,
psz_meta_title
);
if
(
p_sys
->
b_color
)
wcolor_set
(
p_sys
->
w
,
C_DEFAULT
,
NULL
);
MainBoxWrite
(
p_intf
,
l
++
,
1
,
" %s"
,
psz_meta
);
MainBoxWrite
(
p_intf
,
l
++
,
1
,
" %s"
,
psz_meta
);
}
}
}
vlc_mutex_unlock
(
&
p_item
->
lock
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
}
}
else
else
...
@@ -1086,10 +1043,7 @@ static void Redraw(intf_thread_t *p_intf, time_t *t_last_refresh)
...
@@ -1086,10 +1043,7 @@ static void Redraw(intf_thread_t *p_intf, time_t *t_last_refresh)
if
(
p_sys
->
i_box_start
>=
p_sys
->
i_box_lines_total
)
if
(
p_sys
->
i_box_start
>=
p_sys
->
i_box_lines_total
)
p_sys
->
i_box_start
=
p_sys
->
i_box_lines_total
-
1
;
p_sys
->
i_box_start
=
p_sys
->
i_box_lines_total
-
1
;
if
(
l
-
p_sys
->
i_box_start
<
p_sys
->
i_box_lines
)
y
+=
__MIN
(
l
-
p_sys
->
i_box_start
,
p_sys
->
i_box_lines
);
y
+=
l
-
p_sys
->
i_box_start
;
else
y
+=
p_sys
->
i_box_lines
;
}
}
#if 0 /* Deprecated API */
#if 0 /* Deprecated API */
else if (p_sys->i_box_type == BOX_LOG)
else if (p_sys->i_box_type == BOX_LOG)
...
...
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