Skip to content

Commit

Permalink
integrate liblivemedia
Browse files Browse the repository at this point in the history
  • Loading branch information
sr99622 committed Aug 27, 2024
1 parent f26084a commit 2f2cdda
Show file tree
Hide file tree
Showing 51 changed files with 3,855 additions and 3,266 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "libavio"]
path = libavio
url = https://github.com/sr99622/libavio
[submodule "liblivemedia"]
path = liblivemedia
url = https://github.com/sr99622/liblivemedia
81 changes: 57 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,9 @@ Right clicking over the file will bring up a context menu that can be used to pe

---

<image src="assets/images/settings_panel.png" style=" width: 480px;">
## General Settings

<image src="assets/images/general.png" style=" width: 480px;">

### Common Username and Password

Expand All @@ -768,37 +770,34 @@ A hardware decoder may be selected for the application. Mulitcore CPUs with more

Selecting this check box will cause the application to start in full screen mode. The full screen mode can be cancelled with the Escape key. The F12 key will also toggle full screen mode.

### Auto Discovery

When selected, this option will cause the application to discover cameras automatically when it starts. This holds true whether the application is using Broadcast Discovery or Cached Addresses. Note that if this option is selected and the Broadcast Discovery Option is also selected, the application will poll the network once per minute to find missing or new cameras.
### Auto TIme Sync

### Auto Start
This selection will send a time sync message to each of the cameras once an hour. The camera time is set to the host computer time without regard for time zone.

When selected in combination with the Auto Discovery check box, cameras shown in the list will start automatically when the application starts. This feature will work with either Discovery Broadcast or Cached Adresses.
### Display Refresh Interval

### Auto TIme Sync
Performance on some lower powered systems may be improved by increasing the display refresh interval.

This selection will send a time sync message to each of the cameras once an hour. The camera time is set to the host computer time without regard for time zone.
### Maximum Input Stream Cache Size

### Pre-Alarm Buffer Size
Adjust the maximum number of frames held in the cache before frames are dropped. This is the same cache referred to by the Video Tab of the Camera Panel.

When a camera is recording, this length of media is prepended to the file so that the moments prior to the alarm are preserved. If always recording, or the file length is limited by the system to 15 minutes, this feature will insure that there is a small overlap between adjacent files.
### Start All Cameras / Close All Streams

### Post-Alarm Lag Time
This button will change appearance depending on whether there are streams playing or not. It can be used to batch control cameras to start or stop as a group. It will start all cameras on the Camera List. It will stop all streams, including files if playing.

In the case where a camera is configured to record during alarms, this length of time must pass after the cessation of the alarm before the file recording is turned off. This helps to prevent excessive file creation.
### Show Logs

### Alarm Sounds
This button will show the logs of the application. Many events and errors encountered will be documented here. The log rolls over at 1 MB. The older logs can be managed using the Archive button on the logs display dialog. Note that on Linux, the archive file selection dialog may be slow to open or may require some mouse movement to visualize.

A few default alarm sounds for selection. A system wide volume setting for the alarm volume can be made with the slider.
### Help

### Display Refresh Interval
Shows this file.

Performance on some lower powered systems may be improved by increasing the display refresh interval.

### Maximum Input Stream Cache Size
## Discover Settings

Adjust the maximum number of frames held in the cache before frames are dropped. This is the same cache referred to by the Video Tab of the Camera Panel.
<image src="assets/images/discover.png" style=" width: 480px;">

### Discovery Options

Expand All @@ -814,6 +813,18 @@ Adjust the maximum number of frames held in the cache before frames are dropped.

It is possible to add a camera manually to the address cache by using the Add Camera button. The IP address and ONVIF port are required to connect. The ONVIF port by default is 80. If successful, the camera will be added silently to the camera list.

### Auto Discovery

When selected, this option will cause the application to discover cameras automatically when it starts. This holds true whether the application is using Broadcast Discovery or Cached Addresses. Note that if this option is selected and the Broadcast Discovery Option is also selected, the application will poll the network once per minute to find missing or new cameras.

### Auto Start

When selected in combination with the Auto Discovery check box, cameras shown in the list will start automatically when the application starts. This feature will work with either Discovery Broadcast or Cached Adresses.

## Storage Settings

<image src="assets/images/storage.png" style=" width: 480px;">

### Disk Usage

