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
f1c5ba55
Commit
f1c5ba55
authored
Aug 19, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove object message filtering from core
parent
da803b04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
112 deletions
+3
-112
include/vlc_messages.h
include/vlc_messages.h
+0
-7
src/libvlc.c
src/libvlc.c
+0
-24
src/libvlccore.sym
src/libvlccore.sym
+0
-2
src/misc/messages.c
src/misc/messages.c
+3
-79
No files found.
include/vlc_messages.h
View file @
f1c5ba55
...
@@ -121,13 +121,6 @@ typedef void (*msg_callback_t) (msg_cb_data_t *, const msg_item_t *);
...
@@ -121,13 +121,6 @@ typedef void (*msg_callback_t) (msg_cb_data_t *, const msg_item_t *);
VLC_API
msg_subscription_t
*
msg_Subscribe
(
libvlc_int_t
*
,
msg_callback_t
,
msg_cb_data_t
*
)
VLC_USED
;
VLC_API
msg_subscription_t
*
msg_Subscribe
(
libvlc_int_t
*
,
msg_callback_t
,
msg_cb_data_t
*
)
VLC_USED
;
VLC_API
void
msg_Unsubscribe
(
msg_subscription_t
*
);
VLC_API
void
msg_Unsubscribe
(
msg_subscription_t
*
);
/* Enable or disable a certain object debug messages */
VLC_API
void
msg_EnableObjectPrinting
(
vlc_object_t
*
,
const
char
*
psz_object
);
#define msg_EnableObjectPrinting(a,b) msg_EnableObjectPrinting(VLC_OBJECT(a),b)
VLC_API
void
msg_DisableObjectPrinting
(
vlc_object_t
*
,
const
char
*
psz_object
);
#define msg_DisableObjectPrinting(a,b) msg_DisableObjectPrinting(VLC_OBJECT(a),b)
/**
/**
* @}
* @}
*/
*/
...
...
src/libvlc.c
View file @
f1c5ba55
...
@@ -661,30 +661,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
...
@@ -661,30 +661,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/*
/*
* Message queue options
* Message queue options
*/
*/
char
*
psz_verbose_objects
=
var_CreateGetNonEmptyString
(
p_libvlc
,
"verbose-objects"
);
if
(
psz_verbose_objects
)
{
char
*
psz_object
,
*
iter
=
psz_verbose_objects
;
while
(
(
psz_object
=
strsep
(
&
iter
,
","
))
)
{
switch
(
psz_object
[
0
]
)
{
printf
(
"%s
\n
"
,
psz_object
+
1
);
case
'+'
:
msg_EnableObjectPrinting
(
p_libvlc
,
psz_object
+
1
);
break
;
case
'-'
:
msg_DisableObjectPrinting
(
p_libvlc
,
psz_object
+
1
);
break
;
default:
msg_Err
(
p_libvlc
,
"verbose-objects usage:
\n
"
"--verbose-objects=+printthatobject,"
"-dontprintthatone
\n
"
"(keyword 'all' to applies to all objects)"
);
free
(
psz_verbose_objects
);
/* FIXME: leaks!!!! */
return
VLC_EGENERIC
;
}
}
free
(
psz_verbose_objects
);
}
/* Last chance to set the verbosity. Once we start interfaces and other
/* Last chance to set the verbosity. Once we start interfaces and other
* threads, verbosity becomes read-only. */
* threads, verbosity becomes read-only. */
var_Create
(
p_libvlc
,
"verbose"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_libvlc
,
"verbose"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
...
...
src/libvlccore.sym
View file @
f1c5ba55
...
@@ -275,8 +275,6 @@ module_provides
...
@@ -275,8 +275,6 @@ module_provides
module_unneed
module_unneed
vlc_module_load
vlc_module_load
vlc_module_unload
vlc_module_unload
msg_DisableObjectPrinting
msg_EnableObjectPrinting
msg_Generic
msg_Generic
msg_GenericVa
msg_GenericVa
msg_Subscribe
msg_Subscribe
...
...
src/misc/messages.c
View file @
f1c5ba55
...
@@ -72,9 +72,6 @@ struct msg_bank_t
...
@@ -72,9 +72,6 @@ struct msg_bank_t
/* Subscribers */
/* Subscribers */
int
i_sub
;
int
i_sub
;
msg_subscription_t
**
pp_sub
;
msg_subscription_t
**
pp_sub
;
vlc_dictionary_t
enabled_objects
;
///< Enabled objects
bool
all_objects_enabled
;
///< Should we print all objects?
};
};
/**
/**
...
@@ -86,50 +83,11 @@ msg_bank_t *msg_Create (void)
...
@@ -86,50 +83,11 @@ msg_bank_t *msg_Create (void)
msg_bank_t
*
bank
=
malloc
(
sizeof
(
*
bank
));
msg_bank_t
*
bank
=
malloc
(
sizeof
(
*
bank
));
vlc_rwlock_init
(
&
bank
->
lock
);
vlc_rwlock_init
(
&
bank
->
lock
);
vlc_dictionary_init
(
&
bank
->
enabled_objects
,
0
);
bank
->
all_objects_enabled
=
true
;
bank
->
i_sub
=
0
;
bank
->
i_sub
=
0
;
bank
->
pp_sub
=
NULL
;
bank
->
pp_sub
=
NULL
;
return
bank
;
return
bank
;
}
}
/**
* Object Printing selection
*/
static
void
const
*
kObjectPrintingEnabled
=
&
kObjectPrintingEnabled
;
static
void
const
*
kObjectPrintingDisabled
=
&
kObjectPrintingDisabled
;
#undef msg_EnableObjectPrinting
void
msg_EnableObjectPrinting
(
vlc_object_t
*
obj
,
const
char
*
psz_object
)
{
msg_bank_t
*
bank
=
libvlc_bank
(
obj
->
p_libvlc
);
vlc_rwlock_wrlock
(
&
bank
->
lock
);
if
(
!
strcmp
(
psz_object
,
"all"
)
)
bank
->
all_objects_enabled
=
true
;
else
vlc_dictionary_insert
(
&
bank
->
enabled_objects
,
psz_object
,
(
void
*
)
kObjectPrintingEnabled
);
vlc_rwlock_unlock
(
&
bank
->
lock
);
}
#undef msg_DisableObjectPrinting
void
msg_DisableObjectPrinting
(
vlc_object_t
*
obj
,
const
char
*
psz_object
)
{
msg_bank_t
*
bank
=
libvlc_bank
(
obj
->
p_libvlc
);
vlc_rwlock_wrlock
(
&
bank
->
lock
);
if
(
!
strcmp
(
psz_object
,
"all"
)
)
bank
->
all_objects_enabled
=
false
;
else
vlc_dictionary_insert
(
&
bank
->
enabled_objects
,
psz_object
,
(
void
*
)
kObjectPrintingDisabled
);
vlc_rwlock_unlock
(
&
bank
->
lock
);
}
/**
/**
* Destroy the message queues
* Destroy the message queues
*
*
...
@@ -142,8 +100,6 @@ void msg_Destroy (msg_bank_t *bank)
...
@@ -142,8 +100,6 @@ void msg_Destroy (msg_bank_t *bank)
if
(
unlikely
(
bank
->
i_sub
!=
0
))
if
(
unlikely
(
bank
->
i_sub
!=
0
))
fputs
(
"stale interface subscribers (LibVLC might crash)
\n
"
,
stderr
);
fputs
(
"stale interface subscribers (LibVLC might crash)
\n
"
,
stderr
);
vlc_dictionary_clear
(
&
bank
->
enabled_objects
,
NULL
,
NULL
);
vlc_rwlock_destroy
(
&
bank
->
lock
);
vlc_rwlock_destroy
(
&
bank
->
lock
);
free
(
bank
);
free
(
bank
);
}
}
...
@@ -325,19 +281,7 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type, const char *psz_module,
...
@@ -325,19 +281,7 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type, const char *psz_module,
for
(
int
i
=
0
;
i
<
bank
->
i_sub
;
i
++
)
for
(
int
i
=
0
;
i
<
bank
->
i_sub
;
i
++
)
{
{
msg_subscription_t
*
sub
=
bank
->
pp_sub
[
i
];
msg_subscription_t
*
sub
=
bank
->
pp_sub
[
i
];
libvlc_priv_t
*
priv
=
libvlc_priv
(
sub
->
instance
);
msg_bank_t
*
bank
=
priv
->
msg_bank
;
void
*
val
=
vlc_dictionary_value_for_key
(
&
bank
->
enabled_objects
,
msg
.
psz_module
);
if
(
val
==
kObjectPrintingDisabled
)
continue
;
if
(
val
!=
kObjectPrintingEnabled
)
/*if not allowed */
{
val
=
vlc_dictionary_value_for_key
(
&
bank
->
enabled_objects
,
msg
.
psz_object_type
);
if
(
val
==
kObjectPrintingDisabled
)
continue
;
if
(
val
==
kObjectPrintingEnabled
);
/* Allowed */
else
if
(
!
bank
->
all_objects_enabled
)
continue
;
}
sub
->
func
(
sub
->
opaque
,
&
msg
);
sub
->
func
(
sub
->
opaque
,
&
msg
);
}
}
vlc_rwlock_unlock
(
&
bank
->
lock
);
vlc_rwlock_unlock
(
&
bank
->
lock
);
...
@@ -368,26 +312,6 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
...
@@ -368,26 +312,6 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
if
(
priv
->
i_verbose
<
0
||
priv
->
i_verbose
<
(
type
-
VLC_MSG_ERR
))
if
(
priv
->
i_verbose
<
0
||
priv
->
i_verbose
<
(
type
-
VLC_MSG_ERR
))
return
;
return
;
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
,
p_item
->
psz_module
);
if
(
val
==
kObjectPrintingDisabled
)
return
;
if
(
val
==
kObjectPrintingEnabled
)
/* Allowed */
;
else
{
val
=
vlc_dictionary_value_for_key
(
&
bank
->
enabled_objects
,
objtype
);
if
(
val
==
kObjectPrintingDisabled
)
return
;
if
(
val
==
kObjectPrintingEnabled
)
/* Allowed */
;
else
if
(
!
bank
->
all_objects_enabled
)
return
;
}
/* Send the message to stderr */
/* Send the message to stderr */
FILE
*
stream
=
stderr
;
FILE
*
stream
=
stderr
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
...
@@ -397,8 +321,8 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
...
@@ -397,8 +321,8 @@ static void PrintMsg ( vlc_object_t *p_this, const msg_item_t *p_item )
(
void
*
)
p_item
->
i_object_id
);
(
void
*
)
p_item
->
i_object_id
);
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
,
msgtype
[
type
]);
p_item
->
psz_object_type
,
msgtype
[
type
]);
if
(
priv
->
b_color
)
if
(
priv
->
b_color
)
fputs
(
msgcolor
[
type
],
stream
);
fputs
(
msgcolor
[
type
],
stream
);
fputs
(
p_item
->
psz_msg
,
stream
);
fputs
(
p_item
->
psz_msg
,
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