You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Video player control layer**: GSYTextureRenderVIew to GSYVideoPlayer five layers.
11
11
***Render rendering control layer**: TextureView, SurfaceView, GLSurfaceView (GSYRenderView <- IGSYRenderView).
12
+
***Extension capability layer**: subtitles, preview, screenshots, GL effects, and quality switching are kept in replaceable UI/Manager/Render layers whenever possible, instead of being pushed into the playback core.
12
13
13
14
**Currently, the entire video layer is the traditional controller layer, and it is also the layer that needs to be inherited for custom implementation most of the time.**
14
15
@@ -32,6 +33,24 @@
32
33
33
34
**From this, it can be seen that the project's playback core, manager, and rendering layer can all be customized and replaced.**
34
35
36
+
### Recent Features By Layer
37
+
38
+
Recent playback changes map to the existing architecture like this:
39
+
40
+
| Feature | Layer | Notes |
41
+
| --- | --- | --- |
42
+
| Unified external subtitles | Video/UI layer |`GSYSubtitleController` and `GSYSubtitleView` render SRT/WebVTT by playback position; failures do not affect video playback. |
43
+
| WebVTT seek preview | Demo + preview provider |`PreViewGSYVideoPlayer` consumes `GSYVideoPreviewProvider`; thumbnail files and sprite coordinates come from the app or server side. |
44
+
| Screenshots | Render + Video layer | Render views capture the video frame; `StandardGSYVideoPlayer` adds composed screenshot APIs that include player UI. |
45
+
| GLSurfaceView effects | Render layer | GL renderers handle filters, textures, screenshots, and release; the demo restores the previous global render type on exit. |
46
+
| Multi-URL quality switching | Video + Manager layer |`SmartPickVideo` preloads the target URL with a temporary manager, syncs seek position, commits when ready, and falls back on failure. |
47
+
| Exo adaptive quality | Exo Manager layer | HLS master / DASH MPD use one media timeline; Media3 TrackSelector handles auto track selection, and fixed quality uses TrackSelectionOverride. |
48
+
| Keep last frame | Demo Video layer |`KeepLastFrameVideo` validates the business behavior without changing the base player's default completion state. |
49
+
| Player init failure handling | Manager + Player layer |`GSYVideoBaseManager` and each `IPlayerManager` route core creation/init exceptions into error callbacks and resource cleanup. |
50
+
| Exo cache and GIF cleanup | Cache + Utils layer |`ExoSourceManager` manages the Exo cache lifecycle, while `GifCreateHelper` cleans GIF generation state and temporary resources. |
51
+
52
+
See [RECENT_FEATURES_EN.md](RECENT_FEATURES_EN.md) for entry points, APIs, and regression checks.
Copy file name to clipboardExpand all lines: doc/RECENT_FEATURES_EN.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,38 @@ This document summarizes recent demo and playback changes so maintainers can qui
13
13
| GLSurfaceView effects and lifecycle |`Filter`|`DetailFilterActivity`, `GSYVideoGLView*Render`| Cleans up GL renderer lifecycle and adds filter, texture, multi-window, mask, and blur scenes. |
14
14
| Multi-URL quality switching |`Seamless switch`|`SmartPickVideo`| Keeps the two-manager approach and improves position sync, timeout, fallback, and temporary manager release. |
15
15
| Exo adaptive quality |`EXO adaptive quality`|`ExoAdaptiveTrackActivity`, `GSYExo2MediaPlayer`| Uses one HLS master playlist or DASH MPD and lets Media3 TrackSelector switch video tracks in one media timeline. |
16
+
| Graceful player init failure handling | Global capability |`GSYVideoBaseManager`, each `IPlayerManager`| Routes player creation/init failures through error callbacks and cleanup instead of crashing directly. |
17
+
| Exo cache lifecycle and GIF cleanup | Global capability |`ExoSourceManager`, `GifCreateHelper`| Tightens Exo cache open/release behavior and cleans GIF generation state more reliably. |
-`doc/ARCHITECTURE.md`: layer ownership across UI, Manager, Render, and Exo manager.
43
+
-`doc/GSYVIDEO_PLAYER_PROJECT_INFO.md` / `doc/GSYVIDEO_PLAYER_PROJECT_INFO_EN.md`: recent feature mapping in the project structure guide.
44
+
-`doc/SUBTITLE_CN.md`: unified subtitle guide.
45
+
-`doc/RECENT_FEATURES.md` / `doc/RECENT_FEATURES_EN.md`: full recent feature overview, APIs, and regression checklist.
46
+
47
+
Build, dependency, SO, publishing, decoder, and FAQ documents are not forced to repeat these playback feature notes because their scope is not demo entry points or playback architecture.
16
48
17
49
## WebVTT Seek Preview
18
50
@@ -129,6 +161,18 @@ Notes:
129
161
- Fixed quality uses `TrackSelectionOverride` for a specific video track.
130
162
- Clearing the override restores adaptive playback.
131
163
164
+
## Graceful Player Init Failures
165
+
166
+
Player initialization hardening is mainly in `GSYVideoBaseManager` and each core `IPlayerManager`. When IJK, System, Exo, or AliPlayer creation/init fails, the flow tries to report `onError` and release resources instead of throwing directly into the app.
167
+
168
+
There is no standalone demo entry for this global safety behavior. Regression should cover invalid URLs, missing codec capability, or intentionally failed init paths and verify the app enters the error state without crashing.
169
+
170
+
## Exo Cache Lifecycle And GIF Cleanup
171
+
172
+
`ExoSourceManager` now handles Exo cache open/reuse/release more carefully to reduce stale resource risks. `GifCreateHelper` also cleans temporary state more reliably after GIF creation finishes, fails, or is cancelled.
173
+
174
+
There is no standalone entry for this capability. Regression should cover Exo cache playback, leaving and re-entering a page, and GIF creation/failure paths in the filter demo.
175
+
132
176
## Regression Checklist
133
177
134
178
Run at least:
@@ -146,3 +190,5 @@ Manual checks:
146
190
-`Filter`: switch filters and GL scenes; playback, screenshots, and GIF creation should not crash.
147
191
-`Seamless switch`: switch multiple URLs and confirm it does not jump back to 0.
148
192
-`EXO adaptive quality`: HLS and DASH play, tracks are listed, and auto/fixed quality switching works.
193
+
- Playback failure and init exceptions: confirm they route to error callbacks and do not crash the app.
194
+
- Exo cache and GIF: confirm exit/re-enter/failure paths clean resources.
0 commit comments