mirror of
https://github.com/koush/scrypted.git
synced 2026-02-03 14:13:28 +00:00
Merge branch 'main' into libav
This commit is contained in:
@@ -34,8 +34,10 @@ set -e
|
||||
mkdir -p /tmp/amd
|
||||
cd /tmp/amd
|
||||
curl -O -L http://repo.radeon.com/amdgpu-install/latest/ubuntu/$distro/$FILENAME
|
||||
apt -y update
|
||||
apt -y install rsync
|
||||
dpkg -i $FILENAME
|
||||
apt -y update
|
||||
amdgpu-install --usecase=opencl --no-dkms -y --accept-eula
|
||||
cd /tmp
|
||||
rm -rf /tmp/amd
|
||||
|
||||
@@ -4,6 +4,25 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
UBUNTU_22_04=$(lsb_release -r | grep "22.04")
|
||||
UBUNTU_24_04=$(lsb_release -r | grep "24.04")
|
||||
|
||||
# needs either ubuntu 22.0.4 or 24.04
|
||||
if [ -z "$UBUNTU_22_04" ] && [ -z "$UBUNTU_24_04" ]
|
||||
then
|
||||
echo "Intel graphics package can not be installed. Ubuntu version could not be detected when checking lsb-release and /etc/os-release."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$UBUNTU_22_04" ]
|
||||
then
|
||||
distro="jammy"
|
||||
|
||||
else
|
||||
distro="noble"
|
||||
fi
|
||||
|
||||
# no errors beyond this point
|
||||
set -e
|
||||
|
||||
@@ -21,13 +40,26 @@ set -e
|
||||
|
||||
# need intel-media-va-driver-non-free, but all the other intel packages are installed from Intel github.
|
||||
echo "Installing Intel graphics packages."
|
||||
apt-get update && apt-get install -y gpg-agent &&
|
||||
rm -f /usr/share/keyrings/intel-graphics.gpg &&
|
||||
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --yes --output /usr/share/keyrings/intel-graphics.gpg &&
|
||||
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | tee /etc/apt/sources.list.d/intel.gpu.jammy.list &&
|
||||
apt-get -y update &&
|
||||
apt-get -y install intel-media-va-driver-non-free &&
|
||||
apt-get -y dist-upgrade;
|
||||
|
||||
if [ "$distro" == "jammy" ]
|
||||
then
|
||||
apt-get update && apt-get install -y gpg-agent &&
|
||||
rm -f /usr/share/keyrings/intel-graphics.gpg &&
|
||||
curl -L https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --yes --output /usr/share/keyrings/intel-graphics.gpg &&
|
||||
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu $distro arc" | tee /etc/apt/sources.list.d/intel.gpu.$distro.list &&
|
||||
apt-get -y update &&
|
||||
apt-get -y install intel-media-va-driver-non-free &&
|
||||
apt-get -y dist-upgrade;
|
||||
else
|
||||
apt-get update && apt-get install -y gpg-agent &&
|
||||
rm -f /usr/share/keyrings/intel-graphics.gpg &&
|
||||
curl -L https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor --yes --output /usr/share/keyrings/intel-graphics.gpg &&
|
||||
echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu $distro unified" | tee /etc/apt/sources.list.d/intel-gpu-$distro.list &&
|
||||
apt-get -y update &&
|
||||
apt-get -y install intel-media-va-driver-non-free &&
|
||||
apt-get -y dist-upgrade;
|
||||
fi
|
||||
|
||||
|
||||
rm -rf /tmp/gpu && mkdir -p /tmp/gpu && cd /tmp/gpu
|
||||
|
||||
|
||||
@@ -443,16 +443,16 @@ export class H265Repacketizer {
|
||||
}
|
||||
|
||||
maybeSendAPCodecInfo(packet: RtpPacket, ret: RtpPacket[]) {
|
||||
// can not send codec info if in the middle of sending packets for a specific rtp timestamp.
|
||||
if (!this.sentMarker)
|
||||
return;
|
||||
|
||||
if (this.ap) {
|
||||
// AP with codec information was sent recently, no need to send codec info.
|
||||
this.ap = undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
// can not send codec info if in the middle of sending packets for a specific rtp timestamp.
|
||||
if (!this.sentMarker)
|
||||
return;
|
||||
|
||||
// vps is not required.
|
||||
if (!this.codecInfo?.sps || !this.codecInfo?.pps)
|
||||
return;
|
||||
@@ -600,10 +600,10 @@ export class H265Repacketizer {
|
||||
hasPps = true;
|
||||
this.updatePps(payload);
|
||||
}
|
||||
else if (nalType === NAL_TYPE_SEI_PREFIX ) {
|
||||
else if (nalType === NAL_TYPE_SEI_PREFIX) {
|
||||
this.updateSeiPrefix(payload);
|
||||
}
|
||||
else if ( nalType === NAL_TYPE_SEI_SUFFIX) {
|
||||
else if (nalType === NAL_TYPE_SEI_SUFFIX) {
|
||||
this.updateSeiSuffix(payload);
|
||||
}
|
||||
else if (nalType === NAL_TYPE_AUD) {
|
||||
@@ -672,12 +672,12 @@ export class H265Repacketizer {
|
||||
this.updatePps(packet.payload);
|
||||
return;
|
||||
}
|
||||
else if (nalType === NAL_TYPE_SEI_PREFIX ) {
|
||||
else if (nalType === NAL_TYPE_SEI_PREFIX) {
|
||||
this.extraPackets--;
|
||||
this.updateSeiPrefix(packet.payload);
|
||||
return;
|
||||
}
|
||||
else if ( nalType === NAL_TYPE_SEI_SUFFIX) {
|
||||
else if (nalType === NAL_TYPE_SEI_SUFFIX) {
|
||||
this.extraPackets--;
|
||||
this.updateSeiSuffix(packet.payload);
|
||||
return;
|
||||
|
||||
4
server/package-lock.json
generated
4
server/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.138.20",
|
||||
"version": "0.138.22",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.138.20",
|
||||
"version": "0.138.22",
|
||||
"hasInstallScript": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/server",
|
||||
"version": "0.138.20",
|
||||
"version": "0.138.23",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"@scrypted/ffmpeg-static": "^6.1.0-build3",
|
||||
|
||||
@@ -97,7 +97,15 @@ export class HttpResponseImpl implements HttpResponse {
|
||||
stream = await clusterSetup.connectRPCObject(stream);
|
||||
|
||||
for await (const chunk of stream) {
|
||||
this.res.write(chunk);
|
||||
if (this.res.closed || this.res.destroyed)
|
||||
return;
|
||||
|
||||
const more = this.res.write(chunk);
|
||||
if (!more)
|
||||
await new Promise<void>(r => this.res.once('drain', r));
|
||||
|
||||
if (this.res.closed || this.res.destroyed)
|
||||
return;
|
||||
}
|
||||
this.res.end();
|
||||
}
|
||||
|
||||
@@ -244,6 +244,7 @@ export function startClusterClient(mainFilename: string, options?: {
|
||||
port,
|
||||
// require ipv4 to normalize cluster address.
|
||||
family: 4,
|
||||
keepAlive: true,
|
||||
});
|
||||
|
||||
try {
|
||||
@@ -349,6 +350,8 @@ export function createClusterServer(mainFilename: string, scryptedRuntime: Scryp
|
||||
console.log('Cluster client disconnected.', socket.remoteAddress, socket.remotePort);
|
||||
});
|
||||
|
||||
socket.setKeepAlive(true);
|
||||
|
||||
const peer = preparePeer(socket, 'server');
|
||||
|
||||
const connectForkWorker: ConnectForkWorker = async (auth: ClusterObject, properties: ClusterWorkerProperties) => {
|
||||
|
||||
Reference in New Issue
Block a user