-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
55 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/annimon/ffmpegbot/parameters/Parameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.annimon.ffmpegbot.parameters; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import java.util.*; | ||
|
||
public class Parameters extends AbstractCollection<Parameter<?>> { | ||
|
||
private final Map<String, Parameter<?>> parameters; | ||
|
||
public Parameters() { | ||
parameters = new LinkedHashMap<>(); | ||
} | ||
|
||
@Override | ||
public boolean add(Parameter<?> parameter) { | ||
return !Objects.equals(parameter, parameters.put(parameter.id, parameter)); | ||
} | ||
|
||
public Parameter<?> findById(String id) { | ||
return parameters.get(id); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public Iterator<Parameter<?>> iterator() { | ||
return parameters.values().iterator(); | ||
} | ||
|
||
@Override | ||
public int size() { | ||
return parameters.size(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/main/java/com/annimon/ffmpegbot/parameters/resolvers/MultiAudioStreamsResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/main/java/com/annimon/ffmpegbot/parameters/resolvers/ParametersResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
package com.annimon.ffmpegbot.parameters.resolvers; | ||
|
||
import com.annimon.ffmpegbot.parameters.Parameter; | ||
import com.annimon.ffmpegbot.parameters.Parameters; | ||
import com.annimon.ffmpegbot.session.FileInfo; | ||
import org.jetbrains.annotations.NotNull; | ||
import java.util.List; | ||
|
||
public interface ParametersResolver { | ||
|
||
void resolve(@NotNull List<Parameter<?>> parameters, @NotNull FileInfo fileInfo); | ||
void resolve(@NotNull Parameters parameters, @NotNull FileInfo fileInfo); | ||
} |
5 changes: 2 additions & 3 deletions
5
src/main/java/com/annimon/ffmpegbot/parameters/resolvers/SpeedFactorResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters