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
ae47c1c8
Commit
ae47c1c8
authored
Aug 09, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_log: remove dummy exceptions
parent
77806e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
51 deletions
+38
-51
src/control/log.c
src/control/log.c
+38
-51
No files found.
src/control/log.c
View file @
ae47c1c8
...
@@ -112,51 +112,46 @@ libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance, libvlc_exception_t
...
@@ -112,51 +112,46 @@ libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance, libvlc_exception_t
void
libvlc_log_close
(
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
void
libvlc_log_close
(
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_log
)
if
(
!
p_log
)
{
return
;
assert
(
p_log
->
p_messages
);
msg_Unsubscribe
(
p_log
->
p_messages
);
assert
(
p_log
->
p_messages
);
libvlc_release
(
p_log
->
p_instance
);
msg_Unsubscribe
(
p_log
->
p_messages
);
libvlc_log_clear
(
p_log
,
p_e
);
libvlc_release
(
p_log
->
p_instance
);
vlc_spin_destroy
(
&
p_log
->
data
.
lock
);
libvlc_log_clear
(
p_log
,
p_e
);
free
(
p_log
);
vlc_spin_destroy
(
&
p_log
->
data
.
lock
);
}
free
(
p_log
);
else
RAISEVOID
(
"Invalid log object!"
);
}
}
unsigned
libvlc_log_count
(
const
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
unsigned
libvlc_log_count
(
const
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_log
)
if
(
!
p_log
)
{
return
0
;
msg_cb_data_t
*
data
=
&
((
libvlc_log_t
*
)
p_log
)
->
data
;
unsigned
ret
;
msg_cb_data_t
*
data
=
&
((
libvlc_log_t
*
)
p_log
)
->
data
;
unsigned
ret
;
/* We cannot lock due to constant pointer constraints. Break them.
* Even then, this si not really thread safe anyway. */
/* We cannot lock due to constant pointer constraints. Break them.
vlc_spin_lock
(
&
data
->
lock
);
* Even then, this si not really thread safe anyway. */
ret
=
data
->
count
;
vlc_spin_lock
(
&
data
->
lock
);
vlc_spin_unlock
(
&
data
->
lock
);
ret
=
data
->
count
;
return
ret
;
vlc_spin_unlock
(
&
data
->
lock
);
}
return
ret
;
RAISEZERO
(
"Invalid log object!"
);
}
}
void
libvlc_log_clear
(
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
void
libvlc_log_clear
(
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_log
)
if
(
!
p_log
)
{
return
;
vlc_spin_lock
(
&
p_log
->
data
.
lock
);
msg_item_t
*
tab
[
p_log
->
data
.
count
];
vlc_spin_lock
(
&
p_log
->
data
.
lock
);
memcpy
(
tab
,
p_log
->
data
.
items
,
sizeof
(
tab
));
msg_item_t
*
tab
[
p_log
->
data
.
count
];
p_log
->
data
.
count
=
0
;
memcpy
(
tab
,
p_log
->
data
.
items
,
sizeof
(
tab
));
vlc_spin_unlock
(
&
p_log
->
data
.
lock
);
p_log
->
data
.
count
=
0
;
vlc_spin_unlock
(
&
p_log
->
data
.
lock
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
tab
)
/
sizeof
(
tab
[
0
]);
i
++
)
msg_Release
(
tab
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
tab
)
/
sizeof
(
tab
[
0
]);
i
++
)
}
msg_Release
(
tab
[
i
]);
else
RAISEVOID
(
"Invalid log object!"
);
}
}
libvlc_log_iterator_t
*
libvlc_log_get_iterator
(
const
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
libvlc_log_iterator_t
*
libvlc_log_get_iterator
(
const
libvlc_log_t
*
p_log
,
libvlc_exception_t
*
p_e
)
...
@@ -183,21 +178,14 @@ libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *p_log, libvl
...
@@ -183,21 +178,14 @@ libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *p_log, libvl
void
libvlc_log_iterator_free
(
libvlc_log_iterator_t
*
p_iter
,
libvlc_exception_t
*
p_e
)
void
libvlc_log_iterator_free
(
libvlc_log_iterator_t
*
p_iter
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_iter
)
free
(
p_iter
);
{
free
(
p_iter
);
}
else
RAISEVOID
(
"Invalid log iterator!"
);
}
}
int
libvlc_log_iterator_has_next
(
const
libvlc_log_iterator_t
*
p_iter
,
libvlc_exception_t
*
p_e
)
int
libvlc_log_iterator_has_next
(
const
libvlc_log_iterator_t
*
p_iter
,
libvlc_exception_t
*
p_e
)
{
{
if
(
p_iter
)
if
(
!
p_iter
)
{
return
0
;
return
p_iter
->
i_pos
!=
p_iter
->
i_end
;
return
p_iter
->
i_pos
!=
p_iter
->
i_end
;
}
RAISEZERO
(
"Invalid log iterator!"
);
}
}
libvlc_log_message_t
*
libvlc_log_iterator_next
(
libvlc_log_iterator_t
*
p_iter
,
libvlc_log_message_t
*
libvlc_log_iterator_next
(
libvlc_log_iterator_t
*
p_iter
,
...
@@ -207,9 +195,8 @@ libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
...
@@ -207,9 +195,8 @@ libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
unsigned
i_pos
;
unsigned
i_pos
;
if
(
!
p_iter
)
if
(
!
p_iter
)
RAISENULL
(
"Invalid log iterator!"
);
return
NULL
;
if
(
!
buffer
)
assert
(
buffer
);
RAISENULL
(
"Invalid message buffer!"
);
i_pos
=
p_iter
->
i_pos
;
i_pos
=
p_iter
->
i_pos
;
if
(
i_pos
!=
p_iter
->
i_end
)
if
(
i_pos
!=
p_iter
->
i_end
)
...
...
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