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
e6f5e48c
Commit
e6f5e48c
authored
Mar 04, 2005
by
Mark Moriarty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time/marq -- correct positioning so that x-y are always referenced to upper left corner
parent
f5da6786
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
25 deletions
+32
-25
modules/video_filter/marq.c
modules/video_filter/marq.c
+16
-11
modules/video_filter/time.c
modules/video_filter/time.c
+16
-14
No files found.
modules/video_filter/marq.c
View file @
e6f5e48c
...
...
@@ -69,7 +69,6 @@ struct filter_sys_t
int
i_font_color
,
i_font_opacity
,
i_font_size
;
/* font control */
time_t
last_time
;
vlc_bool_t
b_absolute
;
/* position control, relative vs. absolute */
vlc_bool_t
b_need_update
;
};
...
...
@@ -239,16 +238,9 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
return
NULL
;
}
p_sys
->
b_absolute
=
VLC_TRUE
;
if
(
p_sys
->
i_xoff
<
0
||
p_sys
->
i_yoff
<
0
)
{
p_sys
->
b_absolute
=
VLC_FALSE
;
}
p_spu
=
p_filter
->
pf_sub_buffer_new
(
p_filter
);
if
(
!
p_spu
)
return
NULL
;
p_spu
->
b_absolute
=
p_sys
->
b_absolute
;
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
fmt
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
fmt
.
i_aspect
=
0
;
...
...
@@ -268,13 +260,26 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_spu
->
i_start
=
date
;
p_spu
->
i_stop
=
p_sys
->
i_timeout
==
0
?
0
:
date
+
p_sys
->
i_timeout
*
1000
;
p_spu
->
b_ephemer
=
VLC_TRUE
;
/* where to locate the string: */
if
(
p_sys
->
i_xoff
<
0
||
p_sys
->
i_yoff
<
0
)
{
/* set to one of the 9 relative locations */
p_spu
->
i_flags
=
p_sys
->
i_pos
;
p_spu
->
i_x
=
0
;
p_spu
->
i_y
=
0
;
p_spu
->
b_absolute
=
VLC_FALSE
;
}
else
{
/* set to an absolute xy, referenced to upper left corner */
p_spu
->
i_flags
=
OSD_ALIGN_LEFT
|
OSD_ALIGN_TOP
;
p_spu
->
i_x
=
p_sys
->
i_xoff
;
p_spu
->
i_y
=
p_sys
->
i_yoff
;
p_spu
->
b_absolute
=
VLC_TRUE
;
}
p_spu
->
p_region
->
i_font_color
=
p_sys
->
i_font_color
;
p_spu
->
p_region
->
i_font_opacity
=
p_sys
->
i_font_opacity
;
p_spu
->
p_region
->
i_font_size
=
p_sys
->
i_font_size
;
p_spu
->
i_flags
=
p_sys
->
i_pos
;
p_sys
->
b_need_update
=
VLC_FALSE
;
return
p_spu
;
...
...
modules/video_filter/time.c
View file @
e6f5e48c
...
...
@@ -62,7 +62,6 @@ struct filter_sys_t
char
*
psz_format
;
/* time format string */
int
i_pos
;
/* permit relative positioning (top, bottom, left, right, center) */
int
i_font_color
,
i_font_opacity
,
i_font_size
;
/* font control */
vlc_bool_t
b_absolute
;
/* position control, relative vs. absolute */
time_t
last_time
;
};
...
...
@@ -127,7 +126,6 @@ static int CreateFilter( vlc_object_t *p_this )
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
;
vlc_object_t
*
p_input
;
vlc_value_t
val
;
/* Allocate structure */
p_sys
=
p_filter
->
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
...
...
@@ -233,16 +231,9 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if
(
p_sys
->
last_time
==
time
(
NULL
)
)
return
NULL
;
p_sys
->
b_absolute
=
VLC_TRUE
;
if
(
p_sys
->
i_xoff
<
0
||
p_sys
->
i_yoff
<
0
)
{
p_sys
->
b_absolute
=
VLC_FALSE
;
}
p_spu
=
p_filter
->
pf_sub_buffer_new
(
p_filter
);
if
(
!
p_spu
)
return
NULL
;
p_spu
->
b_absolute
=
p_sys
->
b_absolute
;
memset
(
&
fmt
,
0
,
sizeof
(
video_format_t
)
);
fmt
.
i_chroma
=
VLC_FOURCC
(
'T'
,
'E'
,
'X'
,
'T'
);
fmt
.
i_aspect
=
0
;
...
...
@@ -262,15 +253,26 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_spu
->
i_start
=
date
;
p_spu
->
i_stop
=
0
;
p_spu
->
b_ephemer
=
VLC_TRUE
;
/* where to locate the string: */
if
(
p_sys
->
i_xoff
<
0
||
p_sys
->
i_yoff
<
0
)
{
/* set to one of the 9 relative locations */
p_spu
->
i_flags
=
p_sys
->
i_pos
;
p_spu
->
i_x
=
0
;
p_spu
->
i_y
=
0
;
p_spu
->
b_absolute
=
VLC_FALSE
;
}
else
{
/* set to an absolute xy, referenced to upper left corner */
p_spu
->
i_flags
=
OSD_ALIGN_LEFT
|
OSD_ALIGN_TOP
;
p_spu
->
i_x
=
p_sys
->
i_xoff
;
p_spu
->
i_y
=
p_sys
->
i_yoff
;
p_spu
->
b_absolute
=
VLC_TRUE
;
}
p_spu
->
p_region
->
i_font_color
=
p_sys
->
i_font_color
;
p_spu
->
p_region
->
i_font_opacity
=
p_sys
->
i_font_opacity
;
p_spu
->
p_region
->
i_font_size
=
p_sys
->
i_font_size
;
p_spu
->
i_flags
=
p_sys
->
i_pos
;
return
p_spu
;
}
/**********************************************************************
...
...
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