| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.gpuCommand = exports.GPU_COMMAND = void 0; | |
| const renderer_1 = require("@remotion/renderer"); | |
| const client_1 = require("@remotion/renderer/client"); | |
| const browser_download_bar_1 = require("./browser-download-bar"); | |
| const chalk_1 = require("./chalk"); | |
| const log_1 = require("./log"); | |
| const parsed_cli_1 = require("./parsed-cli"); | |
| exports.GPU_COMMAND = 'gpu'; | |
| const { enableMultiprocessOnLinuxOption, glOption, delayRenderTimeoutInMillisecondsOption, headlessOption, chromeModeOption, darkModeOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options; | |
| const gpuCommand = async (logLevel) => { | |
| const browserExecutable = browserExecutableOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const userAgent = userAgentOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value; | |
| const disableWebSecurity = disableWebSecurityOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const gl = glOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value; | |
| const puppeteerTimeout = delayRenderTimeoutInMillisecondsOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const headless = headlessOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const chromeMode = chromeModeOption.getValue({ | |
| commandLine: parsed_cli_1.parsedCli, | |
| }).value; | |
| const darkMode = darkModeOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value; | |
| const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({ | |
| quiet: (0, parsed_cli_1.quietFlagProvided)(), | |
| indent: false, | |
| logLevel, | |
| onProgress: () => undefined, | |
| }); | |
| await renderer_1.RenderInternals.internalEnsureBrowser({ | |
| browserExecutable, | |
| indent: false, | |
| logLevel, | |
| onBrowserDownload, | |
| chromeMode, | |
| }); | |
| const chromiumOptions = { | |
| disableWebSecurity, | |
| enableMultiProcessOnLinux, | |
| gl, | |
| headless, | |
| ignoreCertificateErrors, | |
| userAgent, | |
| darkMode, | |
| }; | |
| const statuses = await renderer_1.RenderInternals.getChromiumGpuInformation({ | |
| browserExecutable, | |
| indent: false, | |
| logLevel, | |
| chromiumOptions, | |
| timeoutInMilliseconds: puppeteerTimeout, | |
| onBrowserDownload: (0, browser_download_bar_1.defaultBrowserDownloadProgress)({ | |
| indent: false, | |
| logLevel, | |
| quiet: (0, parsed_cli_1.quietFlagProvided)(), | |
| onProgress: () => undefined, | |
| }), | |
| chromeMode, | |
| onLog: renderer_1.RenderInternals.defaultOnLog, | |
| }); | |
| for (const { feature, status } of statuses) { | |
| log_1.Log.info({ indent: false, logLevel }, `${feature}: ${colorStatus(status)}`); | |
| } | |
| }; | |
| exports.gpuCommand = gpuCommand; | |
| const colorStatus = (status) => { | |
| if (status === 'Enabled') { | |
| return chalk_1.chalk.green(status); | |
| } | |
| if (status === 'Hardware accelerated') { | |
| return chalk_1.chalk.green(status); | |
| } | |
| if (status === 'Disabled') { | |
| return chalk_1.chalk.red(status); | |
| } | |
| if (status === 'Software only. Hardware acceleration disabled') { | |
| return chalk_1.chalk.red(status); | |
| } | |
| if (status === 'Software only, hardware acceleration unavailable') { | |
| return chalk_1.chalk.red(status); | |
| } | |
| return status; | |
| }; | |
Xet Storage Details
- Size:
- 3.82 kB
- Xet hash:
- 8e2d8064d7cfb91815c1a44e134bb16bc15ecf1eb4d4091d24fb6f08f5cd89ca
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.