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
d9dd59cd
Commit
d9dd59cd
authored
Jun 24, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture: move picture_BlendSubpicture() to subpicture
parent
a7df1b8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
35 deletions
+35
-35
include/vlc_picture.h
include/vlc_picture.h
+0
-13
include/vlc_subpicture.h
include/vlc_subpicture.h
+12
-0
src/misc/picture.c
src/misc/picture.c
+0
-22
src/misc/subpicture.c
src/misc/subpicture.c
+23
-0
No files found.
include/vlc_picture.h
View file @
d9dd59cd
...
...
@@ -238,19 +238,6 @@ VLC_API int picture_Export( vlc_object_t *p_obj, block_t **pp_image, video_forma
VLC_API
int
picture_Setup
(
picture_t
*
,
const
video_format_t
*
);
/**
* This function will blend a given subpicture onto a picture.
*
* The subpicture and all its region must:
* - be absolute.
* - not be ephemere.
* - not have the fade flag.
* - contains only picture (no text rendering).
* \return the number of region(s) succesfully blent
*/
VLC_API
unsigned
picture_BlendSubpicture
(
picture_t
*
,
filter_t
*
p_blend
,
subpicture_t
*
);
/*****************************************************************************
* Shortcuts to access image components
*****************************************************************************/
...
...
include/vlc_subpicture.h
View file @
d9dd59cd
...
...
@@ -203,6 +203,18 @@ VLC_API subpicture_t * subpicture_NewFromPicture( vlc_object_t *, picture_t *, v
*/
VLC_API
void
subpicture_Update
(
subpicture_t
*
,
const
video_format_t
*
src
,
const
video_format_t
*
,
mtime_t
);
/**
* This function will blend a given subpicture onto a picture.
*
* The subpicture and all its region must:
* - be absolute.
* - not be ephemere.
* - not have the fade flag.
* - contains only picture (no text rendering).
* \return the number of region(s) succesfully blent
*/
VLC_API
unsigned
picture_BlendSubpicture
(
picture_t
*
,
filter_t
*
p_blend
,
subpicture_t
*
);
/**@}*/
#endif
/* _VLC_VIDEO_H */
src/misc/picture.c
View file @
d9dd59cd
...
...
@@ -448,25 +448,3 @@ int picture_Export( vlc_object_t *p_obj,
return
VLC_SUCCESS
;
}
unsigned
picture_BlendSubpicture
(
picture_t
*
dst
,
filter_t
*
blend
,
subpicture_t
*
src
)
{
unsigned
done
=
0
;
assert
(
src
&&
!
src
->
b_fade
&&
src
->
b_absolute
);
for
(
subpicture_region_t
*
r
=
src
->
p_region
;
r
!=
NULL
;
r
=
r
->
p_next
)
{
assert
(
r
->
p_picture
&&
r
->
i_align
==
0
);
if
(
filter_ConfigureBlend
(
blend
,
dst
->
format
.
i_width
,
dst
->
format
.
i_height
,
&
r
->
fmt
)
||
filter_Blend
(
blend
,
dst
,
r
->
i_x
,
r
->
i_y
,
r
->
p_picture
,
src
->
i_alpha
*
r
->
i_alpha
/
255
))
msg_Err
(
blend
,
"blending %4.4s to %4.4s failed"
,
(
char
*
)
&
blend
->
fmt_in
.
video
.
i_chroma
,
(
char
*
)
&
blend
->
fmt_out
.
video
.
i_chroma
);
else
done
++
;
}
return
done
;
}
src/misc/subpicture.c
View file @
d9dd59cd
...
...
@@ -272,3 +272,26 @@ void subpicture_region_ChainDelete( subpicture_region_t *p_head )
}
}
#include <vlc_filter.h>
unsigned
picture_BlendSubpicture
(
picture_t
*
dst
,
filter_t
*
blend
,
subpicture_t
*
src
)
{
unsigned
done
=
0
;
assert
(
src
&&
!
src
->
b_fade
&&
src
->
b_absolute
);
for
(
subpicture_region_t
*
r
=
src
->
p_region
;
r
!=
NULL
;
r
=
r
->
p_next
)
{
assert
(
r
->
p_picture
&&
r
->
i_align
==
0
);
if
(
filter_ConfigureBlend
(
blend
,
dst
->
format
.
i_width
,
dst
->
format
.
i_height
,
&
r
->
fmt
)
||
filter_Blend
(
blend
,
dst
,
r
->
i_x
,
r
->
i_y
,
r
->
p_picture
,
src
->
i_alpha
*
r
->
i_alpha
/
255
))
msg_Err
(
blend
,
"blending %4.4s to %4.4s failed"
,
(
char
*
)
&
blend
->
fmt_in
.
video
.
i_chroma
,
(
char
*
)
&
blend
->
fmt_out
.
video
.
i_chroma
);
else
done
++
;
}
return
done
;
}
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