The application has the ability to manage the disk space used by the recorded media files. This setting is recommended as the files can overwhelm the computer and cause the application to crash. Allocating a directory for the camera recordings is done by assigning a directory using the Archive Dir selection widget. The default setting for the Archive Dir is the user's Video directory. It is advised to change this setting if the host computer employs the user's Video directory for other applications.
Expand All @@ -830,17 +841,39 @@ The application has the ability to manage the disk space used by the recorded me

The spin box can be used to limit the application disk usage in GB. Note that the application is conservative in it's estimate of required file size and the actual space occupied by the media files will be a few GB less than the allocated space.

### Start All Cameras / Close All Streams
## Proxy Settings

This button will change appearance depending on whether there are streams playing or not. It can be used to batch control cameras to start or stop as a group. It will start all cameras on the Camera List. It will stop all streams, including files if playing.
<image src="assets/images/proxy.png" style=" width: 480px;">

### Show Logs
## Proxy Type

This button will show the logs of the application. Many events and errors encountered will be documented here. The log rolls over at 1 MB. The older logs can be managed using the Archive button on the logs display dialog. Note that on Linux, the archive file selection dialog may be slow to open or may require some mouse movement to visualize.
* Stand Alone

### Help
Default setting, implements a single instance of the progran that connects to the cameras directly.

Shows this file.
* Server

The application will host a proxy server and allow other instances of the application configured as clients to connect over the local network to the cameras proxied by the server. The connection string required for the clients will be displayed.

* Client

The application will act as a client to the proxy server. Use the connection string displayed by the server in the url box.

## Alarm Settings

<image src="assets/images/alarm.png" style=" width: 480px;">

### Pre-Alarm Buffer Size

When a camera is recording, this length of media is prepended to the file so that the moments prior to the alarm are preserved. If always recording, or the file length is limited by the system to 15 minutes, this feature will insure that there is a small overlap between adjacent files.

### Post-Alarm Lag Time

In the case where a camera is configured to record during alarms, this length of time must pass after the cessation of the alarm before the file recording is turned off. This helps to prevent excessive file creation.

### Alarm Sounds

A few default alarm sounds for selection. A system wide volume setting for the alarm volume can be made with the slider.

