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
166da1ce
Commit
166da1ce
authored
May 11, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify verbosity filtering
parent
f2fd47b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
20 deletions
+7
-20
src/misc/messages.c
src/misc/messages.c
+7
-20
No files found.
src/misc/messages.c
View file @
166da1ce
...
@@ -432,30 +432,17 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
...
@@ -432,30 +432,17 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
# define YELLOW COL(0,33)
# define YELLOW COL(0,33)
# define WHITE COL(0,1)
# define WHITE COL(0,1)
# define GRAY "\033[0m"
# define GRAY "\033[0m"
static
const
char
msgtype
[
4
][
9
]
=
{
""
,
" error"
,
" warning"
,
" debug"
};
static
const
char
msgtype
[
4
][
9
]
=
{
""
,
" error"
,
" warning"
,
" debug"
};
static
const
char
msgcolor
[
4
][
8
]
=
{
WHITE
,
RED
,
YELLOW
,
GRAY
};
static
const
char
msgcolor
[
4
][
8
]
=
{
WHITE
,
RED
,
YELLOW
,
GRAY
};
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_this
->
p_libvlc
);
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_this
->
p_libvlc
);
msg_bank_t
*
bank
=
priv
->
msg_bank
;
int
type
=
p_item
->
i_type
;
int
i_type
=
p_item
->
i_type
;
switch
(
i_type
)
if
(
priv
->
i_verbose
<
0
||
priv
->
i_verbose
<
(
type
-
VLC_MSG_ERR
))
{
return
;
case
VLC_MSG_ERR
:
if
(
priv
->
i_verbose
<
0
)
return
;
break
;
case
VLC_MSG_INFO
:
if
(
priv
->
i_verbose
<
0
)
return
;
break
;
case
VLC_MSG_WARN
:
if
(
priv
->
i_verbose
<
1
)
return
;
break
;
case
VLC_MSG_DBG
:
if
(
priv
->
i_verbose
<
2
)
return
;
break
;
}
const
char
*
objtype
=
p_item
->
psz_object_type
;
const
char
*
objtype
=
p_item
->
psz_object_type
;
msg_bank_t
*
bank
=
priv
->
msg_bank
;
void
*
val
=
vlc_dictionary_value_for_key
(
&
bank
->
enabled_objects
,
void
*
val
=
vlc_dictionary_value_for_key
(
&
bank
->
enabled_objects
,
p_item
->
psz_module
);
p_item
->
psz_module
);
if
(
val
==
kObjectPrintingDisabled
)
if
(
val
==
kObjectPrintingDisabled
)
...
@@ -484,9 +471,9 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
...
@@ -484,9 +471,9 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
if
(
p_item
->
psz_header
!=
NULL
)
if
(
p_item
->
psz_header
!=
NULL
)
utf8_fprintf
(
stream
,
"[%s] "
,
p_item
->
psz_header
);
utf8_fprintf
(
stream
,
"[%s] "
,
p_item
->
psz_header
);
utf8_fprintf
(
stream
,
"%s %s%s: "
,
p_item
->
psz_module
,
objtype
,
utf8_fprintf
(
stream
,
"%s %s%s: "
,
p_item
->
psz_module
,
objtype
,
msgtype
[
i_
type
]);
msgtype
[
type
]);
if
(
priv
->
b_color
)
if
(
priv
->
b_color
)
fputs
(
msgcolor
[
i_
type
],
stream
);
fputs
(
msgcolor
[
type
],
stream
);
fputs
(
p_item
->
psz_msg
,
stream
);
fputs
(
p_item
->
psz_msg
,
stream
);
if
(
priv
->
b_color
)
if
(
priv
->
b_color
)
fputs
(
GRAY
,
stream
);
fputs
(
GRAY
,
stream
);
...
...
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