forked from ffmpegwasm/ffmpeg.wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ente-io/single-thread
Single thread
- Loading branch information
Showing
14 changed files
with
9,255 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
const resolveURL = require('resolve-url'); | ||
const { devDependencies } = require('../../package.json'); | ||
|
||
/* | ||
* Default options for browser environment | ||
*/ | ||
module.exports = { | ||
corePath: typeof process !== 'undefined' && process.env.NODE_ENV === 'development' | ||
? resolveURL('/node_modules/@ffmpeg/core/dist/ffmpeg-core.js') | ||
? '/node_modules/@ffmpeg/core/dist/ffmpeg-core.js' | ||
: `https://unpkg.com/@ffmpeg/core@${devDependencies['@ffmpeg/core'].substring(1)}/dist/ffmpeg-core.js`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
const defaultOptions = require('./defaultOptions'); | ||
const getCreateFFmpegCore = require('./getCreateFFmpegCore'); | ||
const fetchFile = require('./fetchFile'); | ||
const { getCore: getCoreMT, ffmpeg: ffmpegMT } = require('./mt'); | ||
const { getCore: getCoreST, ffmpeg: ffmpegST } = require('./st'); | ||
|
||
module.exports = { | ||
defaultOptions, | ||
getCreateFFmpegCore, | ||
fetchFile, | ||
getCore: (mt) => (mt ? getCoreMT : getCoreST), | ||
ffmpeg: (mt) => (mt ? ffmpegMT : ffmpegST) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-disable no-undef */ | ||
const parseArgs = require('../../utils/parseArgs'); | ||
|
||
const getCore = (opts) => ( | ||
createFFmpegCore(opts) | ||
); | ||
|
||
const ffmpeg = ({ Core, args }) => ( | ||
Core.ccall( | ||
'emscripten_proxy_main', | ||
'number', | ||
['number', 'number'], | ||
parseArgs(Core, args), | ||
) | ||
); | ||
|
||
module.exports = { | ||
getCore, | ||
ffmpeg, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const parseArgs = require('../../utils/parseArgs'); | ||
|
||
const getCore = (opts) => ( | ||
createFFmpegCore(opts) | ||
); | ||
const ffmpeg = ({ Core, args }) => ( | ||
Core.ccall( | ||
'main', | ||
'number', | ||
['number', 'number'], | ||
parseArgs(Core, args), | ||
) | ||
); | ||
|
||
module.exports = { | ||
getCore, ffmpeg, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters