Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
caa4d653
Commit
caa4d653
authored
May 18, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved a bit picture API.
parent
c14063ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
include/vlc_picture.h
include/vlc_picture.h
+18
-1
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+3
-1
No files found.
include/vlc_picture.h
View file @
caa4d653
...
...
@@ -51,6 +51,11 @@ typedef struct plane_t
}
plane_t
;
/**
* A private definition to help overloading picture release
*/
typedef
struct
picture_release_sys_t
picture_release_sys_t
;
/**
* Video picture
*
...
...
@@ -113,6 +118,7 @@ struct picture_t
/** This way the picture_Release can be overloaded */
void
(
*
pf_release
)(
picture_t
*
);
picture_release_sys_t
*
p_release_sys
;
/** Next picture in a FIFO a pictures */
struct
picture_t
*
p_next
;
...
...
@@ -122,7 +128,7 @@ struct picture_t
* This function will create a new picture.
* The picture created will implement a default release management compatible
* with picture_Hold and picture_Release. This default management will release
* p
icture_sys_t *p_sys field
if non NULL.
* p
_sys, p_q, p_data_orig fields
if non NULL.
*/
VLC_EXPORT
(
picture_t
*
,
picture_New
,
(
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_aspect
)
);
...
...
@@ -155,6 +161,17 @@ static inline void picture_Release( picture_t *p_picture )
p_picture
->
pf_release
(
p_picture
);
}
/**
* This function will return true if you are not the only owner of the
* picture.
*
* It is only valid if it is created using picture_New.
*/
static
inline
bool
picture_IsReferenced
(
picture_t
*
p_picture
)
{
return
p_picture
->
i_refcount
>
1
;
}
/**
* Cleanup quantization matrix data and set to 0
*/
...
...
src/video_output/vout_pictures.c
View file @
caa4d653
...
...
@@ -38,6 +38,7 @@
#include <vlc_filter.h>
#include <vlc_image.h>
#include <vlc_block.h>
#include <vlc_picture_pool.h>
#include "vout_pictures.h"
#include "vout_internal.h"
...
...
@@ -664,6 +665,7 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma, int i_width, int
}
p_picture
->
pf_release
=
NULL
;
p_picture
->
p_release_sys
=
NULL
;
p_picture
->
pf_lock
=
NULL
;
p_picture
->
pf_unlock
=
NULL
;
p_picture
->
i_refcount
=
0
;
...
...
@@ -925,6 +927,7 @@ picture_t *picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_
void
picture_Delete
(
picture_t
*
p_picture
)
{
assert
(
p_picture
&&
p_picture
->
i_refcount
==
0
);
assert
(
p_picture
->
p_release_sys
==
NULL
);
free
(
p_picture
->
p_q
);
free
(
p_picture
->
p_data_orig
);
...
...
@@ -1047,4 +1050,3 @@ int picture_Export( vlc_object_t *p_obj,
/*****************************************************************************
*
*****************************************************************************/
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