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
dde93dd5
Commit
dde93dd5
authored
Mar 18, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename msg_item_* to vlc_log_* (cosmetic)
(This is needed for the next change.)
parent
a5d95db0
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35 additions
and
36 deletions
+35
-36
include/vlc_interface.h
include/vlc_interface.h
+2
-2
include/vlc_messages.h
include/vlc_messages.h
+3
-3
lib/log.c
lib/log.c
+1
-1
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+3
-3
modules/gui/ncurses.c
modules/gui/ncurses.c
+6
-6
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.cpp
+3
-3
modules/gui/qt4/dialogs/messages.hpp
modules/gui/qt4/dialogs/messages.hpp
+2
-2
modules/misc/logger.c
modules/misc/logger.c
+8
-9
src/libvlc.h
src/libvlc.h
+1
-1
src/misc/messages.c
src/misc/messages.c
+5
-5
No files found.
include/vlc_interface.h
View file @
dde93dd5
...
...
@@ -104,12 +104,12 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
/**
* Message logging callback signature.
* \param data data pointer as provided to vlc_msg_SetCallback().
* \param type message type (VLC_MSG_* values from enum
msg_item
_type)
* \param type message type (VLC_MSG_* values from enum
vlc_log
_type)
* \param item meta informations
* \param fmt format string
* \param args format string arguments
*/
typedef
void
(
*
vlc_log_cb
)
(
void
*
data
,
int
type
,
const
msg_item
_t
*
item
,
typedef
void
(
*
vlc_log_cb
)
(
void
*
data
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
args
);
VLC_API
void
vlc_LogSet
(
libvlc_int_t
*
,
vlc_log_cb
cb
,
void
*
data
);
...
...
include/vlc_messages.h
View file @
dde93dd5
...
...
@@ -43,7 +43,7 @@
*/
/** Message types */
enum
msg_item
_type
enum
vlc_log
_type
{
VLC_MSG_INFO
=
0
,
/**< Important information */
VLC_MSG_ERR
,
/**< Error */
...
...
@@ -54,13 +54,13 @@ enum msg_item_type
/**
* Log message
*/
typedef
struct
typedef
struct
vlc_log_t
{
uintptr_t
i_object_id
;
/**< Emitter (temporaly) unique object ID or 0 */
const
char
*
psz_object_type
;
/**< Emitter object type name */
const
char
*
psz_module
;
/**< Emitter module (source code) */
const
char
*
psz_header
;
/**< Additional header (used by VLM media) */
}
msg_item
_t
;
}
vlc_log
_t
;
VLC_API
void
vlc_Log
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...)
VLC_FORMAT
(
4
,
5
);
...
...
lib/log.c
View file @
dde93dd5
...
...
@@ -60,7 +60,7 @@ static void libvlc_log (int level, const char *fmt, ...)
va_end
(
ap
);
}
static
void
libvlc_logf
(
void
*
dummy
,
int
level
,
const
msg_item
_t
*
item
,
static
void
libvlc_logf
(
void
*
dummy
,
int
level
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
char
*
msg
;
...
...
modules/gui/macosx/intf.h
View file @
dde93dd5
...
...
@@ -201,7 +201,7 @@ struct intf_sys_t
-
(
IBAction
)
showMessagesPanel
:(
id
)
sender
;
-
(
IBAction
)
updateMessagesPanel
:(
id
)
sender
;
-
(
void
)
processReceivedlibvlcMessage
:(
const
msg_item
_t
*
)
item
ofType
:
(
int
)
type
withStr
:
(
char
*
)
str
;
-
(
void
)
processReceivedlibvlcMessage
:(
const
vlc_log
_t
*
)
item
ofType
:
(
int
)
type
withStr
:
(
char
*
)
str
;
-
(
void
)
updateTogglePlaylistState
;
...
...
modules/gui/macosx/intf.m
View file @
dde93dd5
...
...
@@ -82,7 +82,7 @@ static void updateProgressPanel (void *, const char *, float);
static
bool
checkProgressPanel
(
void
*
);
static
void
destroyProgressPanel
(
void
*
);
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
msg_item
_t
*
item
,
const
char
*
format
,
va_list
ap
);
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
format
,
va_list
ap
);
static
int
InputEvent
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
...
...
@@ -300,7 +300,7 @@ static void Run(intf_thread_t *p_intf)
* ready to be displayed. We store everything in a NSArray in our Cocoa part
* of this file.
*****************************************************************************/
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
msg_item
_t
*
item
,
const
char
*
format
,
va_list
ap
)
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
format
,
va_list
ap
)
{
int
canc
=
vlc_savecancel
();
char
*
str
;
...
...
@@ -1901,7 +1901,7 @@ static VLCMain *_o_sharedMainInstance = nil;
return
@""
;
}
-
(
void
)
processReceivedlibvlcMessage
:(
const
msg_item
_t
*
)
item
ofType
:
(
int
)
i_type
withStr
:
(
char
*
)
str
-
(
void
)
processReceivedlibvlcMessage
:(
const
vlc_log
_t
*
)
item
ofType
:
(
int
)
i_type
withStr
:
(
char
*
)
str
{
if
(
o_msg_arr
)
{
NSColor
*
o_white
=
[
NSColor
whiteColor
];
...
...
modules/gui/ncurses.c
View file @
dde93dd5
...
...
@@ -194,7 +194,7 @@ struct intf_sys_t
struct
{
int
type
;
msg_item_t
*
item
;
vlc_log_t
*
item
;
char
*
msg
;
}
msgs
[
50
];
// ring buffer
int
i_msgs
;
...
...
@@ -999,7 +999,7 @@ static int DrawMessages(intf_thread_t *intf)
vlc_mutex_lock
(
&
sys
->
msg_lock
);
int
i
=
sys
->
i_msgs
;
for
(;;)
{
msg_item
_t
*
msg
=
sys
->
msgs
[
i
].
item
;
vlc_log
_t
*
msg
=
sys
->
msgs
[
i
].
item
;
if
(
msg
)
{
if
(
sys
->
color
)
color_set
(
sys
->
msgs
[
i
].
type
+
C_INFO
,
NULL
);
...
...
@@ -1698,9 +1698,9 @@ static void HandleKey(intf_thread_t *intf)
/*
*
*/
static
msg_item_t
*
msg_Copy
(
const
msg_item
_t
*
msg
)
static
vlc_log_t
*
msg_Copy
(
const
vlc_log
_t
*
msg
)
{
msg_item_t
*
copy
=
(
msg_item
_t
*
)
xmalloc
(
sizeof
(
*
copy
));
vlc_log_t
*
copy
=
(
vlc_log
_t
*
)
xmalloc
(
sizeof
(
*
copy
));
copy
->
i_object_id
=
msg
->
i_object_id
;
copy
->
psz_object_type
=
msg
->
psz_object_type
;
copy
->
psz_module
=
strdup
(
msg
->
psz_module
);
...
...
@@ -1708,14 +1708,14 @@ static msg_item_t *msg_Copy (const msg_item_t *msg)
return
copy
;
}
static
void
msg_Free
(
msg_item
_t
*
msg
)
static
void
msg_Free
(
vlc_log
_t
*
msg
)
{
free
((
char
*
)
msg
->
psz_module
);
free
((
char
*
)
msg
->
psz_header
);
free
(
msg
);
}
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
msg_item
_t
*
msg
,
static
void
MsgCallback
(
void
*
data
,
int
type
,
const
vlc_log
_t
*
msg
,
const
char
*
format
,
va_list
ap
)
{
intf_sys_t
*
sys
=
data
;
...
...
modules/gui/qt4/dialogs/messages.cpp
View file @
dde93dd5
...
...
@@ -50,7 +50,7 @@ enum {
class
MsgEvent
:
public
QEvent
{
public:
MsgEvent
(
int
,
const
msg_item
_t
*
,
const
char
*
);
MsgEvent
(
int
,
const
vlc_log
_t
*
,
const
char
*
);
int
priority
;
uintptr_t
object_id
;
...
...
@@ -60,7 +60,7 @@ public:
QString
text
;
};
MsgEvent
::
MsgEvent
(
int
type
,
const
msg_item
_t
*
msg
,
const
char
*
text
)
MsgEvent
::
MsgEvent
(
int
type
,
const
vlc_log
_t
*
msg
,
const
char
*
text
)
:
QEvent
(
(
QEvent
::
Type
)
MsgEvent_Type
),
priority
(
type
),
object_id
(
msg
->
i_object_id
),
...
...
@@ -332,7 +332,7 @@ void MessagesDialog::tabChanged( int i )
:
qtr
(
"Clear the messages"
)
);
}
void
MessagesDialog
::
MsgCallback
(
void
*
self
,
int
type
,
const
msg_item
_t
*
item
,
void
MessagesDialog
::
MsgCallback
(
void
*
self
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
format
,
va_list
ap
)
{
MessagesDialog
*
dialog
=
(
MessagesDialog
*
)
self
;
...
...
modules/gui/qt4/dialogs/messages.hpp
View file @
dde93dd5
...
...
@@ -50,13 +50,13 @@ private:
virtual
~
MessagesDialog
();
Ui
::
messagesPanelWidget
ui
;
static
void
sinkMessage
(
void
*
,
msg_item
_t
*
,
unsigned
);
static
void
sinkMessage
(
void
*
,
vlc_log
_t
*
,
unsigned
);
void
customEvent
(
QEvent
*
);
void
sinkMessage
(
const
MsgEvent
*
);
bool
matchFilter
(
const
QString
&
);
vlc_atomic_t
verbosity
;
static
void
MsgCallback
(
void
*
,
int
,
const
msg_item
_t
*
,
const
char
*
,
static
void
MsgCallback
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
private
slots
:
...
...
modules/misc/logger.c
View file @
dde93dd5
...
...
@@ -84,14 +84,13 @@ struct intf_sys_t
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
TextPrint
(
void
*
,
int
,
const
msg_item
_t
*
,
const
char
*
,
va_list
);
static
void
HtmlPrint
(
void
*
,
int
,
const
msg_item
_t
*
,
const
char
*
,
va_list
);
static
void
TextPrint
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
static
void
HtmlPrint
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
#ifdef HAVE_SYSLOG_H
static
void
SyslogPrint
(
void
*
,
int
,
const
msg_item_t
*
,
const
char
*
,
va_list
);
static
void
SyslogPrint
(
void
*
,
int
,
const
vlc_log_t
*
,
const
char
*
,
va_list
);
#endif
#ifdef __ANDROID__
static
void
AndroidPrint
(
void
*
,
int
,
const
msg_item
_t
*
,
const
char
*
,
va_list
);
static
void
AndroidPrint
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
#endif
/*****************************************************************************
...
...
@@ -357,7 +356,7 @@ static const android_LogPriority prioritytype[4] = {
ANDROID_LOG_DEBUG
};
static
void
AndroidPrint
(
void
*
opaque
,
int
type
,
const
msg_item
_t
*
item
,
static
void
AndroidPrint
(
void
*
opaque
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
(
void
)
item
;
...
...
@@ -372,7 +371,7 @@ static void AndroidPrint( void *opaque, int type, const msg_item_t *item,
}
#endif
static
void
TextPrint
(
void
*
opaque
,
int
type
,
const
msg_item
_t
*
item
,
static
void
TextPrint
(
void
*
opaque
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
intf_thread_t
*
p_intf
=
opaque
;
...
...
@@ -391,7 +390,7 @@ static void TextPrint( void *opaque, int type, const msg_item_t *item,
}
#ifdef HAVE_SYSLOG_H
static
void
SyslogPrint
(
void
*
opaque
,
int
type
,
const
msg_item
_t
*
item
,
static
void
SyslogPrint
(
void
*
opaque
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
static
const
int
i_prio
[
4
]
=
{
LOG_INFO
,
LOG_ERR
,
LOG_WARNING
,
LOG_DEBUG
};
...
...
@@ -416,7 +415,7 @@ static void SyslogPrint( void *opaque, int type, const msg_item_t *item,
}
#endif
static
void
HtmlPrint
(
void
*
opaque
,
int
type
,
const
msg_item
_t
*
item
,
static
void
HtmlPrint
(
void
*
opaque
,
int
type
,
const
vlc_log
_t
*
item
,
const
char
*
fmt
,
va_list
ap
)
{
static
const
unsigned
color
[
4
]
=
{
...
...
src/libvlc.h
View file @
dde93dd5
...
...
@@ -150,7 +150,7 @@ typedef struct libvlc_priv_t
/* Logging */
struct
{
void
(
*
cb
)
(
void
*
,
int
,
const
msg_item
_t
*
,
const
char
*
,
va_list
);
void
(
*
cb
)
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
void
*
opaque
;
vlc_rwlock_t
lock
;
}
log
;
...
...
src/misc/messages.c
View file @
dde93dd5
...
...
@@ -68,7 +68,7 @@ void vlc_Log (vlc_object_t *obj, int type, const char *module,
}
#ifdef WIN32
static
void
Win32DebugOutputMsg
(
void
*
,
int
,
const
msg_item
_t
*
,
static
void
Win32DebugOutputMsg
(
void
*
,
int
,
const
vlc_log
_t
*
,
const
char
*
,
va_list
);
#endif
...
...
@@ -143,7 +143,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
#endif
/* Fill message information fields */
msg_item
_t
msg
;
vlc_log
_t
msg
;
msg
.
i_object_id
=
(
uintptr_t
)
obj
;
msg
.
psz_object_type
=
(
obj
!=
NULL
)
?
obj
->
psz_object_type
:
"generic"
;
...
...
@@ -185,7 +185,7 @@ static const char msg_type[4][9] = { "", " error", " warning", " debug" };
#define GRAY "\033[0m"
static
const
char
msg_color
[
4
][
8
]
=
{
WHITE
,
RED
,
YELLOW
,
GRAY
};
static
void
PrintColorMsg
(
void
*
d
,
int
type
,
const
msg_item
_t
*
p_item
,
static
void
PrintColorMsg
(
void
*
d
,
int
type
,
const
vlc_log
_t
*
p_item
,
const
char
*
format
,
va_list
ap
)
{
FILE
*
stream
=
stderr
;
...
...
@@ -211,7 +211,7 @@ static void PrintColorMsg (void *d, int type, const msg_item_t *p_item,
vlc_restorecancel
(
canc
);
}
static
void
PrintMsg
(
void
*
d
,
int
type
,
const
msg_item
_t
*
p_item
,
static
void
PrintMsg
(
void
*
d
,
int
type
,
const
vlc_log
_t
*
p_item
,
const
char
*
format
,
va_list
ap
)
{
FILE
*
stream
=
stderr
;
...
...
@@ -238,7 +238,7 @@ static void PrintMsg (void *d, int type, const msg_item_t *p_item,
}
#ifdef WIN32
static
void
Win32DebugOutputMsg
(
void
*
d
,
int
type
,
const
msg_item
_t
*
p_item
,
static
void
Win32DebugOutputMsg
(
void
*
d
,
int
type
,
const
vlc_log
_t
*
p_item
,
const
char
*
format
,
va_list
dol
)
{
VLC_UNUSED
(
p_item
);
...
...
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