Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
8958cda
Command-line test runner: filter tests by name substring (#1895)
pa-devbot Nov 12, 2026
213e996
Home simplify exit menu (#1873)
Dalton-V Nov 12, 2026
5220644
Home - StorageView (#1900)
Dalton-V Nov 12, 2026
d914382
Home - Box number reader (#1901)
Dalton-V Nov 12, 2026
6835121
Add ffmpeg-based in-memory stream history ring (opt-in via PA_STREAM_…
Gin890 Oct 12, 2026
a464e30
Fix several bugs in the ffmpeg stream history ring found during review.
Gin890 Oct 12, 2026
ca5fbcf
Replace the libx264 video fallback with ffmpeg's built-in LGPL mpeg4 …
Gin890 Oct 14, 2026
09daad5
add ffmpeg library files
jw098 Oct 14, 2026
cccc92f
fix build
jw098 Oct 14, 2026
22d47fc
Fix the stream history ring save path and make it build against ffmpe…
Gin890 Oct 14, 2026
792ecbb
fix build
jw098 Oct 14, 2026
78a362c
fix ffmpeg EAGAIN sign convention
jw098 Oct 14, 2026
fe6efc7
install ffmpeg libraries for mac/linux CI
jw098 Oct 14, 2026
a86c16f
attempt to fix mac CI
jw098 Oct 14, 2026
c11acd0
fix CI
jw098 Oct 14, 2026
9818fb0
Fix ffmpeg C++ linkage, C4458 under /W4 /WX, and mac/linux pkg-config…
Gin890 Oct 14, 2026
671af34
fix build
jw098 Oct 14, 2026
3a59cc2
Stop keying ffmpeg API differences on version macros; detect the actu…
Gin890 Oct 15, 2026
090fd71
Stream history: drop the dual ffmpeg API-generation support; enforce …
Gin890 Oct 15, 2026
464b000
Stream history: enforce the ffmpeg 5.1 floor instead of 7.x
Gin890 Oct 15, 2026
5e06fd7
Stream history: fall back to the next video encoder if it fails at ru…
Gin890 Oct 15, 2026
adfb6b0
Stream history: never free a failed hardware encoder context
Gin890 Oct 15, 2026
5776b17
fix build
jw098 Oct 15, 2026
18d6660
Stream history: fix pixel format selection on ffmpeg 7.0+, don't pois…
Gin890 Oct 15, 2026
24202f8
Stream history: use a mpeg4-compatible timebase and set the frame rate
Gin890 Oct 15, 2026
284126b
Stream history: mux from codec-parameter snapshots, not live contexts
Gin890 Oct 16, 2026
346fe01
Stream history: convert H.264 from Annex B to AVCC when muxing MP4
Gin890 Oct 16, 2026
d790c5c
Stream history: open the output file before avformat_write_header
Gin890 Oct 16, 2026
855c59c
Stream history: write a valid avcC record when muxing MP4
Gin890 Oct 17, 2026
d3a95e6
Stream history: keep video dts strictly increasing when muxing to file
Gin890 Oct 17, 2026
6b12b5b
Stream history: set the AAC encoder's sample format (FLTP) and de-int…
Gin890 Oct 17, 2026
d029a40
Stream history: initialize the audio resampler before use
Gin890 Oct 17, 2026
372b23a
Stream history: stamp MKV packets in milliseconds and interleave the …
Gin890 Oct 17, 2026
f522f96
Stream history: remember every runtime-failed video encoder, not just…
Gin890 Oct 17, 2026
26be07b
Stream history: drop the unused <libavutil/opt.h> include
Gin890 Oct 17, 2026
d555e91
Stream history: log the first video packet's bytes at mux time
pa-devbot Oct 17, 2026
415e0ef
adjust visibility of StreamHistory Options, depending on whether ffmp…
jw098 Oct 17, 2026
32aa983
minor change
jw098 Oct 17, 2026
59d6c8b
Stream history: add the Media Foundation encoder (h264_mf) to the Win…
pa-devbot Oct 17, 2026
7e5afb0
add info about the ffmpeg library
jw098 Oct 18, 2026
dce0dea
Stream history: fix two documentation inaccuracies (comments only)
pa-devbot Oct 22, 2026
7cdf45e
Stream history: deduplicate the ffmpeg >= 5.1 API check into pa_check…
pa-devbot Oct 23, 2026
9cdef24
move ffmpeg binary into own folder. zip the dlls.
jw098 Oct 23, 2026
68d96d5
Stream history: keep ffmpeg binaries in their own 3rdPartyBinaries/ff…
pa-devbot Oct 23, 2026
489915d
remove duplicate ffmpeg binaries
jw098 Oct 23, 2026
25fefc1
update comments
jw098 Oct 23, 2026
91b71d9
Stream history: consume the audio pipeline's working stream instead o…
pa-devbot Oct 24, 2026
7fe9e40
Stream history: decouple the ring tracker from the input's shape
pa-devbot Oct 24, 2026
a357825
Stream history: keep one keyframe interval of headroom in the ring
pa-devbot Oct 25, 2026
01a384d
use Pimpl
jw098 Oct 25, 2026
792cfaa
m_-prefix the ring tracker's Data members
jw098 Oct 25, 2026
342e0d9
Stream history: document the ring tracker's functions
pa-devbot Oct 25, 2026
d52329e
add comments
jw098 Oct 26, 2026
871264b
add comments
jw098 Oct 26, 2026
e41644e
Stream history: fix a null-encoder crash, a shutdown hang, and saves …
claude Oct 26, 2026
f74d425
Stream history: fix A/V sync, a save/fallback race, and receive-side …
claude Oct 26, 2026
4e68917
Stream history: move the H.264 bitstream helpers into their own file
claude Oct 26, 2026
b140f97
Stream history: add unit tests for the H.264 bitstream helpers
claude Oct 26, 2026
3d1190e
Stream history: fix two H.264 bitstream bugs found by the new tests
claude Oct 26, 2026
d91ea93
Stream history: add test hooks to the ring tracker
claude Oct 26, 2026
346488a
Stream history: add end-to-end tests for the ring tracker
claude Oct 26, 2026
879edbf
Stream history: build and destroy the tracker outside the session lock
claude Oct 26, 2026
c62cc40
Stream history: recognize 3-byte start codes in H.264 Annex B extradata
claude Oct 26, 2026
8ac841c
Stream history: test NV12 frames, audio jitter and drift, resolution …
claude Oct 26, 2026
46679a3
Stream history: drop audio overlapping a re-sync, report the memory cap
claude Oct 27, 2026
cb4660c
Stream history: test that a backwards audio re-sync drops the overlap
claude Oct 27, 2026
1b4378b
Stream history: extract the Windows ffmpeg DLLs per version; fix the …
claude Oct 27, 2026
aae71d3
Build instructions: install ffmpeg for the stream history
claude Oct 27, 2026
9268f49
Stream history: extract the Windows ffmpeg DLLs once, like OpenCV
claude Oct 27, 2026
67a2a86
Stream history: fix the ffmpeg 7.0 build and correct the ring's comments
claude Oct 27, 2026
1c2db20
Stream history: correct and clarify comments
claude Oct 28, 2026
458dc2c
Stream history: disable video when the scaler cannot be created
claude Nov 11, 2026
f85e938
Stream history: log each stretch of failed frame conversions
claude Nov 11, 2026
92891ba
add comments. rename member variables for clarity
jw098 Nov 6, 2026
166f06f
add comments
jw098 Nov 11, 2026
b8975c6
Stream history: tighten the encoder failure handling
claude Nov 11, 2026
8e8f48f
add comments
jw098 Nov 11, 2026
87b8567
Stream history: own ffmpeg frames and packets with unique_ptr
claude Nov 11, 2026
e96ea18
Stream history: unmap the video frame with an RAII guard
claude Nov 11, 2026
0a4a76c
Stream history: ffmpeg RAII header; RAII in mux_to_file()
claude Nov 11, 2026
485a556
Stream history: own the encoder state with RAII members
claude Nov 11, 2026
9c5f7ab
add comments. minor refactor to the loop draining packets from the en…
jw098 Nov 12, 2026
04fa2f2
update comments
jw098 Nov 12, 2026
896f12f
Stream history: evict video by its own clock; fix the tests under enc…
claude Nov 12, 2026
e76e3de
Stream history: force IDR keyframes on the hardware encoders
claude Nov 12, 2026
51c5a67
Stream history: test keyframe spacing, window changes, stopped video,…
claude Nov 12, 2026
6297e48
Stream history: log how far the video trails the audio at save time
claude Nov 12, 2026
923448b
Stream history: include the frame interval in the save-time lag log
claude Nov 12, 2026
5183b47
Stream history: fix the MP4 tail, H.264 parsing and avcC; tests for each
claude Nov 12, 2026
780d88a
Stream history: fix the session's tracker races; second review fixes
claude Nov 12, 2026
c2ef885
Stream history: simplify the session back to main's locking
claude Nov 12, 2026
8586c43
Stream history: rebuild the scaler on output size changes; cache unop…
claude Nov 12, 2026
b579e6b
Stream history: remove the encoder reopen test hook and its tests
claude Nov 12, 2026
990aa84
Stream history: set NVENC's forced-idr option too
claude Nov 12, 2026
f9ecab9
Stream history: reduce the session to main plus the ring's hooks
claude Nov 12, 2026
d5c9fc3
Stream history: document the deferred session-lock issue
claude Nov 12, 2026
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
3 changes: 2 additions & 1 deletion .github/workflows/cpp-ci-serial-programs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
cd Arduino-Source
sudo apt update
sudo apt install ccache clang-tools libopencv-dev libsystemd-dev libsdl3-dev
sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev

sudo apt install ./3rdPartyBinaries/libdpp-10.1.6-linux-x64.deb

Expand All @@ -112,7 +113,7 @@ jobs:
cd Arduino-Source
# libsodium, openssl@3, opus and pkgconf are libdpp's dependencies, installed here so
# their versions can go into the libdpp cache key below.
brew install opencv@4 onnxruntime ccache libsodium openssl@3 opus pkgconf sdl3
brew install opencv@4 onnxruntime ccache libsodium openssl@3 opus pkgconf sdl3 ffmpeg

brew tap-new --no-git PA/libdpp
brew trust PA/libdpp
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ SerialPrograms/bin/
.vscode
.qtcreator

# 3rdPartyBinaries
discord_social_sdk_win/
discord_partner_sdk.dll
3rdPartyBinaries/discord_social_sdk_mac/
3rdPartyBinaries/discord_social_sdk_linux/
3rdPartyBinaries/onnxruntime-osx-arm64-*/
3rdPartyBinaries/onnxruntime-osx-x86_64-*/

opencv_world4120.dll
opencv_world4120d.dll
3rdPartyBinaries/ffmpeg/*.dll

# macOS hidden system file
.DS_Store
Expand Down Expand Up @@ -59,8 +62,6 @@ SerialPrograms/*.lib
Resources/*
Packages/
SerialPrograms/CMakeLists.txt.user
opencv_world4120.dll
opencv_world4120d.dll

# Python cache
__pycache__
Expand Down
4 changes: 4 additions & 0 deletions 3rdParty/ffmpeg/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
LGPL build taken from:
https://github.com/btbn/ffmpeg-builds/releases/tag/autobuild-2026-10-13-13-05
version: "n9.0.2-27-g7e93014c5b-20261013"
ffmpeg-n9.0.2-27-g7e93014c5b-win64-lgpl-shared-9.0.zip
36 changes: 36 additions & 0 deletions 3rdParty/ffmpeg/libavcodec/ac3_parser.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* AC-3 parser prototypes
* Copyright (c) 2003 Fabrice Bellard
* Copyright (c) 2003 Michael Niedermayer
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef AVCODEC_AC3_PARSER_H
#define AVCODEC_AC3_PARSER_H

#include <stddef.h>
#include <stdint.h>

/**
* Extract the bitstream ID and the frame size from AC-3 data.
*/
int av_ac3_parse_header(const uint8_t *buf, size_t size,
uint8_t *bitstream_id, uint16_t *frame_size);


#endif /* AVCODEC_AC3_PARSER_H */
37 changes: 37 additions & 0 deletions 3rdParty/ffmpeg/libavcodec/adts_parser.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef AVCODEC_ADTS_PARSER_H
#define AVCODEC_ADTS_PARSER_H

#include <stddef.h>
#include <stdint.h>

#define AV_AAC_ADTS_HEADER_SIZE 7

/**
* Extract the number of samples and frames from AAC data.
* @param[in] buf pointer to AAC data buffer
* @param[out] samples Pointer to where number of samples is written
* @param[out] frames Pointer to where number of frames is written
* @return Returns 0 on success, error code on failure.
*/
int av_adts_header_parse(const uint8_t *buf, uint32_t *samples,
uint8_t *frames);

#endif /* AVCODEC_ADTS_PARSER_H */
Loading
Loading