wiki:MEDIA_ENGINE_IMPL_MAIN_R0

Version 14 (modified by nenko, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=MEDIA_ENGINE_IMPL_MAIN_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

The media engine is responsible for rendering audio and video. Write a module that implements the video and audio interfaces found in org.sophie2.main.media.fobs.

Audio should play regardless of whether it is being used by a scene or not. Video does not render directly to the screen. Instead the frame should be grabbed from the Player in order for the scene to display it.

It seems as if JMF is a good place to start for implementing the engine. Start by looking at:

http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html#what

You will also create an extension point that wraps the class and provides a mechanism for the scene to get the audio or video handler.

Task requirements

  • Write a module for media playback
  • Start with JMF
  • Expose an extension point for access to the handlers
  • Implement the Interface found in org.sophie2.main.media.fobs
  • Force the scene to repaint on playing. The grabbing of the frame should happen by equal intervals.

Task result

The result of this task is source code.

Implementation idea

  • Note that JMF can only do mp3 on windows, so we need to figure out what to do about this because supporting mp3 is important for other platforms as well.

MEDIA_ENGINE_IMPL_COMMON_R0

How to demo

  • Insert a video frame and watch the video.
  • It should play smoothly.

Design

The implementation so far has the following design:

  • there is a module named - org.sophie2.base.media, which defines the model for the media and two extension points - one for Video and one for Audio

source:trunk/sophie2-platform/doc/uml-design-diagrams/mediaBase.png

  • MediaInfo is the class which holds meta data for the media
  • MediaState describes the current state of the media - is it playing, what is the volume, etc.
  • MediaSource defines the source for the media - is has an URL and media data which is binary *there is a module named - org.sophie2.main.media.fobs, which add two extension for the presently described extension points - one for Video and one for Audio. The engine used is JMF

source:trunk/sophie2-platform/doc/uml-design-diagrams/mediaFobs.png

Since repainting the scene by grabbing the current frame from the player should be forced we should add a Timer which will repaint the SimpleSceneVisual's swing component if the there is a video content in this scene.

Implementation

(Implementation results should be described and linked here (from the wiki or the repository))

Testing

Comments

Alex, http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html#what might be a good place to start? - Steve

desc("making the main engine better ")

Is this task about rendering media, such as video and audio? How should it work with scenes and content objects?

Publish extension for playing video handler and audio handler

org.sophie2.main.media.fobs is the interface for the engine

audio should play even if grab frames is not called

wrap jmf class in an extension and publish it

Attachments