Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
887af03f
Commit
887af03f
authored
Oct 20, 2020
by
Steve Lhomme
Browse files
picture_fifo: add picture_fifo_Peek
parent
d63659ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/vlc_picture_fifo.h
View file @
887af03f
...
...
@@ -56,6 +56,13 @@ VLC_API void picture_fifo_Delete( picture_fifo_t * );
*/
VLC_API
picture_t
*
picture_fifo_Pop
(
picture_fifo_t
*
)
VLC_USED
;
/**
* It peeks the front picture_t of the fifo.
*
* If the fifo is empty, it return NULL without waiting.
*/
VLC_API
picture_t
*
picture_fifo_Peek
(
picture_fifo_t
*
)
VLC_USED
;
/**
* It returns whether the fifo is empty or not.
*/
...
...
src/libvlccore.sym
View file @
887af03f
...
...
@@ -314,6 +314,7 @@ picture_fifo_Delete
picture_fifo_Flush
picture_fifo_New
picture_fifo_IsEmpty
picture_fifo_Peek
picture_fifo_Pop
picture_fifo_Push
picture_New
...
...
src/misc/picture_fifo.c
View file @
887af03f
...
...
@@ -67,6 +67,14 @@ picture_t *picture_fifo_Pop(picture_fifo_t *fifo)
return
picture
;
}
picture_t
*
picture_fifo_Peek
(
picture_fifo_t
*
fifo
)
{
vlc_mutex_lock
(
&
fifo
->
lock
);
picture_t
*
picture
=
vlc_picture_chain_PeekFront
(
&
fifo
->
pics
);
vlc_mutex_unlock
(
&
fifo
->
lock
);
return
picture
;
}
bool
picture_fifo_IsEmpty
(
picture_fifo_t
*
fifo
)
{
vlc_mutex_lock
(
&
fifo
->
lock
);
...
...
Write
Preview
Supports
Markdown
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