Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ Remove passwords and private addresses before posting logs or XML.

### Media file is too large

Remote media downloads are limited to 20 MB. Use short announcement files where possible.
Media downloads are limited to 20 MB. Use short announcement files where possible.

### HTTPS devices

The current implementation uses raw HTTP sockets to the Hikvision ISAPI port and is designed for local-network HTTP access. HTTPS support is not implemented.
The integration currently connects to the Hikvision ISAPI port over local-network HTTP. HTTPS configuration is not implemented.

## Security Notes

Expand Down
12 changes: 0 additions & 12 deletions custom_components/hikvision_player/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from pathlib import Path
from typing import Iterable

import miniaudio
Expand All @@ -15,17 +14,6 @@
_SEG_UEND = (0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF)


def decode_media_file(path: Path, codec: str) -> bytes:
"""Decode a media file to camera-ready G.711 bytes."""
decoded = miniaudio.decode_file(
str(path),
output_format=miniaudio.SampleFormat.SIGNED16,
nchannels=1,
sample_rate=SAMPLE_RATE,
)
return encode_g711(decoded.samples, codec)


def decode_media_bytes(data: bytes, codec: str) -> bytes:
"""Decode media bytes to camera-ready G.711 bytes."""
decoded = miniaudio.decode(
Expand Down
Loading
Loading