Merge branch 'master' of github.com:ZoneMinder/zoneminder

This commit is contained in:
Isaac Connor
2022-12-06 11:20:20 -05:00
3 changed files with 51 additions and 2 deletions

View File

@@ -58,12 +58,25 @@ By default MariaDB uses `unix socket authentication`_, so no root user password
**Step 4:** Install zoneminder
Run the following commands.
By default Debian will install the version published in Debian (stable). However you also have the option to install a newer version using backports.
For example, at the time of this writting, bullseye (stable) ships with v.1.34.x and bullseye-backports with v.1.36.x.
To install the version in bullseye stable, just run the following command.
::
sudo apt install zoneminder
If instead you prefer to install the newer version using backports, run the following commands.
The first line will add bullseye-backports repository.
The backports repository is deactivated by default, so with the second line we explicityly state we want the backported version of zoneminder.
::
sudo echo 'deb http://deb.debian.org/debian bullseye-backports main contrib' >> /etc/apt/sources.list
sudo apt update && sudo apt -t bullseye-backports install zoneminder
**Step 5:** Configure database
::

View File

@@ -385,6 +385,42 @@ int FfmpegCamera::OpenFfmpeg() {
} else {
Debug(1, "Success finding decoder (h264_mmal)");
}
if ((mVideoCodec = avcodec_find_decoder_by_name("h264_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (h264_nvmpi)");
} else {
Debug(1, "Success finding decoder (h264_nvmpi)");
}
} else if (mVideoStream->codecpar->codec_id == AV_CODEC_ID_HEVC) {
if ((mVideoCodec = avcodec_find_decoder_by_name("hevc_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (hevc_nvmpi)");
} else {
Debug(1, "Success finding decoder (hevc_nvmpi)");
}
} else if (mVideoStream->codecpar->codec_id == AV_CODEC_ID_VP8) {
if ((mVideoCodec = avcodec_find_decoder_by_name("vp8_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (vp8_nvmpi)");
} else {
Debug(1, "Success finding decoder (vp8_nvmpi)");
}
} else if (mVideoStream->codecpar->codec_id == AV_CODEC_ID_VP9) {
if ((mVideoCodec = avcodec_find_decoder_by_name("hevc_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (hevc_nvmpi)");
} else {
Debug(1, "Success finding decoder (hevc_nvmpi)");
}
} else if (mVideoStream->codecpar->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if ((mVideoCodec = avcodec_find_decoder_by_name("mpeg2_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (mpeg2_nvmpi)");
} else {
Debug(1, "Success finding decoder (mpeg2_nvmpi)");
}
} else if (mVideoStream->codecpar->codec_id == AV_CODEC_ID_MPEG4) {
if ((mVideoCodec = avcodec_find_decoder_by_name("mpeg4_nvmpi")) == nullptr) {
Debug(1, "Failed to find decoder (mpeg4_nvmpi)");
} else {
Debug(1, "Success finding decoder (mpeg4_nvmpi)");
}
}
if (!mVideoCodec) {

View File

@@ -36,7 +36,7 @@ ssize_t zm_sendfile(int out_fd, int in_fd, off_t *offset, size_t size) {
return -errno;
}
err = fwrite(out_fd, buffer, size);
err = write(out_fd, buffer, size);
if (err < 0) {
Error("Unable to write %zu bytes: %s", size, strerror(errno));
return -errno;