@stremio/stremio-video 0.0.79 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ShellVideo/ShellVideo.js +11 -2
package/package.json
CHANGED
|
@@ -257,8 +257,9 @@ function ShellVideo(options) {
|
|
|
257
257
|
}
|
|
258
258
|
});
|
|
259
259
|
ipc.on('mpv-event-ended', function(args) {
|
|
260
|
+
// older shells report 'other' for every non-error reason, including eof
|
|
260
261
|
if (args.error) onError(args.error);
|
|
261
|
-
else onEnded();
|
|
262
|
+
else if (!args.reason || args.reason === 'eof' || args.reason === 'other') onEnded();
|
|
262
263
|
});
|
|
263
264
|
|
|
264
265
|
function getProp(propName) {
|
|
@@ -409,10 +410,18 @@ function ShellVideo(options) {
|
|
|
409
410
|
var subAssOverride = commandArgs.assSubtitlesStyling ? 'strip' : 'no';
|
|
410
411
|
ipc.send('mpv-set-prop', ['sub-ass-override', subAssOverride]);
|
|
411
412
|
|
|
413
|
+
var gpuProcessing = !!commandArgs.gpuVideoProcessing &&
|
|
414
|
+
!!commandArgs.hardwareDecoding;
|
|
415
|
+
|
|
412
416
|
// Hardware decoding
|
|
413
|
-
var hwdecValue = commandArgs.hardwareDecoding ? 'auto-copy' : 'no';
|
|
417
|
+
var hwdecValue = commandArgs.hardwareDecoding ? (gpuProcessing ? 'd3d11va' : 'auto-copy') : 'no';
|
|
414
418
|
ipc.send('mpv-set-prop', ['hwdec', hwdecValue]);
|
|
415
419
|
|
|
420
|
+
// GPU video processing
|
|
421
|
+
if (typeof commandArgs.gpuVideoProcessing === 'boolean') {
|
|
422
|
+
ipc.send('mpv-set-gpu-video-processing', gpuProcessing);
|
|
423
|
+
}
|
|
424
|
+
|
|
416
425
|
// Video output
|
|
417
426
|
var videoOutput = commandArgs.platform === 'windows' ? (commandArgs.videoMode === null ? 'gpu-next' : 'gpu') : 'libmpv';
|
|
418
427
|
ipc.send('mpv-set-prop', ['vo', videoOutput]);
|