---
&nbsp;
Expand Down
Binary file added assets/images/alarm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/discover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/proxy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/storage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/scripts/build_pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ cd libonvif
python -m build
cd ../libavio
python -m build
cd ../liblivemedia
python -m build
cd ../onvif-gui
python -m build
cd ..
for FILE in libonvif/dist/*.whl; do pip install $FILE; done
for FILE in libavio/dist/*.whl; do pip install $FILE; done
for FILE in liblivemedia/dist/*.whl; do pip install $FILE; done
for FILE in onvif-gui/dist/*.whl; do pip install $FILE; done
5 changes: 5 additions & 0 deletions assets/scripts/build_pkgs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ set FFMPEG_INSTALL_DIR=%CD%/ffmpeg
set SDL2_INSTALL_DIR=%CD%/sdl
python -m build
cd ..
cd liblivemedia
set CMAKE_CURRENT_SOURCE_DIR=%CD%
python -m build
cd ..
cd onvif-gui
python -m build
cd ..
for /R libonvif\dist %%F in (*.whl) do pip install "%%F"
for /R libavio\dist %%F in (*.whl) do pip install "%%F"
for /R liblivemedia\dist %%F in (*.whl) do pip install "%%F"
for /R onvif-gui\dist %%F in (*.whl) do pip install "%%F"
50 changes: 38 additions & 12 deletions assets/scripts/clean
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,58 @@
find . -type f -name '._*' -delete
cd libonvif

FILE=build
if [ -d "$FILE" ]; then
DIR=build
if [ -d "$DIR" ]; then
rm -R build
fi
FILE=libonvif.egg-info
if [ -d "$FILE" ]; then
DIR=dist
if [ -d "$DIR" ]; then
rm -R dist
fi
DIR=libonvif.egg-info
if [ -d "$DIR" ]; then
rm -R libonvif.egg-info
fi

cd ../libavio
FILE=build
if [ -d "$FILE" ]; then
DIR=build
if [ -d "$DIR" ]; then
rm -R build
fi
FILE=avio.egg-info
if [ -d "$FILE" ]; then
DIR=dist
if [ -d "$DIR" ]; then
rm -R dist
fi
DIR=avio.egg-info
if [ -d "$DIR" ]; then
rm -R avio.egg-info
fi

cd ../liblivemedia
DIR=build
if [ -d "$DIR" ]; then
rm -R build
fi
DIR=dist
if [ -d "$DIR" ]; then
rm -R dist
fi
DIR=liblivemedia.egg-info
if [ -d "$DIR" ]; then
rm -R liblivemedia.egg-info
fi

cd ../onvif-gui
FILE=build
if [ -d "$FILE" ]; then
DIR=build
if [ -d "$DIR" ]; then
rm -R build
fi
FILE=onvif_gui.egg-info
if [ -d "$FILE" ]; then
DIR=dist
if [ -d "$DIR" ]; then
rm -R dist
fi
DIR=onvif_gui.egg-info
if [ -d "$DIR" ]; then
rm -R onvif_gui.egg-info
fi

Expand Down
63 changes: 41 additions & 22 deletions assets/scripts/clean.bat
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
cd libonvif
if exist build\ (
rmdir /s /q build
)
if exist libonvif.egg-info\ (
rmdir /s /q libonvif.egg-info
)
cd ../libavio
if exist build\ (
rmdir /s /q build
)
if exist avio.egg-info\ (
rmdir /s /q avio.egg-info
)
cd ../onvif-gui
if exist build\ (
rmdir /s /q build
)
if exist onvif_gui.egg-info\ (
rmdir /s /q onvif_gui.egg-info
)
cd ..
cd libonvif
if exist build\ (
rmdir /s /q build
)
if exist dist\ (
rmdir /s /q dist
)
if exist libonvif.egg-info\ (
rmdir /s /q libonvif.egg-info
)
cd ../libavio
if exist build\ (
rmdir /s /q build
)
if exist dist\ (
rmdir /s /q dist
)
if exist avio.egg-info\ (
rmdir /s /q avio.egg-info
)
cd ../liblivemedia
if exist build\ (
rmdir /s /q build
)
if exist dist\ (
rmdir /s /q dist
)
if exist liblivemedia.egg-info\ (
rmdir /s /q liblivemedia.egg-info
)
cd ../onvif-gui
if exist build\ (
rmdir /s /q build
)
if exist dist\ (
rmdir /s /q dist
)
if exist onvif_gui.egg-info\ (
rmdir /s /q onvif_gui.egg-info
)
cd ..
11 changes: 11 additions & 0 deletions assets/scripts/compile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ if [ -d "$FILE" ]; then
fi
pip install -v .

cd ../liblivemedia
FILE=build
if [ -d "$FILE" ]; then
rm -R build
fi
FILE=liblivemedia.egg-info
if [ -d "$FILE" ]; then
rm -R liblivemedia.egg-info
fi
pip install -v .

cd ../onvif-gui
FILE=build
if [ -d "$FILE" ]; then
Expand Down
58 changes: 33 additions & 25 deletions assets/scripts/compile.bat
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
cd libonvif
if exist build\ (
rmdir /s /q build
)
if exist libonvif.egg-info\ (
rmdir /s /q libonvif.egg-info
)
pip install -v .
cd ../libavio
if exist build\ (
rmdir /s /q build
)
if exist avio.egg-info\ (
rmdir /s /q avio.egg-info
)
pip install -v .
cd ../onvif-gui
if exist build\ (
rmdir /s /q build
)
if exist onvif_gui.egg-info\ (
rmdir /s /q onvif_gui.egg-info
)
pip install .
cd ..
cd libonvif
if exist build\ (
rmdir /s /q build
)
if exist libonvif.egg-info\ (
rmdir /s /q libonvif.egg-info
)
pip install -v .
cd ../libavio
if exist build\ (
rmdir /s /q build
)
if exist avio.egg-info\ (
rmdir /s /q avio.egg-info
)
pip install -v .
cd ../liblivemedia
if exist build\ (
rmdir /s /q build
)
if exist liblivemedia.egg-info\ (
rmdir /s /q liblivemedia.egg-info
)
pip install -v .
cd ../onvif-gui
if exist build\ (
rmdir /s /q build
)
if exist onvif_gui.egg-info\ (
rmdir /s /q onvif_gui.egg-info
)
pip install .
cd ..
2 changes: 1 addition & 1 deletion libavio
Submodule libavio updated 200 files
1 change: 1 addition & 0 deletions liblivemedia
Submodule liblivemedia added at 3bd3a6
2 changes: 1 addition & 1 deletion libonvif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

cmake_minimum_required(VERSION 3.17)

project(libonvif VERSION 3.1.1)
project(libonvif VERSION 3.2.1)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
Expand Down
Loading

0 comments on commit 2f2cdda

Please sign in to comment.