Commit Graph

148 Commits

Author SHA1 Message Date
Stu
42c1f32647 Fix file dialog and drag-and-drop loading issues
File dialog improvements:
- Add video file filters (*.mp4, *.mkv, etc.) so files are visible
- Add "All Files" filter as fallback
- Make dialog modal with Cancel button
- Improve usability with proper MIME type filtering

Drag-and-drop improvements:
- Use net/url.Parse for proper URL decoding (%20 for spaces, etc.)
- Handle file:// URIs correctly with localhost stripping
- Add comprehensive debug logging throughout load chain

Debug logging added to:
- uriToPath() - shows URI parsing
- loadIntoPane() - tracks load progress and MPV errors
- drag-data-received - shows received URIs
- file dialog - logs selected files

These changes should fix both file navigation in dialogs and
drag-and-drop video loading from file managers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 15:37:15 -05:00
Stu
a026f723ed Update TODO and DONE docs for GTK player
Replace VideoTools-focused docs with VT Player GTK/MPV documentation:
- TODO.md: Comprehensive roadmap for GTK player features
- DONE.md: Detailed v0.2.0-dev1 completion summary

Includes:
- High/medium/low priority features
- Technical debt tracking
- Known issues
- Complete implementation details
- Code metrics and performance data
- Platform support matrix

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 06:17:12 -05:00
Stu
d4efa91ce1 Add vendored gotk3 GTK3 bindings for Go
Vendor gotk3 library to ensure consistent GTK3 bindings across
environments and simplify dependency management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:43 -05:00
Stu
9d33575ada Fix CGO type errors and improve GTK player
- Fix render.go CGO type assignments using plain uint32 casts
- Add video playlist tracking with unique IDs
- Improve drag-and-drop: assign to first available pane
- Add parseURIs with crash protection for drag data
- Improve mpv initialization handling
- Update .gitignore for build artifacts (.cache, gtkplayer binary)
- Improve GDK_BACKEND handling in run script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:37 -05:00
Stu
bbe45c6524 Add MPV render context API for OpenGL rendering
Created render.go with CGO bindings for mpv_render_context:
- NewRenderContext: Create render context with parameters
- SetUpdateCallback: Register frame update callbacks
- Render: Issue render calls with FBO/dimension params
- Fixed CGO type conversions (int vs mpv_render_param_type)

