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
bfe3ffd1
Commit
bfe3ffd1
authored
Nov 03, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture_pool: add enumeration helper
parent
6a493b11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
include/vlc_picture_pool.h
include/vlc_picture_pool.h
+13
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/picture_pool.c
src/misc/picture_pool.c
+9
-0
No files found.
include/vlc_picture_pool.h
View file @
bfe3ffd1
...
@@ -95,6 +95,19 @@ VLC_API void picture_pool_Release( picture_pool_t * );
...
@@ -95,6 +95,19 @@ VLC_API void picture_pool_Release( picture_pool_t * );
*/
*/
VLC_API
picture_t
*
picture_pool_Get
(
picture_pool_t
*
)
VLC_USED
;
VLC_API
picture_t
*
picture_pool_Get
(
picture_pool_t
*
)
VLC_USED
;
/**
* Enumerates all pictures in a pool, both free and allocated.
*
* @param cb callback to invoke once for each picture
* @param data opaque data parameter for the callback (first argument)
*
* @note Allocated pictures may be accessed asynchronously by other threads.
* Therefore, only read-only picture parameters can be read by the callback,
* typically picture_t.p_sys.
*/
VLC_API
void
picture_pool_Enum
(
picture_pool_t
*
,
void
(
*
cb
)(
void
*
,
picture_t
*
),
void
*
data
);
/**
/**
* Forcefully return all pictures in the pool to free/unallocated state.
* Forcefully return all pictures in the pool to free/unallocated state.
*
*
...
...
src/libvlccore.sym
View file @
bfe3ffd1
...
@@ -303,6 +303,7 @@ picture_NewFromResource
...
@@ -303,6 +303,7 @@ picture_NewFromResource
picture_pool_Release
picture_pool_Release
picture_pool_Get
picture_pool_Get
picture_pool_GetSize
picture_pool_GetSize
picture_pool_Enum
picture_pool_New
picture_pool_New
picture_pool_NewExtended
picture_pool_NewExtended
picture_pool_NewFromFormat
picture_pool_NewFromFormat
...
...
src/misc/picture_pool.c
View file @
bfe3ffd1
...
@@ -334,3 +334,12 @@ bool picture_pool_NeedsLocking(const picture_pool_t *pool)
...
@@ -334,3 +334,12 @@ bool picture_pool_NeedsLocking(const picture_pool_t *pool)
{
{
return
pool
->
pic_lock
!=
NULL
||
pool
->
pic_unlock
!=
NULL
;
return
pool
->
pic_lock
!=
NULL
||
pool
->
pic_unlock
!=
NULL
;
}
}
void
picture_pool_Enum
(
picture_pool_t
*
pool
,
void
(
*
cb
)(
void
*
,
picture_t
*
),
void
*
opaque
)
{
/* NOTE: So far, the pictures table cannot change after the pool is created
* so there is no need to lock the pool mutex here. */
for
(
unsigned
i
=
0
;
i
<
pool
->
picture_count
;
i
++
)
cb
(
opaque
,
pool
->
picture
[
i
]);
}
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