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
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
Show 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
...
@@ -144,6 +144,8 @@ typedef struct vout_thread_s
int
i_screen_depth
;
/* significant bpp: 8, 15, 16 or 24 */
int
i_screen_depth
;
/* significant bpp: 8, 15, 16 or 24 */
int
i_bytes_per_pixel
;
/* real screen depth: 1, 2, 3 or 4 */
int
i_bytes_per_pixel
;
/* real screen depth: 1, 2, 3 or 4 */
float
f_gamma
;
/* gamma */
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
/* Color masks and shifts in RGB mode - masks are set by system
* initialization, shifts are calculated. A pixel color value can be
* initialization, shifts are calculated. A pixel color value can be
...
@@ -202,6 +204,7 @@ typedef struct vout_thread_s
...
@@ -202,6 +204,7 @@ typedef struct vout_thread_s
subpicture_t
p_subpicture
[
VOUT_MAX_PICTURES
];
/* subpictures */
subpicture_t
p_subpicture
[
VOUT_MAX_PICTURES
];
/* subpictures */
int
i_pictures
;
/* current heap size */
int
i_pictures
;
/* current heap size */
vout_yuv_t
yuv
;
/* translation tables */
vout_yuv_t
yuv
;
/* translation tables */
picture_t
*
p_rendered_pic
;
/* picture currently being rendered */
/* Bitmap fonts */
/* Bitmap fonts */
p_vout_font_t
p_default_font
;
/* default font */
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,
...
@@ -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_screen_depth
=
15
;
p_vout
->
i_bytes_per_pixel
=
2
;
p_vout
->
i_bytes_per_pixel
=
2
;
p_vout
->
f_gamma
=
VOUT_GAMMA
;
p_vout
->
f_gamma
=
VOUT_GAMMA
;
p_vout
->
b_need_render
=
1
;
p_vout
->
b_grayscale
=
main_GetIntVariable
(
VOUT_GRAYSCALE_VAR
,
p_vout
->
b_grayscale
=
main_GetIntVariable
(
VOUT_GRAYSCALE_VAR
,
VOUT_GRAYSCALE_DEFAULT
);
VOUT_GRAYSCALE_DEFAULT
);
...
@@ -923,12 +924,15 @@ static int InitThread( vout_thread_t *p_vout )
...
@@ -923,12 +924,15 @@ static int InitThread( vout_thread_t *p_vout )
return
(
1
);
return
(
1
);
}
}
if
(
p_vout
->
b_need_render
)
{
/* Initialize convertion tables and functions */
/* Initialize convertion tables and functions */
if
(
vout_InitYUV
(
p_vout
)
)
if
(
vout_InitYUV
(
p_vout
)
)
{
{
intf_ErrMsg
(
"error: can't allocate YUV translation tables
\n
"
);
intf_ErrMsg
(
"error: can't allocate YUV translation tables
\n
"
);
return
(
1
);
return
(
1
);
}
}
}
/* Mark thread as running and return */
/* Mark thread as running and return */
p_vout
->
b_active
=
1
;
p_vout
->
b_active
=
1
;
...
@@ -1060,8 +1064,11 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -1060,8 +1064,11 @@ static void RunThread( vout_thread_t *p_vout)
{
{
b_display
=
p_vout
->
b_active
;
b_display
=
p_vout
->
b_active
;
p_vout
->
last_display_date
=
display_date
;
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 */
/* Set picture dimensions and clear buffer */
SetBufferPicture
(
p_vout
,
p_pic
);
SetBufferPicture
(
p_vout
,
p_pic
);
...
@@ -1080,14 +1087,17 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -1080,14 +1087,17 @@ static void RunThread( vout_thread_t *p_vout)
}
}
/* Render interface and subpicture */
/* 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
);
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 */
)
if
(
p_vout
->
b_interface
&&
0
/* && XXX?? intf_change */
)
{
{
/* Interface has changed, so a new rendering is required - force
/* Interface has changed, so a new rendering is required - force
...
@@ -1115,10 +1125,10 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -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
* 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
&&
if
(
p_vout
->
b_active
&&
mdate
()
-
p_vout
->
init_display_date
<
5000000
)
mdate
()
-
p_vout
->
init_display_date
<
5000000
)
...
@@ -1135,15 +1145,13 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -1135,15 +1145,13 @@ static void RunThread( vout_thread_t *p_vout)
}
}
/*
/*
* Sleep, wake up and display rendered picture
* Sleep, wake up and display rendered picture
*/
*/
if
(
display_date
!=
0
)
if
(
display_date
!=
0
)
{
{
/* Store render time */
/* Store render time
using Bresenham algorithm
*/
p_vout
->
render_time
+=
mdate
()
-
current_date
;
p_vout
->
render_time
+=
mdate
()
-
current_date
;
p_vout
->
render_time
>>=
1
;
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