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
ab131d8b
Commit
ab131d8b
authored
Jul 19, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added filter_NewPicture/Subpicture/AudioBuffer helpers.
parent
c35618f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
11 deletions
+64
-11
include/vlc_filter.h
include/vlc_filter.h
+64
-11
No files found.
include/vlc_filter.h
View file @
ab131d8b
...
...
@@ -90,6 +90,66 @@ struct filter_t
filter_owner_sys_t
*
p_owner
;
};
/**
* This function will return a new picture usable by p_filter as an output
* buffer. You have to release it using filter_DeletePicture or by returning
* it to the caller as a pf_video_filter return value.
* Provided for convenience.
*/
static
inline
picture_t
*
filter_NewPicture
(
filter_t
*
p_filter
)
{
picture_t
*
p_picture
=
p_filter
->
pf_vout_buffer_new
(
p_filter
);
if
(
!
p_picture
)
msg_Warn
(
p_filter
,
"can't get output picture"
);
return
p_picture
;
}
/**
* This function will release a picture create by filter_NewPicture.
* Provided for convenience.
*/
static
inline
void
filter_DeletePicture
(
filter_t
*
p_filter
,
picture_t
*
p_picture
)
{
p_filter
->
pf_vout_buffer_del
(
p_filter
,
p_picture
);
}
/**
* This function will return a new subpicture usable by p_filter as an output
* buffer. You have to release it using filter_DeleteSubpicture or by returning
* it to the caller as a pf_sub_filter return value.
* Provided for convenience.
*/
static
inline
subpicture_t
*
filter_NewSubpicture
(
filter_t
*
p_filter
)
{
subpicture_t
*
p_subpicture
=
p_filter
->
pf_sub_buffer_new
(
p_filter
);
if
(
!
p_subpicture
)
msg_Warn
(
p_filter
,
"can't get output subpicture"
);
return
p_subpicture
;
}
/**
* This function will release a subpicture create by filter_NewSubicture.
* Provided for convenience.
*/
static
inline
void
filter_DeleteSubpicture
(
filter_t
*
p_filter
,
subpicture_t
*
p_subpicture
)
{
p_filter
->
pf_sub_buffer_del
(
p_filter
,
p_subpicture
);
}
/**
* This function will return a new audio buffer usable by p_filter as an
* output buffer. You have to release it using block_Release or by returning
* it to the caller as a pf_audio_filter return value.
* Provided for convenience.
*/
static
inline
block_t
*
filter_NewAudioBuffer
(
filter_t
*
p_filter
,
int
i_size
)
{
block_t
*
p_block
=
p_filter
->
pf_audio_buffer_new
(
p_filter
,
i_size
);
if
(
!
p_block
)
msg_Warn
(
p_filter
,
"can't get output block"
);
return
p_block
;
}
/**
* Create a picture_t *(*)( filter_t *, picture_t * ) compatible wrapper
...
...
@@ -101,25 +161,18 @@ struct filter_t
static picture_t *name ## _Filter ( filter_t *p_filter, \
picture_t *p_pic ) \
{ \
picture_t *p_outpic =
p_filter->pf_vout_buffer_new( p_filter );
\
picture_t *p_outpic =
filter_NewPicture( p_filter );
\
if( !p_outpic ) \
{ \
msg_Warn( p_filter, "can't get output picture" ); \
if( p_pic->pf_release ) \
p_pic->pf_release( p_pic ); \
picture_Release( p_pic ); \
return NULL; \
} \
\
name( p_filter, p_pic, p_outpic ); \
\
p_outpic->date = p_pic->date; \
p_outpic->b_force = p_pic->b_force; \
p_outpic->i_nb_fields = p_pic->i_nb_fields; \
p_outpic->b_progressive = p_pic->b_progressive; \
p_outpic->b_top_field_first = p_pic->b_top_field_first; \
picture_CopyProperties( p_outpic, p_pic ); \
picture_Release( p_pic ); \
\
if( p_pic->pf_release ) \
p_pic->pf_release( p_pic ); \
return p_outpic; \
}
...
...
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