-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make player controller even smaller.
- Loading branch information
1 parent
6a0e190
commit e31f7d0
Showing
10 changed files
with
212 additions
and
26 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
40 changes: 40 additions & 0 deletions
40
...onte.demo.javafx.movieplayer/org/monte/demo/javafx/movieplayer/fxplayer/FXAudioTrack.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,40 @@ | ||
/* | ||
* @(#)FXTrack.java | ||
* Copyright © 2024 Werner Randelshofer, Switzerland. MIT License. | ||
*/ | ||
|
||
package org.monte.demo.javafx.movieplayer.fxplayer; | ||
|
||
import javafx.scene.media.AudioTrack; | ||
import org.monte.demo.javafx.movieplayer.model.AudioTrackInterface; | ||
|
||
import java.util.Locale; | ||
import java.util.Map; | ||
|
||
public class FXAudioTrack implements AudioTrackInterface { | ||
private final AudioTrack track; | ||
|
||
public FXAudioTrack(AudioTrack track) { | ||
this.track = track; | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return track.getLocale(); | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getMetadata() { | ||
return track.getMetadata(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return track.getName(); | ||
} | ||
|
||
@Override | ||
public long getTrackID() { | ||
return track.getTrackID(); | ||
} | ||
} |
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
42 changes: 42 additions & 0 deletions
42
...e.demo.javafx.movieplayer/org/monte/demo/javafx/movieplayer/fxplayer/FXSubtitleTrack.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,42 @@ | ||
|
||
/* | ||
* @(#)FXTrack.java | ||
* Copyright © 2024 Werner Randelshofer, Switzerland. MIT License. | ||
*/ | ||
|
||
package org.monte.demo.javafx.movieplayer.fxplayer; | ||
|
||
import javafx.scene.media.SubtitleTrack; | ||
import org.monte.demo.javafx.movieplayer.model.SubtitleTrackInterface; | ||
|
||
import java.util.Locale; | ||
import java.util.Map; | ||
|
||
public class FXSubtitleTrack implements SubtitleTrackInterface { | ||
private final SubtitleTrack track; | ||
|
||
public FXSubtitleTrack(SubtitleTrack track) { | ||
this.track = track; | ||
} | ||
|
||
|
||
@Override | ||
public Locale getLocale() { | ||
return track.getLocale(); | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getMetadata() { | ||
return track.getMetadata(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return track.getName(); | ||
} | ||
|
||
@Override | ||
public long getTrackID() { | ||
return track.getTrackID(); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...onte.demo.javafx.movieplayer/org/monte/demo/javafx/movieplayer/fxplayer/FXVideoTrack.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,50 @@ | ||
/* | ||
* @(#)FXTrack.java | ||
* Copyright © 2024 Werner Randelshofer, Switzerland. MIT License. | ||
*/ | ||
|
||
package org.monte.demo.javafx.movieplayer.fxplayer; | ||
|
||
import javafx.scene.media.VideoTrack; | ||
import org.monte.demo.javafx.movieplayer.model.VideoTrackInterface; | ||
|
||
import java.util.Locale; | ||
import java.util.Map; | ||
|
||
public class FXVideoTrack implements VideoTrackInterface { | ||
private final VideoTrack track; | ||
|
||
public FXVideoTrack(VideoTrack track) { | ||
this.track = track; | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return track.getHeight(); | ||
} | ||
|
||
@Override | ||
public int getWidth() { | ||
return track.getWidth(); | ||
} | ||
|
||
@Override | ||
public Locale getLocale() { | ||
return track.getLocale(); | ||
} | ||
|
||
@Override | ||
public Map<String, Object> getMetadata() { | ||
return track.getMetadata(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return track.getName(); | ||
} | ||
|
||
@Override | ||
public long getTrackID() { | ||
return track.getTrackID(); | ||
} | ||
} |
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
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