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
7bdcd022
Commit
7bdcd022
authored
Feb 10, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc log: stop abusing internal i_verbosity
parent
d5f982b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
src/control/core.c
src/control/core.c
+1
-0
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+1
-0
src/control/log.c
src/control/log.c
+11
-14
No files found.
src/control/core.c
View file @
7bdcd022
...
@@ -136,6 +136,7 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv,
...
@@ -136,6 +136,7 @@ libvlc_instance_t * libvlc_new( int argc, const char *const *argv,
p_new
->
p_vlm
=
NULL
;
p_new
->
p_vlm
=
NULL
;
p_new
->
b_playlist_locked
=
0
;
p_new
->
b_playlist_locked
=
0
;
p_new
->
ref_count
=
1
;
p_new
->
ref_count
=
1
;
p_new
->
verbosity
=
1
;
p_new
->
p_callback_list
=
NULL
;
p_new
->
p_callback_list
=
NULL
;
vlc_mutex_init
(
&
p_new
->
instance_lock
);
vlc_mutex_init
(
&
p_new
->
instance_lock
);
vlc_mutex_init
(
&
p_new
->
event_callback_lock
);
vlc_mutex_init
(
&
p_new
->
event_callback_lock
);
...
...
src/control/libvlc_internal.h
View file @
7bdcd022
...
@@ -65,6 +65,7 @@ struct libvlc_instance_t
...
@@ -65,6 +65,7 @@ struct libvlc_instance_t
vlm_t
*
p_vlm
;
vlm_t
*
p_vlm
;
int
b_playlist_locked
;
int
b_playlist_locked
;
unsigned
ref_count
;
unsigned
ref_count
;
int
verbosity
;
vlc_mutex_t
instance_lock
;
vlc_mutex_t
instance_lock
;
vlc_mutex_t
event_callback_lock
;
vlc_mutex_t
event_callback_lock
;
struct
libvlc_callback_entry_list_t
*
p_callback_list
;
struct
libvlc_callback_entry_list_t
*
p_callback_list
;
...
...
src/control/log.c
View file @
7bdcd022
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
*****************************************************************************/
*****************************************************************************/
#include "libvlc_internal.h"
#include "libvlc_internal.h"
#include "../libvlc.h"
#include <vlc/libvlc.h>
#include <vlc/libvlc.h>
#include <assert.h>
#include <assert.h>
...
@@ -42,10 +41,14 @@ struct msg_cb_data_t
...
@@ -42,10 +41,14 @@ struct msg_cb_data_t
vlc_spinlock_t
lock
;
vlc_spinlock_t
lock
;
msg_item_t
*
items
[
VLC_MSG_QSIZE
];
msg_item_t
*
items
[
VLC_MSG_QSIZE
];
unsigned
count
;
unsigned
count
;
int
verbosity
;
};
};
static
void
handler
(
msg_cb_data_t
*
d
,
msg_item_t
*
p_item
,
unsigned
i_drop
)
static
void
handler
(
msg_cb_data_t
*
d
,
msg_item_t
*
p_item
,
unsigned
i_drop
)
{
{
if
(
p_item
->
i_type
>
d
->
verbosity
)
return
;
vlc_spin_lock
(
&
d
->
lock
);
vlc_spin_lock
(
&
d
->
lock
);
if
(
d
->
count
<
VLC_MSG_QSIZE
)
if
(
d
->
count
<
VLC_MSG_QSIZE
)
{
{
...
@@ -72,23 +75,16 @@ struct libvlc_log_iterator_t
...
@@ -72,23 +75,16 @@ struct libvlc_log_iterator_t
unsigned
libvlc_get_log_verbosity
(
const
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
unsigned
libvlc_get_log_verbosity
(
const
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_instance
)
assert
(
p_instance
);
{
(
void
)
p_e
;
libvlc_priv_t
*
p_priv
=
libvlc_priv
(
p_instance
->
p_libvlc_int
);
return
p_instance
->
verbosity
;
return
p_priv
->
i_verbose
;
}
RAISEZERO
(
"Invalid VLC instance!"
);
}
}
void
libvlc_set_log_verbosity
(
libvlc_instance_t
*
p_instance
,
unsigned
level
,
libvlc_exception_t
*
p_e
)
void
libvlc_set_log_verbosity
(
libvlc_instance_t
*
p_instance
,
unsigned
level
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_instance
)
assert
(
p_instance
);
{
(
void
)
p_e
;
libvlc_priv_t
*
p_priv
=
libvlc_priv
(
p_instance
->
p_libvlc_int
);
p_instance
->
verbosity
=
level
;
p_priv
->
i_verbose
=
level
;
}
else
RAISEVOID
(
"Invalid VLC instance!"
);
}
}
libvlc_log_t
*
libvlc_log_open
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
libvlc_log_t
*
libvlc_log_open
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
...
@@ -99,6 +95,7 @@ libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance, libvlc_exception_t
...
@@ -99,6 +95,7 @@ libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance, libvlc_exception_t
if
(
!
p_log
)
RAISENULL
(
"Out of memory"
);
if
(
!
p_log
)
RAISENULL
(
"Out of memory"
);
p_log
->
p_instance
=
p_instance
;
p_log
->
p_instance
=
p_instance
;
p_log
->
data
.
verbosity
=
p_instance
->
verbosity
;
p_log
->
p_messages
=
msg_Subscribe
(
p_instance
->
p_libvlc_int
,
handler
,
&
p_log
->
data
);
p_log
->
p_messages
=
msg_Subscribe
(
p_instance
->
p_libvlc_int
,
handler
,
&
p_log
->
data
);
if
(
!
p_log
->
p_messages
)
if
(
!
p_log
->
p_messages
)
...
...
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