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
c68071f6
Commit
c68071f6
authored
Sep 20, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_filter/time.c: optimized a bit.
parent
d275c501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
modules/video_filter/time.c
modules/video_filter/time.c
+8
-3
No files found.
modules/video_filter/time.c
View file @
c68071f6
...
...
@@ -48,6 +48,8 @@ struct filter_sys_t
{
int
i_xoff
,
i_yoff
;
/* offsets for the display string in the video window */
char
*
psz_head
;
/* text to put before the day/time */
time_t
last_time
;
};
#define MSG_TEXT N_("Timestamp Prefix")
...
...
@@ -98,6 +100,7 @@ static int CreateFilter( vlc_object_t *p_this )
/* Misc init */
p_filter
->
pf_sub_filter
=
Filter
;
p_sys
->
last_time
=
((
time_t
)
-
1
);
return
VLC_SUCCESS
;
}
...
...
@@ -131,13 +134,14 @@ char *myCtime( time_t *t )
****************************************************************************/
static
subpicture_t
*
Filter
(
filter_t
*
p_filter
,
mtime_t
date
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
subpicture_t
*
p_spu
;
video_format_t
fmt
;
time_t
t
;
char
*
psz_time
,
*
psz_string
;
filter_sys_t
*
p_sys
;
p_sys
=
p_filter
->
p_sys
;
if
(
p_sys
->
last_time
==
time
(
NULL
)
)
return
NULL
;
p_spu
=
p_filter
->
pf_sub_buffer_new
(
p_filter
);
if
(
!
p_spu
)
return
NULL
;
...
...
@@ -154,7 +158,8 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_filter
->
pf_sub_buffer_del
(
p_filter
,
p_spu
);
return
NULL
;
}
t
=
time
(
NULL
);
t
=
p_sys
->
last_time
=
time
(
NULL
);
psz_time
=
myCtime
(
&
t
);
asprintf
(
&
psz_string
,
"%s%s"
,
p_sys
->
psz_head
,
psz_time
);
...
...
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