Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
364f9dc2
Commit
364f9dc2
authored
Jun 25, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allowed to give the list of prefered chroma to "text renderer".
parent
717110af
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
23 deletions
+39
-23
include/vlc_filter.h
include/vlc_filter.h
+4
-2
modules/gui/fbosd.c
modules/gui/fbosd.c
+1
-1
modules/misc/dummy/renderer.c
modules/misc/dummy/renderer.c
+8
-8
modules/misc/text_renderer/freetype.c
modules/misc/text_renderer/freetype.c
+6
-2
modules/misc/text_renderer/quartztext.c
modules/misc/text_renderer/quartztext.c
+8
-4
modules/misc/text_renderer/svg.c
modules/misc/text_renderer/svg.c
+4
-2
modules/misc/text_renderer/win32text.c
modules/misc/text_renderer/win32text.c
+4
-2
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+4
-2
No files found.
include/vlc_filter.h
View file @
364f9dc2
...
@@ -125,9 +125,11 @@ struct filter_t
...
@@ -125,9 +125,11 @@ struct filter_t
struct
struct
{
{
int
(
*
pf_text
)
(
filter_t
*
,
subpicture_region_t
*
,
int
(
*
pf_text
)
(
filter_t
*
,
subpicture_region_t
*
,
subpicture_region_t
*
);
subpicture_region_t
*
,
const
vlc_fourcc_t
*
);
int
(
*
pf_html
)
(
filter_t
*
,
subpicture_region_t
*
,
int
(
*
pf_html
)
(
filter_t
*
,
subpicture_region_t
*
,
subpicture_region_t
*
);
subpicture_region_t
*
,
const
vlc_fourcc_t
*
);
}
render
;
}
render
;
#define pf_render_text u.render.pf_text
#define pf_render_text u.render.pf_text
#define pf_render_html u.render.pf_html
#define pf_render_html u.render.pf_html
...
...
modules/gui/fbosd.c
View file @
364f9dc2
...
@@ -869,7 +869,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
...
@@ -869,7 +869,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
memset
(
&
fmt_out
,
0
,
sizeof
(
video_format_t
)
);
memset
(
&
fmt_out
,
0
,
sizeof
(
video_format_t
)
);
p_sys
->
p_text
->
pf_render_text
(
p_sys
->
p_text
,
p_sys
->
p_text
->
pf_render_text
(
p_sys
->
p_text
,
p_region
,
p_region
);
p_region
,
p_region
,
NULL
);
#if defined(FBOSD_BLENDING)
#if defined(FBOSD_BLENDING)
fmt_out
=
p_region
->
fmt
;
fmt_out
=
p_region
->
fmt
;
...
...
modules/misc/dummy/renderer.c
View file @
364f9dc2
...
@@ -31,8 +31,14 @@
...
@@ -31,8 +31,14 @@
#include "dummy.h"
#include "dummy.h"
static
int
RenderText
(
filter_t
*
,
subpicture_region_t
*
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
);
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
p_chroma_list
)
{
VLC_UNUSED
(
p_filter
);
VLC_UNUSED
(
p_region_out
);
VLC_UNUSED
(
p_region_in
);
VLC_UNUSED
(
p_chroma_list
);
return
VLC_EGENERIC
;
}
int
OpenRenderer
(
vlc_object_t
*
p_this
)
int
OpenRenderer
(
vlc_object_t
*
p_this
)
{
{
...
@@ -42,9 +48,3 @@ int OpenRenderer( vlc_object_t *p_this )
...
@@ -42,9 +48,3 @@ int OpenRenderer( vlc_object_t *p_this )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
{
VLC_UNUSED
(
p_filter
);
VLC_UNUSED
(
p_region_out
);
VLC_UNUSED
(
p_region_in
);
return
VLC_EGENERIC
;
}
modules/misc/text_renderer/freetype.c
View file @
364f9dc2
...
@@ -2333,16 +2333,20 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -2333,16 +2333,20 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
}
}
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
video_format_t
*
p_chroma_list
)
{
{
VLC_UNUSED
(
p_chroma_list
);
return
RenderCommon
(
p_filter
,
p_region_out
,
p_region_in
,
false
);
return
RenderCommon
(
p_filter
,
p_region_out
,
p_region_in
,
false
);
}
}
#ifdef HAVE_STYLES
#ifdef HAVE_STYLES
static
int
RenderHtml
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderHtml
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
video_format_t
*
p_chroma_list
)
{
{
VLC_UNUSED
(
p_chroma_list
);
return
RenderCommon
(
p_filter
,
p_region_out
,
p_region_in
,
true
);
return
RenderCommon
(
p_filter
,
p_region_out
,
p_region_in
,
true
);
}
}
...
...
modules/misc/text_renderer/quartztext.c
View file @
364f9dc2
...
@@ -66,9 +66,11 @@ static void Destroy( vlc_object_t * );
...
@@ -66,9 +66,11 @@ static void Destroy( vlc_object_t * );
static
int
LoadFontsFromAttachments
(
filter_t
*
p_filter
);
static
int
LoadFontsFromAttachments
(
filter_t
*
p_filter
);
static
int
RenderText
(
filter_t
*
,
subpicture_region_t
*
,
static
int
RenderText
(
filter_t
*
,
subpicture_region_t
*
,
subpicture_region_t
*
);
subpicture_region_t
*
,
const
vlc_fourcc_t
*
);
static
int
RenderHtml
(
filter_t
*
,
subpicture_region_t
*
,
static
int
RenderHtml
(
filter_t
*
,
subpicture_region_t
*
,
subpicture_region_t
*
);
subpicture_region_t
*
,
const
vlc_fourcc_t
*
);
static
int
GetFontSize
(
filter_t
*
p_filter
);
static
int
GetFontSize
(
filter_t
*
p_filter
);
static
int
RenderYUVA
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region
,
static
int
RenderYUVA
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region
,
...
@@ -308,7 +310,8 @@ static char *EliminateCRLF( char *psz_string )
...
@@ -308,7 +310,8 @@ static char *EliminateCRLF( char *psz_string )
// Renders a text subpicture region into another one.
// Renders a text subpicture region into another one.
// It is used as pf_add_string callback in the vout method by this module
// It is used as pf_add_string callback in the vout method by this module
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
p_chroma_list
)
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
char
*
psz_string
;
char
*
psz_string
;
...
@@ -768,7 +771,8 @@ static int ProcessNodes( filter_t *p_filter,
...
@@ -768,7 +771,8 @@ static int ProcessNodes( filter_t *p_filter,
}
}
static
int
RenderHtml
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderHtml
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
p_chroma_list
)
{
{
int
rv
=
VLC_SUCCESS
;
int
rv
=
VLC_SUCCESS
;
stream_t
*
p_sub
=
NULL
;
stream_t
*
p_sub
=
NULL
;
...
...
modules/misc/text_renderer/svg.c
View file @
364f9dc2
...
@@ -55,7 +55,8 @@ typedef struct svg_rendition_t svg_rendition_t;
...
@@ -55,7 +55,8 @@ typedef struct svg_rendition_t svg_rendition_t;
static
int
Create
(
vlc_object_t
*
);
static
int
Create
(
vlc_object_t
*
);
static
void
Destroy
(
vlc_object_t
*
);
static
void
Destroy
(
vlc_object_t
*
);
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
);
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
);
static
char
*
svg_GetTemplate
(
vlc_object_t
*
p_this
);
static
char
*
svg_GetTemplate
(
vlc_object_t
*
p_this
);
/*****************************************************************************
/*****************************************************************************
...
@@ -428,7 +429,8 @@ static void svg_RenderPicture( filter_t *p_filter,
...
@@ -428,7 +429,8 @@ static void svg_RenderPicture( filter_t *p_filter,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
p_chroma_list
)
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
svg_rendition_t
*
p_svg
=
NULL
;
svg_rendition_t
*
p_svg
=
NULL
;
...
...
modules/misc/text_renderer/win32text.c
View file @
364f9dc2
...
@@ -47,7 +47,8 @@ static void Destroy( vlc_object_t * );
...
@@ -47,7 +47,8 @@ static void Destroy( vlc_object_t * );
/* The RenderText call maps to pf_render_string, defined in vlc_filter.h */
/* The RenderText call maps to pf_render_string, defined in vlc_filter.h */
static
int
RenderText
(
filter_t
*
,
subpicture_region_t
*
,
static
int
RenderText
(
filter_t
*
,
subpicture_region_t
*
,
subpicture_region_t
*
);
subpicture_region_t
*
,
const
vlc_fourcc_t
*
);
static
int
Render
(
filter_t
*
,
subpicture_region_t
*
,
uint8_t
*
,
int
,
int
);
static
int
Render
(
filter_t
*
,
subpicture_region_t
*
,
uint8_t
*
,
int
,
int
);
static
int
SetFont
(
filter_t
*
,
int
);
static
int
SetFont
(
filter_t
*
,
int
);
...
@@ -296,7 +297,8 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
...
@@ -296,7 +297,8 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
}
}
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
static
int
RenderText
(
filter_t
*
p_filter
,
subpicture_region_t
*
p_region_out
,
subpicture_region_t
*
p_region_in
)
subpicture_region_t
*
p_region_in
,
const
vlc_fourcc_t
*
p_chroma_list
)
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
int
i_font_color
,
i_font_alpha
,
i_font_size
;
int
i_font_color
,
i_font_alpha
,
i_font_size
;
...
...
src/video_output/vout_subpictures.c
View file @
364f9dc2
...
@@ -257,6 +257,7 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
...
@@ -257,6 +257,7 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
static
void
SpuRenderText
(
spu_t
*
spu
,
bool
*
rerender_text
,
static
void
SpuRenderText
(
spu_t
*
spu
,
bool
*
rerender_text
,
subpicture_region_t
*
region
,
subpicture_region_t
*
region
,
const
vlc_fourcc_t
*
chroma_list
,
mtime_t
elapsed_time
)
mtime_t
elapsed_time
)
{
{
filter_t
*
text
=
spu
->
p
->
text
;
filter_t
*
text
=
spu
->
p
->
text
;
...
@@ -289,9 +290,9 @@ static void SpuRenderText(spu_t *spu, bool *rerender_text,
...
@@ -289,9 +290,9 @@ static void SpuRenderText(spu_t *spu, bool *rerender_text,
var_SetBool
(
text
,
"text-rerender"
,
false
);
var_SetBool
(
text
,
"text-rerender"
,
false
);
if
(
text
->
pf_render_html
&&
region
->
psz_html
)
if
(
text
->
pf_render_html
&&
region
->
psz_html
)
text
->
pf_render_html
(
text
,
region
,
region
);
text
->
pf_render_html
(
text
,
region
,
region
,
chroma_list
);
else
if
(
text
->
pf_render_text
)
else
if
(
text
->
pf_render_text
)
text
->
pf_render_text
(
text
,
region
,
region
);
text
->
pf_render_text
(
text
,
region
,
region
,
chroma_list
);
*
rerender_text
=
var_GetBool
(
text
,
"text-rerender"
);
*
rerender_text
=
var_GetBool
(
text
,
"text-rerender"
);
}
}
...
@@ -691,6 +692,7 @@ static void SpuRenderRegion(spu_t *spu,
...
@@ -691,6 +692,7 @@ static void SpuRenderRegion(spu_t *spu,
/* Render text region */
/* Render text region */
if
(
region
->
fmt
.
i_chroma
==
VLC_CODEC_TEXT
)
{
if
(
region
->
fmt
.
i_chroma
==
VLC_CODEC_TEXT
)
{
SpuRenderText
(
spu
,
&
restore_text
,
region
,
SpuRenderText
(
spu
,
&
restore_text
,
region
,
chroma_list
,
render_date
-
subpic
->
i_start
);
render_date
-
subpic
->
i_start
);
/* Check if the rendering has failed ... */
/* Check if the rendering has failed ... */
...
...
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