Skip to content

Commit

Permalink
Merge branch 'koush:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
slyoldfox authored Oct 4, 2023
2 parents bfc6298 + 7b56e86 commit 44240a3
Show file tree
Hide file tree
Showing 139 changed files with 5,064 additions and 26,404 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
# runs-on: ubuntu-latest
strategy:
matrix:
NODE_VERSION: ["18"]
NODE_VERSION: ["18", "20"]
BASE: ["jammy"]
FLAVOR: ["full", "lite", "thin"]
steps:
Expand All @@ -23,23 +23,23 @@ jobs:
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: Koushik-MacStudio
host: ${{ secrets.DOCKER_SSH_HOST_ARM64 }}
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}

- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: raspberrypi
host: ${{ secrets.DOCKER_SSH_HOST_ARM7 }}
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64,linux/armhf
append: |
- endpoint: ssh://koush@Koushik-MacStudio
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM64 }}
platforms: linux/arm64
- endpoint: ssh://koush@raspberrypi
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM7 }}
platforms: linux/armhf
- name: Login to Docker Hub
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# runs-on: ubuntu-latest
strategy:
matrix:
BASE: ["18-jammy-full", "18-jammy-lite", "18-jammy-thin"]
BASE: ["18-jammy-full", "18-jammy-lite", "18-jammy-thin", "20-jammy-full", "20-jammy-lite", "20-jammy-thin"]
SUPERVISOR: ["", ".s6"]
steps:
- name: Check out the repo
Expand All @@ -42,26 +42,25 @@ jobs:
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: Koushik-MacStudio
host: ${{ secrets.DOCKER_SSH_HOST_ARM64 }}
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}

- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v2
with:
host: raspberrypi
host: ${{ secrets.DOCKER_SSH_HOST_ARM7 }}
private-key: ${{ secrets.DOCKER_SSH_PRIVATE_KEY }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64,linux/armhf
append: |
- endpoint: ssh://koush@Koushik-MacStudio
# platforms: linux/arm64
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM64 }}
platforms: linux/arm64
- endpoint: ssh://koush@raspberrypi
- endpoint: ssh://${{ secrets.DOCKER_SSH_USER }}@${{ secrets.DOCKER_SSH_HOST_ARM7 }}
platforms: linux/armhf
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
Expand Down
19 changes: 10 additions & 9 deletions common/src/autoenable-mixin-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import sdk from "@scrypted/sdk";

const { systemManager } = sdk;

const autoIncludeToken = 'v4';

export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
hasEnabledMixin: { [id: string]: string } = {};
pluginsComponent: Promise<any>;
unshiftMixin = false;

constructor(nativeId?: string) {
constructor(nativeId?: string, public autoIncludeToken = 'v4') {
super(nativeId);

try {
Expand All @@ -30,10 +29,12 @@ export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
this.maybeEnableMixin(eventSource);
});

for (const id of Object.keys(systemManager.getSystemState())) {
const device = systemManager.getDeviceById(id);
this.maybeEnableMixin(device);
}
process.nextTick(() => {
for (const id of Object.keys(systemManager.getSystemState())) {
const device = systemManager.getDeviceById(id);
this.maybeEnableMixin(device);
}
});
}

