mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-29 20:03:48 +02:00
Merge main into release for tag v1.50.5
This commit is contained in:
Generated
+9
-9
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mediabunny",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mediabunny",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"workspaces": [
|
||||
".",
|
||||
@@ -12894,7 +12894,7 @@
|
||||
},
|
||||
"packages/aac-encoder": {
|
||||
"name": "@mediabunny/aac-encoder",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"devDependencies": {
|
||||
"@types/emscripten": "^1.40.1"
|
||||
@@ -12909,7 +12909,7 @@
|
||||
},
|
||||
"packages/ac3": {
|
||||
"name": "@mediabunny/ac3",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"devDependencies": {
|
||||
"@types/emscripten": "^1.40.1"
|
||||
@@ -12924,7 +12924,7 @@
|
||||
},
|
||||
"packages/flac-encoder": {
|
||||
"name": "@mediabunny/flac-encoder",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"devDependencies": {
|
||||
"@types/emscripten": "^1.40.1"
|
||||
@@ -12939,7 +12939,7 @@
|
||||
},
|
||||
"packages/mp3-encoder": {
|
||||
"name": "@mediabunny/mp3-encoder",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"devDependencies": {
|
||||
"@types/emscripten": "^1.40.1"
|
||||
@@ -12954,7 +12954,7 @@
|
||||
},
|
||||
"packages/prores": {
|
||||
"name": "@mediabunny/prores",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"turbores": "^1.2.1"
|
||||
@@ -12969,10 +12969,10 @@
|
||||
},
|
||||
"packages/server": {
|
||||
"name": "@mediabunny/server",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@mediabunny/prores": "^1.50.0",
|
||||
"@mediabunny/prores": "^1.50.4",
|
||||
"node-av": "^6.0.0"
|
||||
},
|
||||
"funding": {
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mediabunny",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.",
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
@@ -56,10 +56,10 @@
|
||||
"examples:build": "vite build",
|
||||
"fix-build-import-paths": "tsx scripts/add-import-extensions.ts",
|
||||
"append-namespace": "echo 'export as namespace Mediabunny;' >> dist/mediabunny.d.ts",
|
||||
"bump-patch": "npm version patch --no-git-tag-version --workspaces",
|
||||
"bump-minor": "npm version minor --no-git-tag-version --workspaces",
|
||||
"bump-major": "npm version major --no-git-tag-version --workspaces",
|
||||
"set-version": "npm version --no-git-tag-version --workspaces"
|
||||
"bump-patch": "npm version patch --no-git-tag-version --workspaces && tsx scripts/sync-workspace-deps.ts",
|
||||
"bump-minor": "npm version minor --no-git-tag-version --workspaces && tsx scripts/sync-workspace-deps.ts",
|
||||
"bump-major": "npm version major --no-git-tag-version --workspaces && tsx scripts/sync-workspace-deps.ts",
|
||||
"set-version": "npm version --no-git-tag-version --workspaces && tsx scripts/sync-workspace-deps.ts"
|
||||
},
|
||||
"license": "MPL-2.0",
|
||||
"repository": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/aac-encoder",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "AAC encoder extension for Mediabunny, based on FFmpeg.",
|
||||
"main": "./dist/bundles/mediabunny-aac-encoder.mjs",
|
||||
"module": "./dist/bundles/mediabunny-aac-encoder.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/ac3",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "AC-3 and E-AC-3 (Dolby Digital) decoder and encoder extension for Mediabunny, based on FFmpeg.",
|
||||
"main": "./dist/bundles/mediabunny-ac3.mjs",
|
||||
"module": "./dist/bundles/mediabunny-ac3.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/flac-encoder",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "FLAC encoder extension for Mediabunny, based on libFLAC.",
|
||||
"main": "./dist/bundles/mediabunny-flac-encoder.mjs",
|
||||
"module": "./dist/bundles/mediabunny-flac-encoder.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/mp3-encoder",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "MP3 encoder extension for Mediabunny, based on LAME.",
|
||||
"main": "./dist/bundles/mediabunny-mp3-encoder.mjs",
|
||||
"module": "./dist/bundles/mediabunny-mp3-encoder.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/prores",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "Apple ProRes decoder extension for Mediabunny, based on TurboRes.",
|
||||
"main": "./dist/bundles/mediabunny-prores.mjs",
|
||||
"module": "./dist/bundles/mediabunny-prores.mjs",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@mediabunny/server",
|
||||
"author": "Vanilagy",
|
||||
"version": "1.50.4",
|
||||
"version": "1.50.5",
|
||||
"description": "Adds full video and audio decoder and encoder support to Mediabunny for use in server-side environments (Node, Bun, Deno). Based on NodeAV.",
|
||||
"main": "./dist/bundles/mediabunny-server.cjs",
|
||||
"module": "./dist/bundles/mediabunny-server.mjs",
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"node-av": "^6.0.0",
|
||||
"@mediabunny/prores": "^1.50.0"
|
||||
"@mediabunny/prores": "^1.50.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"mediabunny": "^1.45.0"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
// After `npm version --workspaces` bumps each package's version, this rewrites dependency ranges that point at sibling
|
||||
// workspaces so they follow along.
|
||||
|
||||
const root = path.join(import.meta.dirname, '..');
|
||||
|
||||
const workspaceDirs = ['.', ...fs.readdirSync(path.join(root, 'packages')).map(x => `packages/${x}`)]
|
||||
.filter(dir => fs.existsSync(path.join(root, dir, 'package.json')));
|
||||
|
||||
type Manifest = {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies?: Record<string, string>;
|
||||
};
|
||||
|
||||
const manifests = workspaceDirs.map((dir) => {
|
||||
const filePath = path.join(root, dir, 'package.json');
|
||||
return { filePath, json: JSON.parse(fs.readFileSync(filePath, 'utf8')) as Manifest };
|
||||
});
|
||||
|
||||
const versions = new Map(manifests.map(({ json }) => [json.name, json.version]));
|
||||
|
||||
for (const { filePath, json } of manifests) {
|
||||
let changed = false;
|
||||
|
||||
for (const name of Object.keys(json.dependencies ?? {})) {
|
||||
const version = versions.get(name);
|
||||
if (version && json.dependencies![name] !== `^${version}`) {
|
||||
json.dependencies![name] = `^${version}`;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
fs.writeFileSync(filePath, JSON.stringify(json, null, 2) + '\n');
|
||||
console.log(`Synced workspace dependency ranges in ${path.relative(root, filePath)}`);
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -544,7 +544,8 @@ export class InputVideoTrack extends InputTrack {
|
||||
}
|
||||
|
||||
async hasOnlyKeyPackets() {
|
||||
return (await this._backing.getHasOnlyKeyPackets?.()) ?? false;
|
||||
return (await this._backing.getHasOnlyKeyPackets?.())
|
||||
?? (await this._backing.getCodec() === 'prores'); // Only ProRes is fully intra-frame
|
||||
}
|
||||
|
||||
/** Returns the width in pixels of the track's coded samples, before any transformations or rotations. */
|
||||
|
||||
+7
-3
@@ -2129,7 +2129,7 @@ class ReadOrchestrator {
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (worker.running || this.workers.length >= this.options.maxWorkerCount) {
|
||||
if (worker.running) {
|
||||
// Rare, but can happen with multiple concurrent reads. In this case, don't do anything.
|
||||
return;
|
||||
}
|
||||
@@ -2144,15 +2144,19 @@ class ReadOrchestrator {
|
||||
}
|
||||
|
||||
const queuedRead = this.queuedReads[oldestIndex]!;
|
||||
this.queuedReads.splice(oldestIndex, 1);
|
||||
|
||||
const newWorker = this.createWorker(
|
||||
queuedRead.hole.start,
|
||||
queuedRead.hole.end,
|
||||
queuedRead.strictTarget,
|
||||
);
|
||||
assert(newWorker); // We just freed up a worker, so this should never fail
|
||||
if (!newWorker) {
|
||||
// In high-contention cases, it could be that we've already reached max worker count, so in this
|
||||
// case we don't do anything.
|
||||
return;
|
||||
}
|
||||
|
||||
this.queuedReads.splice(oldestIndex, 1);
|
||||
newWorker.pendingSlices = queuedRead.pendingSlices;
|
||||
this.runWorker(newWorker);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user