refactor Streaming strategy to allow MP4 preview and rename legacy Streaming strategy to Sequential#249
Open
jolavillette wants to merge 2 commits into
Open
Conversation
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
5 times, most recently
from
January 27, 2026 21:25
29ba33e to
0ac4b92
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
3 times, most recently
from
February 12, 2026 07:36
2910398 to
1b2682f
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
3 times, most recently
from
February 18, 2026 22:02
192dbbb to
09b326e
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
February 24, 2026 14:02
09b326e to
b994a90
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
March 9, 2026 03:57
b994a90 to
f5b1d2b
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
March 18, 2026 01:21
f5b1d2b to
866bfac
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
April 2, 2026 03:45
866bfac to
a8999b5
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
2 times, most recently
from
April 21, 2026 01:46
da791e1 to
5737b87
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
May 17, 2026 00:54
5737b87 to
59342c3
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
2 times, most recently
from
May 25, 2026 08:12
4eba1fe to
b349605
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
3 times, most recently
from
June 7, 2026 12:42
d2ec214 to
5edb137
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
3 times, most recently
from
June 16, 2026 21:15
a4f5692 to
8e8f0e6
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
4 times, most recently
from
July 8, 2026 20:10
065e2a7 to
7c022d0
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
July 18, 2026 13:32
7c022d0 to
2994fc4
Compare
jolavillette
force-pushed
the
OptimFileTransferStreamingMode
branch
from
July 18, 2026 19:01
2994fc4 to
fdab680
Compare
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.
code and comment by Antigravity (under supervision)
Description
This PR introduces a proper "Smart Streaming" strategy for file transfers, designed to optimize MP4 video previewing, and cleans up the legacy naming confusion.
Key Changes:
Renamed Legacy Strategy: The old "Streaming" strategy (which was actually just downloading chunks 0, 1, 2...) has been correctly renamed to "Sequential". active everywhere (Settings, Context Menus, config files).
New "Streaming" Strategy: Implemented a new Smart Preview strategy. It behaves like Sequential (downloads from the start) but prioritizes MP4 index atoms (moov/cmov), which are often located at the end of the file. This allows video players to start playback immediately.
Windows Freeze Protection: Updated tooltips and warnings to inform users that both "Random" and "Streaming" strategies (which write to the end of the file) may cause temporary UI freezes on Windows during file allocation.
Modified files:
libretroshare/src/ft/ftcontroller.cc
: Migrated old "STREAMING" config values to the new "SEQUENTIAL" enum, while mapping the new Smart Streaming to its own ID.
libretroshare/src/retroshare/rstypes.h
: Added CHUNK_STRATEGY_STREAMING enum (id 3).
libretroshare/src/ft/ftchunkmap.cc/.h
: Implemented priority chunk logic for the new strategy.
libretroshare/src/ft/ftfilecreator.cc/.h
: Added MP4 atom parsing to detect and prioritize index chunks.
libretroshare/src/ft/ftcontroller.cc
: Updated save/load logic to handle new enum mapping and persistence strings.
GUI (retroshare-gui):
retroshare-gui/src/gui/FileTransfer/TransfersDialog.cpp/.h
: Updated context menus to include all 4 strategies (Sequential, Progressive, Random, Streaming).
retroshare-gui/src/gui/settings/TransferPage.cpp
: Handled settings persistence and Windows safety warnings.
retroshare-gui/src/gui/settings/TransferPage.ui
: Updated combo box items and tooltips with detailed explanations.
Web Interface (retroshare-webui):
retroshare-webui/webui-src/app/files/files_util.js
: Added the "Streaming" strategy to the JS mapping.