Repository navigation
GPS: add support for parsing txt files, auto load file and some tweaks - #1347
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical build and concurrency defects, along with parsing correctness issues, remain unresolved.
8 open issues
Unsynchronized one-time companion load races across workers · New Unsynchronized one-time companion load races across workers · New Missing direct QTextStream include · New QByteArray passed incorrectly to strncat · New Missing direct includes for exposed Qt types · New Coordinate parser rejects valid decimal precision · New Whitespace splitting retains empty fields · New Date/time parsing incorrectly uses local timezone · New
What changed in this PR
Adds TXT GPS parsing, automatic companion-file discovery, parser refactoring, and updated GPS overlay defaults.
Changes:
- Supports formatted and regex-based TXT GPS files.
- Detects matching
.gpx,.tcx, and.txtcompanion files. - Refactors GPS storage and parsing around
QVector.
| File | Reviewed changes |
|---|---|
src/modules/qt/gps_parser.h |
Updated GPS structures and parser APIs. |
src/modules/qt/gps_parser.cpp |
Added TXT parsing, sorting, and companion discovery. |
src/modules/qt/filter_gpstext.cpp |
Added automatic GPS loading for text overlays. |
src/modules/qt/filter_gpsgraphic.h |
Updated graphics filter structures and enums. |
src/modules/qt/filter_gpsgraphic.cpp |
Added automatic GPS loading and adjusted defaults. |
Review effort: Lite
Member
|
please update your branch from master to fix job runs |
dany123
force-pushed
the
gps/txt_qvector_autofile
branch
from
October 21, 2026 18:30
2b58be8 to
c52a7e4
Compare
Contributor
Author
Ok. There's a few other compile errors that I don't have locally so I'll have to fix them one by one as I look into the github's job output. |
dany123
force-pushed
the
gps/txt_qvector_autofile
branch
from
October 23, 2026 17:26
cbe84e3 to
33aa361
Compare
ddennedy
reviewed
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


added support to parsing .txt files (technically any text file),
-> there's an automatic regex that tries to match datetime and latitude+longitude
-> alternatively, I made up a quick way for a user to provide the actual type of each field in a simple format line at the start of the file that should match this format (quick note: "skip" is an invalid keyword so it will just skip that column):
#delimiter=" " datetime="yyyy/MM/dd" datetime="hh:mm:ss" latitude longitude speed skip heading altitude(alternatively
date,timeanddatetimeare also supported to try to regex the values)which matches my dashcam txt gps file (anything at the end not matching a format keyword is skipped):
2025/06/12 02:45:01 N:45.123456 E:26.123456 0.0 km/h 0.00 72.50 10 x:-4.13 y:0.27 z:0.49
rewrote the 3 file parsing functions to use QVector and QString so they are way cleaner and shorter
added a one time check at filter creation to try and find + load a companion gps file provided it has the exact same name as the video file and one of the 3 supported extensions
dropped typedef from all structs (this one was needed for one struct to support the < operator for sorting and I decided to just drop it for all structs as they are in C++ file)
I also changed the default rect for both gps filters to something more natural, the new values are just as arbitrary as the old ones but the default gps text on 80% of the screen was starting to get annoying)
I have a Shotcut UI change almost ready, I noticed something during testing that doesn't get updated automatically as I expected for the GPS text filter (the graphic one works correctly) and I'm trying to fix it first.
Sample full file from my dashcam, this covers exactly 1 minute and is the companion for the same name video also spanning 1 minute:
2025_06_11_194223_00.TXT