This enables hardware-accelerated OpenGL rendering of MPV video
frames in the GTK player.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:24:27 -05:00
Stu
bd1b90be03 Assign drags to first-empty pane and ensure mpv ready before load 2025-12-14 00:46:50 -05:00
Stu
29bc1ac19c Parse drag data manually to avoid GetURIs crashes 2025-12-13 22:46:46 -05:00
Stu
20c4b5d177 Harden drag handler: check data/text and recover 2025-12-13 22:37:27 -05:00
Stu
5cd4c22764 Fix IdleAdd return handling 2025-12-13 22:35:54 -05:00
Stu
aac6d6eb95 Guard meta update idle callback to avoid panic 2025-12-13 22:35:00 -05:00
Stu
32434dbc28 Guard drag handler with recover and nil checks 2025-12-13 22:33:56 -05:00
Stu
fdb0f44fa7 Fix drag target setup crash (require non-empty target list) 2025-12-13 22:32:35 -05:00
Stu
6fc4d80e6c Use TargetEntry drag setup for GTK draw area 2025-12-13 22:31:30 -05:00
Stu
2239c5cf3a Fix drag URI handling to prevent crash 2025-12-13 22:30:37 -05:00
Stu
93bd8a1424 Fix TargetEntryNew return handling 2025-12-13 22:25:50 -05:00
Stu
4d33e1ec71 Fix drag targets and force X11 backend for embedded mpv 2025-12-13 22:24:07 -05:00
Stu
bec66816df Fix drag target setup for gtkplayer 2025-12-13 22:22:33 -05:00
Stu
aba4d14f57 GTK/mpv embed: fix locale, add CSS theme, drag-and-drop support 2025-12-13 22:21:44 -05:00
Stu
03b6804a9e Fix build: remove unused imports, drop playSess img refs, cleanup state init 2025-12-13 21:58:41 -05:00
Stu
c81d540b0f Use local go cache/mod in build.sh and check gtk3 dev 2025-12-13 21:50:38 -05:00
Stu
19c3d1e3ad Handle GetWindow error return for mpv embed 2025-12-13 21:48:16 -05:00
Stu
2e4b433f01 Rewrite gtkplayer entry cleanly 2025-12-13 21:46:59 -05:00
Stu
a4653dd116 Fix GetWindow return handling 2025-12-13 21:45:25 -05:00
Stu
1c40324cd6 Simplify GTK window retrieval for mpv embed 2025-12-13 21:44:19 -05:00
Stu
bab96baee8 Handle gdk window retrieval without boolean conversion 2025-12-13 21:42:35 -05:00
Stu
e3305ce80c Fix Gtk window checks for mpv embed 2025-12-13 21:41:48 -05:00
Stu
08e0da1d45 Fix GTK window handle calls for mpv embed 2025-12-13 21:40:04 -05:00
Stu
ba1db9e16f Fix GTK/mpv player build issues (imports, window ID, polling) 2025-12-13 21:39:04 -05:00
Stu
26c48ab981 Vendor gotk3, add mpv cgo wrapper, and GTK mpv player stub 2025-12-13 18:58:03 -05:00
Stu
7f0ea613d6 Install mpv on Windows via choco/scoop 2025-12-13 12:43:33 -05:00
Stu
051a17243c Add mpv runtime dependency to installer and build scripts 2025-12-10 05:55:05 -05:00
Stu
1dfab7000b Switch playback to mpv IPC and poll progress 2025-12-10 05:47:38 -05:00
Stu
0ba248af4e Coalesce player view renders and schedule once 2025-12-10 05:31:48 -05:00
Stu
4929918d4b Replace internal decoder with ffplay subprocess 2025-12-10 05:27:24 -05:00
Stu
3d43123840 Throttle player view calls aggressively 2025-12-10 05:22:30 -05:00
Stu
feeaf8e39a Throttle player view rebuilds after video load 2025-12-10 05:20:37 -05:00
Stu
8479bfef6f Guard player view render and refresh after loads 2025-12-10 05:17:02 -05:00
Stu
9d255680bf Track current source to avoid rebuilds 2025-12-10 05:09:01 -05:00
Stu
a393183d83 Trim extra UI rebuild guard 2025-12-10 05:02:17 -05:00
Stu
22e325e123 Keep player session alive and stop repeated rebuilds 2025-12-10 04:59:43 -05:00
Stu
47067aabf0 Keep player session alive in showPlayerView 2025-12-10 04:54:55 -05:00
Stu
e727b8ea09 Auto-start playback, guard view rebuilds, and clean window close 2025-12-10 03:23:40 -05:00
Stu
fc1e91bda6 Avoid player view rebuild when already active 2025-12-10 03:13:54 -05:00
Stu
ee08618142 Add playback session logging for troubleshooting 2025-12-09 18:53:30 -05:00
Stu
ab9f19095d Set video surface size and surface ffmpeg errors 2025-12-09 18:51:41 -05:00
Stu
142d2f1383 Default to software canvas and fix binary name in run.sh 2025-12-09 18:28:57 -05:00
Stu
8815f69fe8 Show preview frame when loading videos 2025-12-09 18:20:36 -05:00
Stu
c4a5e48a22 Add comprehensive debug logging and performance monitoring
Added detailed terminal output to diagnose video loading hangs:
- Session creation logging (resolution, fps, target size)
- FFmpeg command logging
- Frame decode pipeline timing (first frame, decode time, render time)
- Real-time FPS counter (reports every 2 seconds)
- Memory usage info (frame buffer size)
- Error reporting with FFmpeg stderr output

This will help identify performance bottlenecks and hanging issues
during video playback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 16:09:02 -05:00
Stu
998b76cefd Hide playlist by default - make fullscreen video player the default view
Changed playlist visibility from auto-showing when multiple videos
to hidden by default. Users can toggle it with the menu (☰) button.

This gives a cleaner video player experience without the playlist
taking up screen space.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 12:40:33 -05:00
Stu
eb2a7a4297 Fix critical bug: remove TappableOverlay that was blocking all button clicks
The TappableOverlay was added to the entire stage container, which
made it cover the video AND all control buttons below. This invisible
overlay intercepted all mouse events, preventing buttons from working.

Temporarily disabled the overlay to restore button functionality.
Will need to reimplement properly as floating controls that only
overlay the video area, not the UI controls.

Fixes:
- Play/pause button now clickable
- Volume controls now work
- All other UI buttons functional
- Keyboard shortcuts (Space, F11, ESC) still work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 12:30:28 -05:00