Analysis
Overview
The video extension point of a scene is the one responsible for the playing of video.
Task requirements
- Define the way video content is connected to the scene.
- Adapt existing video functionallity to the model.
Task result
The result of this task should be source code.
Implementation idea
- The video may be represented as a stream that should be played by the concrete implementors.
Related
How to demo
- Describe how will the scene interact with video content.
Design
- Create org.sophie2.main.media.fobs module
- Create interface VideoEngine which is used for video content management. It has The following methods :
- boolean play(VideoHandler video)
- boolean stop(VideoHandler video)
- boolean seek(VideoHandler video, !Time time)
- boolean registerHandler(VideoHandler video)
- boolean unregisterHandler(VideoHandler video)
- Time getDuration(VideoHandler video)
- Time getPosition(VideoHandler video)
- boolean isPlaying(VideoHandler video)
- BufferedImage grabFrame(VideoHandler video);
- Create class JMFVideoEngine which implements VideoEngine interface (the extension point interface) and provides implementation for all its methods. The idea is that it registers VideoEngine and keep them mapped with their respective JMFPlayers and it plays the video files associated with the VideoHandlers (through URLs);
- Create interface VideoHandler which has only one method URL getSource();
- Create class JMFVideoHandler which implements VideoHandler and has one property source of type URL which stores the URL to an video file and has get/set methods.
- The demo test org.sophie2.main.media.fobs.TestAudioVideo.java tests creating VideoHandler, VideoEngine, registering/unregistering the VideoHandler with the VideoEngine, the play and stop methods, and the grabFrame() method;
Implementation
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/JMFVideoEngine.java?rev=746
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/JMFVideoHandler.java?rev=704
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/VideoEngine.java?rev=748
trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/main/java/org/sophie2/main/media/fobs/VideoHandler.java?rev=748
Testing
Comments
Log
Analysis: Pap - done(15m)
Review: Peko 3 - OK.
Design:
Implementation:
Testing:
Comments: