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
07b05122
Commit
07b05122
authored
May 30, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a subpicture_NewFromPicture helper.
parent
6d0ff11d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
0 deletions
+61
-0
include/vlc_subpicture.h
include/vlc_subpicture.h
+9
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+51
-0
No files found.
include/vlc_subpicture.h
View file @
07b05122
...
...
@@ -176,6 +176,15 @@ VLC_EXPORT( subpicture_t *, subpicture_New, ( void ) );
*/
VLC_EXPORT
(
void
,
subpicture_Delete
,
(
subpicture_t
*
p_subpic
)
);
/**
* This function will create a subpicture having one region in the requested
* chroma showing the given picture.
*
* The picture_t given is not released nor used inside the
* returned subpicture_t.
*/
VLC_EXPORT
(
subpicture_t
*
,
subpicture_NewFromPicture
,
(
vlc_object_t
*
,
picture_t
*
,
vlc_fourcc_t
i_chroma
)
);
/**@}*/
#endif
/* _VLC_VIDEO_H */
src/libvlccore.sym
View file @
07b05122
...
...
@@ -371,6 +371,7 @@ __str_format_meta
str_format_time
subpicture_Delete
subpicture_New
subpicture_NewFromPicture
subpicture_region_ChainDelete
subpicture_region_Delete
subpicture_region_New
...
...
src/video_output/vout_subpictures.c
View file @
07b05122
...
...
@@ -37,6 +37,7 @@
#include <vlc_osd.h>
#include "../libvlc.h"
#include "vout_internal.h"
#include <vlc_image.h>
#include <assert.h>
#include <limits.h>
...
...
@@ -719,6 +720,56 @@ static void SubpictureChain( subpicture_t **pp_head, subpicture_t *p_subpic )
*
pp_head
=
p_subpic
;
}
subpicture_t
*
subpicture_NewFromPicture
(
vlc_object_t
*
p_obj
,
picture_t
*
p_picture
,
vlc_fourcc_t
i_chroma
)
{
/* */
video_format_t
fmt_in
=
p_picture
->
format
;
/* */
video_format_t
fmt_out
;
fmt_out
=
fmt_in
;
fmt_out
.
i_chroma
=
i_chroma
;
/* */
image_handler_t
*
p_image
=
image_HandlerCreate
(
p_obj
);
if
(
!
p_image
)
return
NULL
;
picture_t
*
p_pip
=
image_Convert
(
p_image
,
p_picture
,
&
fmt_in
,
&
fmt_out
);
image_HandlerDelete
(
p_image
);
if
(
!
p_pip
)
return
NULL
;
subpicture_t
*
p_subpic
=
subpicture_New
();
if
(
!
p_subpic
)
{
picture_Release
(
p_pip
);
return
NULL
;
}
p_subpic
->
i_original_picture_width
=
fmt_out
.
i_width
;
p_subpic
->
i_original_picture_height
=
fmt_out
.
i_height
;
fmt_out
.
i_aspect
=
0
;
fmt_out
.
i_sar_num
=
fmt_out
.
i_sar_den
=
0
;
p_subpic
->
p_region
=
subpicture_region_New
(
&
fmt_out
);
if
(
p_subpic
->
p_region
)
{
picture_Release
(
p_subpic
->
p_region
->
p_picture
);
p_subpic
->
p_region
->
p_picture
=
p_pip
;
}
else
{
picture_Release
(
p_pip
);
}
return
p_subpic
;
}
/*****************************************************************************
* subpicture_region_t allocation
*****************************************************************************/
...
...
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