Commit Graph

3 Commits

Author SHA1 Message Date
gx 8ee2bd8ddb fix: include libavutil/mem.h для av_mallocz (-Werror=implicit-function-declaration) 2026-05-19 17:57:00 +01:00
gx b537de7e52 libavformat: cuframes_packets demuxer для encoded packet ring (cuframes v0.2)
Companion к существующему cuframes://. URL `cuframes_packets://<key>`
открывает encoded packet ring у publisher'а (поднятого с --enable-packet-ring)
и выдаёт raw H.264/H.265 stream без декодирования.

Use case в Frigate config:
  cameras:
    cam_parking:
      ffmpeg:
        inputs:
          - path: cuframes://cam-parking          # decoded NV12 для detect
            roles: [detect]
          - path: cuframes_packets://cam-parking  # encoded H.264 для record
            input_args: -f cuframes_packets
            roles: [record]

  → 1 RTSP connection к камере (вместо 2-3).

Implementation:
- read_header: cuframes_subscriber_create + enable_packets + get_codec_params
  (codec_id + extradata → AVStream.codecpar).
- read_packet: cuframes_subscriber_next_packet → memcpy в AVPacket.
  PACKET_OVERRUN → EAGAIN (library resync'нет на next call).
- AV_PKT_FLAG_KEY/CORRUPT/DISCONTINUITY mapping из cuframes flags.
- pts/dts: ns from publisher → µs timebase.

Build wiring:
- configure: cuframes_packets_demuxer_deps="libcuframes"
- libavformat/Makefile: CONFIG_CUFRAMES_PACKETS_DEMUXER → cuframes_packetsdec.o
- libavformat/allformats.c: extern ff_cuframes_packets_demuxer
2026-05-19 17:02:57 +01:00
gx dcecd42de4 FFmpeg 7.1 + cuframes input demuxer
Snapshot FFmpeg n7.1 (release tag) с применённым patch'ем для cuframes
input format. Используется как FFMPEG_REPO_OVERRIDE в NickM-27/FFmpeg-Builds
fork для статической сборки patched binary под Frigate (Debian 12 / glibc 2.36).

Apply changes:
  + libavformat/cuframesdec.c (новый — реализация демуксера)
  M libavformat/Makefile (CONFIG_CUFRAMES_DEMUXER target)
  M libavformat/allformats.c (extern declaration)
  M configure (--enable-libcuframes option + dep check)

Patch source: https://git.goldix.org/gx/cuframes (filter/ffmpeg-7.1-cuframes-demuxer.patch)

History сброшена (snapshot вместо fork) потому что upstream shallow clone
не позволял push в gitea. Полная история FFmpeg — на github.com/FFmpeg/FFmpeg n7.1.
2026-05-17 11:43:10 +01:00