Skip to content

Commit 06c0eef

Browse files
committed
[*] refactor video editor
1 parent 6ec7f65 commit 06c0eef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/video-editor/src/tracks/track.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ use std::{path::Path, sync::Arc, time::Duration};
1414
pub struct TrackPriority(u8);
1515

1616
impl TrackPriority {
17-
pub const SUBTITLE: TrackPriority = TrackPriority(0);
17+
pub const SUBTITLE: TrackPriority = TrackPriority(0); // highest (topmost)
1818
pub const OVERLAY: TrackPriority = TrackPriority(1);
19-
pub const VIDEO_AUDIO: TrackPriority = TrackPriority(2);
19+
pub const VIDEO: TrackPriority = TrackPriority(1); // same as overlay, can swap
20+
pub const AUDIO: TrackPriority = TrackPriority(2); // lowest (bottommost)
2021
}
2122

2223
#[derive(Debug, Clone)]
@@ -961,7 +962,8 @@ impl Track {
961962
match self {
962963
Track::Subtitle(_) => TrackPriority::SUBTITLE,
963964
Track::Overlay(_) => TrackPriority::OVERLAY,
964-
Track::Video(_) | Track::Audio(_) => TrackPriority::VIDEO_AUDIO,
965+
Track::Video(_) => TrackPriority::VIDEO,
966+
Track::Audio(_) => TrackPriority::AUDIO,
965967
}
966968
}
967969

0 commit comments

Comments
 (0)