Skip to content

Commit

Permalink
release v0.7.0 (#310)
Browse files Browse the repository at this point in the history
* release v0.7.0

* update readme

* Update hls cleanup timeout
  • Loading branch information
gBillal authored Dec 26, 2023
1 parent 9fa8516 commit 66c6431
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ The main feature of this project is to store video streams retrieved from `devic
* **Devices**: read video streams from
- [x] IP Cameras
- [ ] USB / Webcams
- [ ] Raspberry Cameras
- [ ] Raspberry Pi Cameras
- [x] Plain RTSP stream
- [ ] File Upload (Helpful for debug, benchmarking & demos)
- [x] File Upload (Helpful for debug, benchmarking & demos)

* **Camera Streams**: save and playback
- [x] Main stream
Expand All @@ -121,7 +121,7 @@ The main feature of this project is to store video streams retrieved from `devic

* **Video Codecs**: allow storing and streaming videos with following codecs
- [x] H264
- [ ] H265
- [x] H265 (Live stream disabled, videos are transcoded for playback)

* **Streaming**: live view and playback
- [x] HLS
Expand Down
6 changes: 3 additions & 3 deletions apps/ex_nvr/lib/ex_nvr/devices.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule ExNVR.Devices do
Device.update_changeset(device, attrs)
end

@spec fetch_snapshot(Device.t()) :: binary()
@spec fetch_snapshot(Device.t()) :: {:ok, binary} | {:error, term()}
def fetch_snapshot(%{stream_config: %{snapshot_uri: nil}}) do
{:error, :no_snapshot_uri}
end
Expand All @@ -96,15 +96,15 @@ defmodule ExNVR.Devices do

{:ok, response} ->
Logger.error("""
Devices: could not fetch live snapshot for device #{inspect(device)}
Devices: could not fetch live snapshot"
#{inspect(response)}
""")

{:error, response}

error ->
Logger.error("""
Devices: could not fetch live snapshot for device #{inspect(device)}
Devices: could not fetch live snapshot"
#{inspect(error)}
""")

Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr/lib/ex_nvr/elements/snapshot_bin.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule ExNVR.Elements.SnapshotBin do
{_, ^ref} -> true
_ -> false
end)
|> then(&{[remove_child: &1], state})
|> then(&{[remove_children: &1], state})
end

@impl true
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr/lib/ex_nvr/pipeline/output/storage.ex
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ defmodule ExNVR.Pipeline.Output.Storage do
def handle_element_end_of_stream({:sink, seg_ref}, _pad, _ctx, state) do
{state, segment} = do_save_recording(state, seg_ref)

actions = [remove_child: seg_ref, notify_parent: {:segment_stored, segment}]
actions = [remove_children: seg_ref, notify_parent: {:segment_stored, segment}]
terminate_action = if state.terminating?, do: [terminate: :normal], else: []

{actions ++ terminate_action, state}
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr/lib/ex_nvr/pipeline/output/web_rtc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ defmodule ExNVR.Pipeline.Output.WebRTC do
@impl true
def handle_pad_removed(Pad.ref(:input, :main_stream), _ctx, state) do
Engine.message_endpoint(state.rtc_engine, state.stream_endpoint_id, :remove_track)
{[remove_child: :sink], %{state | media_track: nil}}
{[remove_children: :sink], %{state | media_track: nil}}
end

@impl true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ defmodule ExNVR.Pipeline.Output.WebRTC.StreamEndpoint do

@impl true
def handle_pad_removed(Pad.ref(:output, {track_id, :high}), _ctx, state) do
{[remove_child: track_id], state}
{[remove_children: track_id], state}
end

@impl true
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr/lib/ex_nvr/pipeline/source/rtsp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ defmodule ExNVR.Pipeline.Source.RTSP do
_other -> false
end)

{[remove_child: childs], %{state | ssrc_to_track: %{}, tracks: []}}
{[remove_children: childs], %{state | ssrc_to_track: %{}, tracks: []}}
end

@impl true
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule ExNVR.MixProject do
def project do
[
app: :ex_nvr,
version: "0.6.0",
version: "0.7.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/lib/ex_nvr_web/hls_streaming_monitor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule ExNVRWeb.HlsStreamingMonitor do
require Logger

@cleanup_interval :timer.seconds(3)
@stale_time 30
@stale_time 45

def start_link(_opts) do
GenServer.start_link(__MODULE__, nil, name: __MODULE__)
Expand Down
2 changes: 1 addition & 1 deletion apps/ex_nvr_web/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule ExNVRWeb.MixProject do
def project do
[
app: :ex_nvr_web,
version: "0.6.0",
version: "0.7.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
9 changes: 5 additions & 4 deletions apps/ex_nvr_web/priv/static/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: ExNVR API
description: Manage ExNVR via API endpoints
version: 0.6.0
version: 0.7.0
servers:
- url: '{protocol}://{host}:{port}'
variables:
Expand Down Expand Up @@ -222,13 +222,14 @@ paths:
The actual recording files are not deleted.
If you want to delete them delete the folder:
{device_storage_address}/ex_nvr/{device.id}
`{device.settings.storage_address}/ex_nvr/{device.id}`
operationId: deleteDevice
tags:
- Device
responses:
'200':
description: Success
'204':
description: Success
'404':
$ref: "#/components/responses/NotFound"
/api/recordings/chunks:
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule ExNVR.Umbrella.MixProject do
use Mix.Project

@version "0.6.0"
@version "0.7.0"

def project do
[
Expand Down Expand Up @@ -138,6 +138,7 @@ defmodule ExNVR.Umbrella.MixProject do
RestartSec=1
SyslogIdentifier=ex_nvr
WorkingDirectory=/opt/ex_nvr
LimitNOFILE=8192
[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit 66c6431

Please sign in to comment.