decord/source/stores/ApplicationStreamingSettingsStore.tsx

109 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4472
// Function ID: 4473
2026-07-29 08:29:29 +00:00
// Name: ApplicationStreamPresets
2026-08-25 06:04:03 +00:00
// Dependencies: [4439, 4444, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 4472 (ApplicationStreamPresets)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-08-25 06:04:03 +00:00
import DesktopSources from "DesktopSources" /* 4444 */;
import RESOLUTION_720 from "RESOLUTION_720" /* 4439 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
const ApplicationStreamPresets = RESOLUTION_720.ApplicationStreamPresets;
({ ApplicationStreamResolutions, ApplicationStreamFPS } = RESOLUTION_720);
2026-08-24 06:08:38 +00:00
const MediaEngineContextTypes = DesktopSources.MediaEngineContextTypes;
2026-07-23 10:11:24 +00:00
let PRESET_VIDEO = ApplicationStreamPresets.PRESET_VIDEO;
2026-07-29 08:29:29 +00:00
RESOLUTION_720 = ApplicationStreamResolutions.RESOLUTION_720;
2026-07-20 16:05:17 +00:00
const FPS_30 = ApplicationStreamFPS.FPS_30;
2026-07-29 08:29:29 +00:00
let c5 = true;
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class ApplicationStreamingSettingsStore extends PersistedStore {
}
const prototype = ApplicationStreamingSettingsStore.prototype;
prototype["initialize"] = function initialize(preset) {
if (null != preset) {
2026-08-24 06:08:38 +00:00
PRESET_VIDEO = preset.preset;
2026-07-29 08:29:29 +00:00
if (PRESET_VIDEO == null) {
PRESET_VIDEO = ApplicationStreamPresets.PRESET_VIDEO;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ resolution: RESOLUTION_720, fps: FPS_30, soundshareEnabled } = preset);
if (soundshareEnabled == null) {
soundshareEnabled = true;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
};
prototype["getState"] = function getState() {
return { preset: PRESET_VIDEO, resolution: RESOLUTION_720, fps: FPS_30, soundshareEnabled: c5 };
};
ApplicationStreamingSettingsStore.displayName = "ApplicationStreamingSettingsStore";
ApplicationStreamingSettingsStore.persistKey = "ApplicationStreamingSettingStore";
2026-08-24 06:08:38 +00:00
const applicationStreamingSettingsStore = new ApplicationStreamingSettingsStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
MEDIA_ENGINE_SET_GO_LIVE_SOURCE: function handleSetGoLiveSource(settings) {
settings = settings.settings;
let context;
2026-07-29 08:29:29 +00:00
if (settings != null) {
2026-07-20 16:05:17 +00:00
context = settings.context;
}
if (context === MediaEngineContextTypes.STREAM) {
let qualityOptions;
2026-07-29 08:29:29 +00:00
if (settings != null) {
2026-07-20 16:05:17 +00:00
qualityOptions = settings.qualityOptions;
}
if (null != qualityOptions) {
let flag = false;
2026-07-23 10:11:24 +00:00
if (preset !== settings.qualityOptions.preset) {
preset = settings.qualityOptions.preset;
2026-07-20 16:05:17 +00:00
flag = true;
}
2026-07-23 10:11:24 +00:00
if (resolution !== settings.qualityOptions.resolution) {
resolution = settings.qualityOptions.resolution;
2026-07-20 16:05:17 +00:00
flag = true;
}
2026-07-23 10:11:24 +00:00
if (frameRate !== settings.qualityOptions.frameRate) {
frameRate = settings.qualityOptions.frameRate;
2026-07-20 16:05:17 +00:00
flag = true;
}
return flag;
}
}
return false;
},
STREAM_UPDATE_SETTINGS: function handleUpdateSettings(arg0) {
({ preset, resolution, frameRate, soundshareEnabled } = arg0);
let tmp = null != preset;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = preset !== preset;
2026-07-20 16:05:17 +00:00
}
let flag = false;
if (tmp) {
flag = true;
}
let tmp3 = null != resolution;
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = resolution !== resolution;
2026-07-20 16:05:17 +00:00
}
if (tmp3) {
flag = true;
}
let tmp5 = null != frameRate;
if (tmp5) {
2026-07-23 10:11:24 +00:00
tmp5 = frameRate !== frameRate;
2026-07-20 16:05:17 +00:00
}
if (tmp5) {
flag = true;
}
let tmp7 = null != soundshareEnabled;
if (tmp7) {
2026-07-23 10:11:24 +00:00
tmp7 = soundshareEnabled !== soundshareEnabled;
2026-07-20 16:05:17 +00:00
}
if (tmp7) {
flag = true;
}
return flag;
}
});
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("stores/ApplicationStreamingSettingsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default applicationStreamingSettingsStore;