Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
50f8da04
Commit
50f8da04
authored
Nov 29, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added hooks for the fothcoming YUV overlay support.
parent
266e3eab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
include/video_output.h
include/video_output.h
+3
-0
src/video_output/video_output.c
src/video_output/video_output.c
+21
-13
No files found.
include/video_output.h
View file @
50f8da04
...
...
@@ -144,6 +144,8 @@ typedef struct vout_thread_s
int
i_screen_depth
;
/* significant bpp: 8, 15, 16 or 24 */
int
i_bytes_per_pixel
;
/* real screen depth: 1, 2, 3 or 4 */
float
f_gamma
;
/* gamma */
boolean_t
b_need_render
;
/* does the output method need a YUV
* conversion ? */
/* Color masks and shifts in RGB mode - masks are set by system
* initialization, shifts are calculated. A pixel color value can be
...
...
@@ -202,6 +204,7 @@ typedef struct vout_thread_s
subpicture_t
p_subpicture
[
VOUT_MAX_PICTURES
];
/* subpictures */
int
i_pictures
;
/* current heap size */
vout_yuv_t
yuv
;
/* translation tables */
picture_t
*
p_rendered_pic
;
/* picture currently being rendered */
/* Bitmap fonts */
p_vout_font_t
p_default_font
;
/* default font */
...
...
src/video_output/video_output.c
View file @
50f8da04
...
...
@@ -158,6 +158,7 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window,
p_vout
->
i_screen_depth
=
15
;
p_vout
->
i_bytes_per_pixel
=
2
;
p_vout
->
f_gamma
=
VOUT_GAMMA
;
p_vout
->
b_need_render
=
1
;
p_vout
->
b_grayscale
=
main_GetIntVariable
(
VOUT_GRAYSCALE_VAR
,
VOUT_GRAYSCALE_DEFAULT
);
...
...
@@ -923,11 +924,14 @@ static int InitThread( vout_thread_t *p_vout )
return
(
1
);
}
/* Initialize convertion tables and functions */
if
(
vout_InitYUV
(
p_vout
)
)
if
(
p_vout
->
b_need_render
)
{
intf_ErrMsg
(
"error: can't allocate YUV translation tables
\n
"
);
return
(
1
);
/* Initialize convertion tables and functions */
if
(
vout_InitYUV
(
p_vout
)
)
{
intf_ErrMsg
(
"error: can't allocate YUV translation tables
\n
"
);
return
(
1
);
}
}
/* Mark thread as running and return */
...
...
@@ -1025,7 +1029,7 @@ static void RunThread( vout_thread_t *p_vout)
"warning: late picture skipped (%p)
\n
"
,
p_pic
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
continue
;
continue
;
}
else
if
(
display_date
>
current_date
+
VOUT_DISPLAY_DELAY
)
{
...
...
@@ -1060,8 +1064,11 @@ static void RunThread( vout_thread_t *p_vout)
{
b_display
=
p_vout
->
b_active
;
p_vout
->
last_display_date
=
display_date
;
p_vout
->
p_rendered_pic
=
p_pic
;
if
(
b_display
)
/* FIXME: if b_need_render == 0 we need to do something with
* the subpictures one day. */
if
(
p_vout
->
b_need_render
&&
b_display
)
{
/* Set picture dimensions and clear buffer */
SetBufferPicture
(
p_vout
,
p_pic
);
...
...
@@ -1080,14 +1087,17 @@ static void RunThread( vout_thread_t *p_vout)
}
/* Render interface and subpicture */
if
(
b_display
&&
p_vout
->
b_interface
)
if
(
b_display
&&
p_vout
->
b_interface
&&
p_vout
->
b_need_render
)
{
RenderInterface
(
p_vout
);
}
}
else
if
(
p_vout
->
b_active
&&
p_vout
->
init_display_date
==
0
)
/* idle or interface screen alone */
else
if
(
p_vout
->
b_active
&&
p_vout
->
b_need_render
&&
p_vout
->
init_display_date
==
0
)
{
/* Idle or interface screen alone */
if
(
p_vout
->
b_interface
&&
0
/* && XXX?? intf_change */
)
{
/* Interface has changed, so a new rendering is required - force
...
...
@@ -1115,10 +1125,10 @@ static void RunThread( vout_thread_t *p_vout)
/*
*
chech
for the current time and
*
Check
for the current time and
* display splash screen if everything is on time
*/
if
(
p_vout
->
init_display_date
>
0
)
if
(
p_vout
->
init_display_date
>
0
&&
p_vout
->
b_need_render
)
{
if
(
p_vout
->
b_active
&&
mdate
()
-
p_vout
->
init_display_date
<
5000000
)
...
...
@@ -1135,15 +1145,13 @@ static void RunThread( vout_thread_t *p_vout)
}
/*
* Sleep, wake up and display rendered picture
*/
if
(
display_date
!=
0
)
{
/* Store render time */
/* Store render time
using Bresenham algorithm
*/
p_vout
->
render_time
+=
mdate
()
-
current_date
;
p_vout
->
render_time
>>=
1
;
}
...
...
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