How wangqr/aegisub works
Main Components Identification
The system should be divided into these major components:
a. Core Components:
• Subtitle Engine (libaegisub/ass/*)
• Audio System (src/audio_*)
• Video System (src/video_*)
• User Interface (src/* UI-related files)
• Automation System (automation/*)
b. Supporting Components:
• File I/O (libaegisub/common/*)
• Character Encoding (libaegisub/common/charset*)
• Scripting Engine (LuaJIT integration)
• Spellchecking System (src/spellchecker*)
Component Relationships
[User Interface Layer]
• ↑↓
[Core Controllers]
• ↑↓
[Processing Layer]
• ↑↓
[Provider Layer]
• ↑↓
[External Libraries]
Detailed Component Breakdown
a. User Interface Layer (Purple):
• Main Frame (src/frame_main)
• Dialogs (src/dialog_*)
• Visual Tools (src/visual_tool_*)
• Grid Interface (src/grid_*)
b. Core Controllers (Blue):
• Subtitle Controller (src/subs_controller)
• Audio Controller (src/audio_controller)
• Video Controller (src/video_controller)
• Project Manager (src/project)
c. Processing Layer (Green):
• ASS Parser/Writer
• Audio Processors
• Video Processors
• Automation Engine
d. Provider Layer (Orange):
• Video Providers (FFMS2, Avisynth)
• Audio Providers
• Subtitle Providers
• Spellcheck Providers
e. External Libraries (Gray):
• wxWidgets
• Boost
• FFmpeg
• libass
• LuaJIT
Data Flow Indicators
• Subtitle data flow
• Audio/Video stream flow
• User input flow
• Automation script execution flow
Cross-Platform Elements
Platform-specific implementations:
• Windows-specific (src/windows/*)
• Unix-specific (src/unix/*)
• macOS-specific (src/osx/*)
Implementation Notes
Notes for:
• Build system integration (CMake/autoconf)
• Plugin architecture
• Scripting interface
• Resource management
• Rectangles: Core components
• Rounded rectangles: UI elements
• Hexagons: External dependencies
• Diamonds: Decision points
Remember to maintain a balance between detail and clarity, focusing on the architectural relationships while avoiding overwhelming detail at the implementation level.
This design should reflect Aegisub's modular architecture while showing how components interact to provide subtitle editing functionality across different platforms.