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
65579822
Commit
65579822
authored
Dec 18, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify a bit text re-rendering.
parent
a40c82c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
19 deletions
+5
-19
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+5
-19
No files found.
src/video_output/vout_subpictures.c
View file @
65579822
...
...
@@ -91,13 +91,6 @@ struct spu_private_t
mtime_t
i_last_sort_date
;
};
/* Subpicture rendered flag
* FIXME ? it could be moved to private ? */
#define SUBPICTURE_RENDERED (0x1000)
#if SUBPICTURE_RENDERED < SUBPICTURE_ALIGN_MASK
# error SUBPICTURE_RENDERED too low
#endif
/*****************************************************************************
* heap managment
*****************************************************************************/
...
...
@@ -305,7 +298,7 @@ static void SpuRenderText( spu_t *p_spu, bool *pb_rerender_text,
assert
(
p_region
->
fmt
.
i_chroma
==
VLC_CODEC_TEXT
);
if
(
!
p_text
||
!
p_text
->
p_module
)
goto
exit
;
return
;
/* Setup 3 variables which can be used to render
* time-dependent text (and effects). The first indicates
...
...
@@ -340,9 +333,6 @@ static void SpuRenderText( spu_t *p_spu, bool *pb_rerender_text,
p_text
->
pf_render_text
(
p_text
,
p_region
,
p_region
);
}
*
pb_rerender_text
=
var_GetBool
(
p_text
,
"text-rerender"
);
exit:
p_region
->
i_align
|=
SUBPICTURE_RENDERED
;
}
/**
...
...
@@ -772,8 +762,7 @@ static void SpuRenderRegion( spu_t *p_spu,
spu_private_t
*
p_sys
=
p_spu
->
p
;
video_format_t
fmt_original
=
p_region
->
fmt
;
bool
b_rerender_text
=
false
;
bool
b_restore_format
=
false
;
bool
b_restore_text
=
false
;
int
i_x_offset
;
int
i_y_offset
;
...
...
@@ -788,9 +777,8 @@ static void SpuRenderRegion( spu_t *p_spu,
if
(
p_region
->
fmt
.
i_chroma
==
VLC_CODEC_TEXT
)
{
const
int
i_min_scale_ratio
=
SCALE_UNIT
;
/* FIXME what is the right value? (scale_size is not) */
SpuRenderText
(
p_spu
,
&
b_re
render
_text
,
p_subpic
,
p_region
,
SpuRenderText
(
p_spu
,
&
b_re
store
_text
,
p_subpic
,
p_region
,
i_min_scale_ratio
,
render_date
);
b_restore_format
=
b_rerender_text
;
/* Check if the rendering has failed ... */
if
(
p_region
->
fmt
.
i_chroma
==
VLC_CODEC_TEXT
)
...
...
@@ -1057,7 +1045,7 @@ static void SpuRenderRegion( spu_t *p_spu,
}
exit:
if
(
b_re
render
_text
)
if
(
b_re
store
_text
)
{
/* Some forms of subtitles need to be re-rendered more than
* once, eg. karaoke. We therefore restore the region to its
...
...
@@ -1074,10 +1062,8 @@ exit:
subpicture_region_private_Delete
(
p_region
->
p_private
);
p_region
->
p_private
=
NULL
;
}
p_region
->
i_align
&=
~
SUBPICTURE_RENDERED
;
}
if
(
b_restore_format
)
p_region
->
fmt
=
fmt_original
;
}
}
/**
...
...
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