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
e0b1c8bc
Commit
e0b1c8bc
authored
Dec 23, 2011
by
Sergey Radionov
Committed by
Rémi Denis-Courmont
Dec 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
messages.c: added logging via OutputDebugString under windows.
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
a30a747a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
src/misc/messages.c
src/misc/messages.c
+43
-0
No files found.
src/misc/messages.c
View file @
e0b1c8bc
...
@@ -132,6 +132,10 @@ void vlc_Log (vlc_object_t *obj, int type, const char *module,
...
@@ -132,6 +132,10 @@ void vlc_Log (vlc_object_t *obj, int type, const char *module,
static
void
PrintColorMsg
(
void
*
,
int
,
const
msg_item_t
*
,
static
void
PrintColorMsg
(
void
*
,
int
,
const
msg_item_t
*
,
const
char
*
,
va_list
);
const
char
*
,
va_list
);
static
void
PrintMsg
(
void
*
,
int
,
const
msg_item_t
*
,
const
char
*
,
va_list
);
static
void
PrintMsg
(
void
*
,
int
,
const
msg_item_t
*
,
const
char
*
,
va_list
);
#ifdef WIN32
static
void
Win32DebugOutputMsg
(
void
*
,
int
,
const
msg_item_t
*
,
const
char
*
,
va_list
);
#endif
/**
/**
* Emit a log message. This function is the variable argument list equivalent
* Emit a log message. This function is the variable argument list equivalent
...
@@ -230,6 +234,13 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
...
@@ -230,6 +234,13 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
PrintMsg
(
&
priv
->
i_verbose
,
type
,
&
msg
,
format
,
ap
);
PrintMsg
(
&
priv
->
i_verbose
,
type
,
&
msg
,
format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
#ifdef WIN32
va_list
dol
;
va_copy
(
dol
,
args
);
Win32DebugOutputMsg
(
&
priv
->
i_verbose
,
type
,
&
msg
,
format
,
dol
);
va_end
(
dol
);
#endif
vlc_rwlock_rdlock
(
&
msg_lock
);
vlc_rwlock_rdlock
(
&
msg_lock
);
for
(
msg_subscription_t
*
sub
=
msg_head
;
sub
!=
NULL
;
sub
=
sub
->
next
)
for
(
msg_subscription_t
*
sub
=
msg_head
;
sub
!=
NULL
;
sub
=
sub
->
next
)
{
{
...
@@ -303,3 +314,35 @@ static void PrintMsg (void *d, int type, const msg_item_t *p_item,
...
@@ -303,3 +314,35 @@ static void PrintMsg (void *d, int type, const msg_item_t *p_item,
funlockfile
(
stream
);
funlockfile
(
stream
);
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
}
}
#ifdef WIN32
static
void
Win32DebugOutputMsg
(
void
*
d
,
int
type
,
const
msg_item_t
*
p_item
,
const
char
*
format
,
va_list
dol
)
{
const
signed
char
*
pverbose
=
d
;
if
(
pverbose
&&
(
*
pverbose
<
0
||
*
pverbose
<
(
type
-
VLC_MSG_ERR
)))
return
;
va_list
dol2
;
va_copy
(
dol2
,
dol
);
int
msg_len
=
vsnprintf
(
NULL
,
0
,
format
,
dol2
);
va_end
(
dol2
);
if
(
msg_len
<=
0
)
return
;
char
*
msg
=
malloc
(
msg_len
+
1
+
1
);
if
(
!
msg
)
return
;
msg_len
=
vsnprintf
(
msg
,
msg_len
+
1
,
format
,
dol
);
if
(
msg_len
>
0
){
if
(
msg
[
msg_len
-
1
]
!=
'\n'
){
msg
[
msg_len
]
=
'\n'
;
msg
[
msg_len
+
1
]
=
'\0'
;
}
OutputDebugString
(
msg
);
}
free
(
msg
);
}
#endif
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