wiki:SCENE_VIDEO_POINT_R0
Last modified 3 years ago Last modified on 02/26/09 20:00:44

Ticket Summary Owner Status Type Component Priority Effort Importance
#272 SCENE_VIDEO_POINT_R0 Tanya closed planned_task BASE_SCENE 3 0.5 20

Reported by Astea, 4 years ago.

Description

wiki page: SCENE_VIDEO_POINT_R0 - effort: 0.5d

Analysis_owners

pap

Analysis_reviewers

peko

Analysis_score

3

Design_owners

alex

Design_reviewers

tanya

Design_score

3

Imp._owners

alex

Imp._reviewers

pap

Imp._score

3.5

Test_score

0

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.

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

trunk/sophie2-platform/modules/org.sophie2.main.media.fobs/src/test/java/org/sophie2/main/media/fobs/TestAudioVideo.java?rev=749

Comments

Log

Analysis: Pap - done(15m)
Review: Peko 3 - OK.
Design:
Implementation:
Testing:
Comments: