Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
3794d92b
Commit
3794d92b
authored
Mar 20, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: pass log message directly
Let the callback format message context infos however it wants.
parent
dac9ab98
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
lib/log.c
lib/log.c
+2
-24
No files found.
lib/log.c
View file @
3794d92b
...
...
@@ -61,24 +61,10 @@ void libvlc_log_get_object(const libvlc_log_t *ctx,
*
id
=
ctx
->
i_object_id
;
}
VLC_FORMAT
(
4
,
5
)
static
void
libvlc_log
(
libvlc_instance_t
*
inst
,
int
level
,
const
libvlc_log_t
*
ctx
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
inst
->
log
.
cb
(
inst
->
log
.
data
,
level
,
ctx
,
fmt
,
ap
);
va_end
(
ap
);
}
static
void
libvlc_logf
(
void
*
data
,
int
level
,
const
vlc_log_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
char
*
msg
;
if
(
unlikely
(
vasprintf
(
&
msg
,
fmt
,
ap
)
==
-
1
))
return
;
libvlc_instance_t
*
inst
=
data
;
switch
(
level
)
{
...
...
@@ -88,15 +74,7 @@ static void libvlc_logf (void *data, int level, const vlc_log_t *item,
case
VLC_MSG_DBG
:
level
=
LIBVLC_DEBUG
;
break
;
}
if
(
item
->
psz_header
!=
NULL
)
libvlc_log
(
data
,
level
,
item
,
"[%p] [%s]: %s %s %s"
,
(
void
*
)
item
->
i_object_id
,
item
->
psz_header
,
item
->
psz_module
,
item
->
psz_object_type
,
msg
);
else
libvlc_log
(
data
,
level
,
item
,
"[%p]: %s %s %s"
,
(
void
*
)
item
->
i_object_id
,
item
->
psz_module
,
item
->
psz_object_type
,
msg
);
free
(
msg
);
inst
->
log
.
cb
(
inst
->
log
.
data
,
level
,
item
,
fmt
,
ap
);
}
void
libvlc_log_unset
(
libvlc_instance_t
*
inst
)
...
...
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