mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-27 01:06:42 +01:00
Chore: log cleanups, and Vo settings enablement
Added the ability to swap VO options for android only between "GPU" and "GPU-next" Removed some console logs from previous debugging Added the ability to see what VO is being used to render in the video player Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
AudioTranscodeMode,
|
||||
InactivityTimeout,
|
||||
type MpvCacheMode,
|
||||
type MpvVoDriver,
|
||||
TVTypographyScale,
|
||||
useSettings,
|
||||
} from "@/utils/atoms/settings";
|
||||
@@ -171,6 +172,7 @@ export default function SettingsTV() {
|
||||
const currentTypographyScale =
|
||||
settings.tvTypographyScale || TVTypographyScale.Default;
|
||||
const currentCacheMode = settings.mpvCacheEnabled ?? "auto";
|
||||
const currentVoDriver = settings.mpvVoDriver ?? "gpu-next";
|
||||
const currentLanguage = settings.preferedLanguage;
|
||||
|
||||
// Audio transcoding options
|
||||
@@ -285,6 +287,23 @@ export default function SettingsTV() {
|
||||
[t, currentCacheMode],
|
||||
);
|
||||
|
||||
// VO driver options
|
||||
const voDriverOptions: TVOptionItem<MpvVoDriver>[] = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: t("home.settings.vo_driver.gpu_next"),
|
||||
value: "gpu-next",
|
||||
selected: currentVoDriver === "gpu-next",
|
||||
},
|
||||
{
|
||||
label: t("home.settings.vo_driver.gpu"),
|
||||
value: "gpu",
|
||||
selected: currentVoDriver === "gpu",
|
||||
},
|
||||
],
|
||||
[t, currentVoDriver],
|
||||
);
|
||||
|
||||
// Typography scale options
|
||||
const typographyScaleOptions: TVOptionItem<TVTypographyScale>[] = useMemo(
|
||||
() => [
|
||||
@@ -411,6 +430,11 @@ export default function SettingsTV() {
|
||||
return option?.label || t("home.settings.buffer.cache_auto");
|
||||
}, [cacheModeOptions, t]);
|
||||
|
||||
const voDriverLabel = useMemo(() => {
|
||||
const option = voDriverOptions.find((o) => o.selected);
|
||||
return option?.label || t("home.settings.vo_driver.gpu_next");
|
||||
}, [voDriverOptions, t]);
|
||||
|
||||
const languageLabel = useMemo(() => {
|
||||
if (!currentLanguage) return t("home.settings.languages.system");
|
||||
const option = APP_LANGUAGES.find((l) => l.value === currentLanguage);
|
||||
@@ -636,6 +660,20 @@ export default function SettingsTV() {
|
||||
})
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Video Output Section */}
|
||||
<TVSectionHeader title={t("home.settings.vo_driver.title")} />
|
||||
<TVSettingsOptionButton
|
||||
label={t("home.settings.vo_driver.vo_mode")}
|
||||
value={voDriverLabel}
|
||||
onPress={() =>
|
||||
showOptions({
|
||||
title: t("home.settings.vo_driver.vo_mode"),
|
||||
options: voDriverOptions,
|
||||
onSelect: (value) => updateSettings({ mpvVoDriver: value }),
|
||||
})
|
||||
}
|
||||
/>
|
||||
<TVSettingsStepper
|
||||
label={t("home.settings.buffer.buffer_duration")}
|
||||
value={settings.mpvCacheSeconds ?? 10}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { GestureControls } from "@/components/settings/GestureControls";
|
||||
import { MediaProvider } from "@/components/settings/MediaContext";
|
||||
import { MediaToggles } from "@/components/settings/MediaToggles";
|
||||
import { MpvBufferSettings } from "@/components/settings/MpvBufferSettings";
|
||||
import { MpvVoSettings } from "@/components/settings/MpvVoSettings";
|
||||
import { PlaybackControlsSettings } from "@/components/settings/PlaybackControlsSettings";
|
||||
import { ChromecastSettings } from "../../../../../../components/settings/ChromecastSettings";
|
||||
|
||||
@@ -28,6 +29,7 @@ export default function PlaybackControlsPage() {
|
||||
<GestureControls className='mb-4' />
|
||||
<PlaybackControlsSettings />
|
||||
<MpvBufferSettings />
|
||||
<MpvVoSettings />
|
||||
</MediaProvider>
|
||||
</View>
|
||||
{!Platform.isTV && <ChromecastSettings />}
|
||||
|
||||
@@ -608,11 +608,6 @@ export default function page() {
|
||||
: (item?.UserData?.PlaybackPositionTicks ?? 0);
|
||||
const startPos = ticksToSeconds(startTicks);
|
||||
|
||||
console.log(
|
||||
`[DirectPlayer] Resume position — ticks: ${startTicks}, seconds: ${startPos}, ` +
|
||||
`fromUrl: ${playbackPositionFromUrl}, itemTicks: ${item?.UserData?.PlaybackPositionTicks ?? 0}`,
|
||||
);
|
||||
|
||||
// Build source config - headers only needed for online streaming
|
||||
const source: MpvVideoSource = {
|
||||
url: stream.url,
|
||||
@@ -627,6 +622,8 @@ export default function page() {
|
||||
maxBytes: settings.mpvDemuxerMaxBytes,
|
||||
maxBackBytes: settings.mpvDemuxerMaxBackBytes,
|
||||
},
|
||||
// Pass VO driver setting (Android only)
|
||||
voDriver: settings.mpvVoDriver,
|
||||
};
|
||||
|
||||
// Add external subtitles only for online playback
|
||||
@@ -671,6 +668,7 @@ export default function page() {
|
||||
settings.mpvCacheSeconds,
|
||||
settings.mpvDemuxerMaxBytes,
|
||||
settings.mpvDemuxerMaxBackBytes,
|
||||
settings.mpvVoDriver,
|
||||
]);
|
||||
|
||||
const volumeUpCb = useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user