Version 4 (modified by meddle, 16 years ago) (diff) |
---|
Analysis
(Give as much as possible of the needed information for designing and implementing the task in the following sections.)
Overview
Sophie needs to work with large resources some of which bigger than 50MB. There is problems loading large video and audio file so we need to change the loading of resources with big data.
Task requirements
- Created a special BinData that can contain link to a file and reads only requested parts of it.
- When the user opens big files for resources containing BinData ask the user if he/she wants to link the file or automatically link the file if it is too large.
- If the file is smaller than ? MB automatically embed it.
- If the file is between ? MB and ? MB ask the user if he/she wants to link or embed it.
- If the file is bigger than ? MB automatically link it.
- Create special dialog for user interaction for large files or modify the file dialog if possible.
- Create BinData that can link every type of URL (optional, hard because there could be no API that can do that).
- Ask the user if he/she wants to copy the file in special directory that can be transferred with the book. (optional, hard due to relative paths).
- That will work only with files saved on the file system.
- Think of working with large resources on the server (optional, that is different task, but if there is time there could be done something).
Task result
The result of this task will be source code.
Implementation idea
- Make the current BinData abstract class that has two extenders:
- EmbeddedBinData (working as the current one)
- FileBinData (linking files).
- Make the FileBinData#getSub method to read from it's file with random access.
- First it will seek to the wanted position in the file.
- Then it will return a new BinData containing only the bytes from the passed position with length, the passed one.
Related
S2S_LARGE_RESOURCES_R0?
NFR_VIDEO_PERFORMANCE_R0?
How to demo
- Run Sophie.
- In the insert menu click on "insert video..."
- Insert big video file (40-50MB or bigger).
- Try to play it. It should play if the format is supported.
- Run Sophie.
- In the insert menu click on "insert video..."
- Insert average video (between ? MB and ? MB)
- You should be asked if you want to link or embed the video.
- Try to play the video. It should play if the format is supported.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)