We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 49884c5 + 2a4bc3a commit 0031030Copy full SHA for 0031030
1 file changed
lib-gles/src/main/java/com/example/lib_gles/video_filter/core/filter/TimeScaleFilter.java
@@ -0,0 +1,28 @@
1
+package com.example.lib_gles.video_filter.core.filter;
2
+
3
+/**
4
+ * A marker filter for timeline speed control.
5
+ * It keeps pass-through rendering behavior while exposing a desired timescale.
6
+ */
7
+public class TimeScaleFilter extends GlFilter {
8
9
+ private final double timeScale;
10
11
+ public TimeScaleFilter(double timeScale) {
12
+ super();
13
+ if (timeScale <= 0) {
14
+ throw new IllegalArgumentException("timeScale must be > 0");
15
+ }
16
+ this.timeScale = timeScale;
17
18
19
+ @Override
20
+ public double resolveTimeScaleAtMs(long presentationTimeMs) {
21
+ return timeScale;
22
23
24
25
+ public boolean hasTimeScaleControl() {
26
+ return true;
27
28
+}
0 commit comments