Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
8a9ae37f
Commit
8a9ae37f
authored
Mar 04, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timefilter: allow to evaluate at other times.
parent
e29f66d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
timefilter.c
libavdevice/timefilter.c
+5
-0
timefilter.h
libavdevice/timefilter.h
+9
-0
No files found.
libavdevice/timefilter.c
View file @
8a9ae37f
...
...
@@ -83,6 +83,11 @@ double ff_timefilter_update(TimeFilter *self, double system_time, double period)
return
self
->
cycle_time
;
}
double
ff_timefilter_eval
(
TimeFilter
*
self
,
double
delta
)
{
return
self
->
cycle_time
+
self
->
clock_period
*
delta
;
}
#ifdef TEST
#include "libavutil/lfg.h"
#define LFG_MAX ((1LL << 32) - 1)
...
...
libavdevice/timefilter.h
View file @
8a9ae37f
...
...
@@ -81,6 +81,15 @@ TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, dou
*/
double
ff_timefilter_update
(
TimeFilter
*
self
,
double
system_time
,
double
period
);
/**
* Evaluate the filter at a specified time
*
* @param delta difference between the requested time and the current time
* (last call to ff_timefilter_update).
* @return the filtered time
*/
double
ff_timefilter_eval
(
TimeFilter
*
self
,
double
delta
);
/**
* Reset the filter
*
...
...
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