async shouldEnableMixin(device: ScryptedDevice) {
Expand All @@ -44,7 +45,7 @@ export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
if (!device || device.mixins?.includes(this.id))
return;

if (this.hasEnabledMixin[device.id] === autoIncludeToken)
if (this.hasEnabledMixin[device.id] === this.autoIncludeToken)
return;

const match = await this.canMixin(device.type, device.interfaces);
Expand All @@ -66,9 +67,9 @@ export abstract class AutoenableMixinProvider extends ScryptedDeviceBase {
}

setHasEnabledMixin(id: string) {
if (this.hasEnabledMixin[id] === autoIncludeToken)
if (this.hasEnabledMixin[id] === this.autoIncludeToken)
return;
this.hasEnabledMixin[id] = autoIncludeToken;
this.hasEnabledMixin[id] = this.autoIncludeToken;
this.storage.setItem('hasEnabledMixin', JSON.stringify(this.hasEnabledMixin));
}

Expand Down
2 changes: 1 addition & 1 deletion external/werift
Submodule werift updated 40 files
+1 −2 .github/workflows/nodejs.yml
+17 −7 .vscode/launch.json
+1 −0 examples/mediachannel/codec/h264.ts
+81 −0 examples/mediachannel/sendonly/av.html
+13 −1 examples/mediachannel/sendonly/av.ts
+0 −82 examples/mediachannel/sendonly/lipsync.html
+4 −1 examples/mediachannel/wip_lipsync/rtpbin.ts
+6 −6 examples/package-lock.json
+14 −0 examples/save_to_disk/dtx/index.html
+49 −0 examples/save_to_disk/dtx/main.tsx
+135 −0 examples/save_to_disk/dtx/server.ts
+53 −29 examples/save_to_disk/h264.ts
+6 −4 examples/save_to_disk/pipeline.ts
+7 −7 package-lock.json
+1 −1 packages/rtp/package.json
+2 −1 packages/rtp/src/codec/base.ts
+51 −7 packages/rtp/src/codec/h264.ts
+40 −6 packages/rtp/src/codec/index.ts
+7 −1 packages/rtp/src/container/webm.ts
+14 −0 packages/rtp/src/helper.ts
+46 −23 packages/rtp/src/processor/depacketizer.ts
+2 −1 packages/rtp/src/processor/depacketizerTransformer.ts
+5 −1 packages/rtp/src/processor/dtx.ts
+11 −10 packages/rtp/src/processor/interface.ts
+3 −1 packages/rtp/src/processor/jitterBuffer.ts
+133 −101 packages/rtp/src/processor/lipsync.ts
+2 −2 packages/rtp/src/processor/lipsyncCallback.ts
+101 −45 packages/rtp/src/processor/mute.ts
+21 −15 packages/rtp/src/processor/nack.ts
+37 −37 packages/rtp/src/processor/ntpTime.ts
+5 −1 packages/rtp/src/processor/rtcpCallback.ts
+37 −5 packages/rtp/src/processor/rtpCallback.ts
+3 −2 packages/rtp/src/processor/rtpStream.ts
+34 −7 packages/rtp/src/processor/webm.ts
+15 −17 packages/rtp/src/processor/webmCallback.ts
+1 −1 packages/rtp/src/processor_old/lipsync.ts
+1 −1 packages/webrtc/package.json
+1 −1 packages/webrtc/src/media/rtpSender.ts
+69 −75 packages/webrtc/src/nonstandard/userMedia.ts
+3 −1 packages/webrtc/src/peerConnection.ts
3 changes: 2 additions & 1 deletion install/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Home Assistant Addon Configuration
name: Scrypted
version: "18-jammy-full.s6-v0.41.0"
version: "18-jammy-full.s6-v0.55.0"
slug: scrypted
description: Scrypted is a high performance home video integration and automation platform
url: "https://github.com/koush/scrypted"
Expand Down Expand Up @@ -35,6 +35,7 @@ backup_exclude:
map:
- config:rw
- media:rw
- share:rw
devices:
- /dev/mem
- /dev/dri/renderD128
Expand Down
2 changes: 1 addition & 1 deletion install/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
# Modify to add the additional volume for Scrypted NVR.
# The following example would mount the /mnt/sda/video path on the host
# to the /nvr path inside the docker container.
# - /mnt/sda/video:/nvr
# - /mnt/media/video:/nvr

# Or use a network mount from one of the CIFS/NFS examples at the top of this file.
# - type: volume
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"-r",
"ts-node/register"
],
"preLaunchTask": "npm: build",
"args": [
"ffplay",
"Kitchen",
"getRecordingStream",
"{\"startTime\":1677699495709}"
"Baby [email protected]",
"getVideoStream",
],
"sourceMaps": true,
"resolveSourceMapLocations": [
Expand All @@ -35,4 +35,4 @@
],
},
]
}
}
4 changes: 2 additions & 2 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.0.67",
"version": "1.0.69",
"description": "",
"main": "./dist/main.js",
"bin": {
Expand Down
7 changes: 5 additions & 2 deletions packages/cli/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ async function main() {
ffmpegInput.inputArguments = ffmpegInput.inputArguments.map(i => i === ffmpegInput.url ? ffmpegInput.urls?.[0] : i);
}
}
console.log('ffplay', ...ffmpegInput.inputArguments);
child_process.spawn('ffplay', ffmpegInput.inputArguments, {
const args = [...ffmpegInput.inputArguments];
if (ffmpegInput.h264FilterArguments)
args.push(...ffmpegInput.h264FilterArguments);
console.log('ffplay', ...args);
child_process.spawn('ffplay', args, {
stdio: 'inherit',
});
sdk.disconnect();
Expand Down
Loading

0 comments on commit 44240a3

Please sign in to comment.