• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Java Media Framework Matthew Mastracci
 

Java Media Framework Matthew Mastracci

on

  • 993 views

 

Statistics

Views

Total Views
993
Views on SlideShare
993
Embed Views
0

Actions

Likes
0
Downloads
29
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Java Media Framework Matthew Mastracci Java Media Framework Matthew Mastracci Presentation Transcript

    • Java Media Framework Matthew Mastracci
    • Overview
      • What is JMF?
      • Players
      • Capturing
      • Plugins
      • Codecs/Effects
      • Mux/Demux
    • What Is JMF?
      • A method for working with time-based data in Java
      • Acquisition, processing and delivery of media
      • Handles real-time or stored audio and video
    • Raw Video Capture
    • Video Stream Playback
    • Audio Stream Playback
    • JMF Data Model Controls Duration Datasource Manages SourceStream Control
    • Player
      • Player object allows easy embedding of content
      • Create widget and catch realization events
      • Heavy-weight widget
    • Player [cont’d]
      • public void init() {
      • setLayout( new BorderLayout() );
      • String mediaFile = getParameter( "FILE" );
      • try {
      • URL mediaURL = new URL( getDocumentBase(), mediaFile );
      • player = Manager.createPlayer( mediaURL );
      • player.addControllerListener( this );
      • }
      • catch (Exception e) {
      • System.err.println( "Got exception " + e );
      • }
      • }
    • Player [cont’d]
      • public synchronized void controllerUpdate( ControllerEvent event ) {
      • if ( event instanceof RealizeCompleteEvent ) {
      • Component comp;
      • if ( (comp = player.getVisualComponent()) != null )
      • add ( "Center", comp );
      • if ( (comp = player.getControlPanelComponent()) != null )
      • add ( "South", comp );
      • validate();
      • }
      • }
      Add the control panel to the bottom of the dialog Add the content to the center of the dialog
    • Player [cont’d]
      • <APPLET CODE=PlayerApplet WIDTH=320 HEIGHT=300>
      • <PARAM NAME=FILE VALUE=&quot;sprk.mpeg&quot;>
      • </APPLET>
    • Player [cont’d]
      • <APPLET CODE=PlayerApplet WIDTH=320 HEIGHT=20>
      • <PARAM NAME=FILE VALUE=&quot;etr.mp3&quot;>
      • </APPLET>
    • Capturing
      • 1. Query the CaptureDeviceManager
      • 2. Get a CaptureDeviceInfo object for the device
      • 3. Get a MediaLocator to create a DataSource
      • 4. Create a Player or Processor using the DataSource
      • 5. Start the Player or Processor
    • Capturing for Display
      • One step: use a player and a content specifier URL
      • Example: vfw://0, rtp://ip-address/type/[ttl]
    • Plugins
      • Plugins can be dynamically loaded in system
      • Add functionality to the system
      • Codecs, Effects, Mux, Demux, Renderers
      • Media handlers
    • Plugins Interface Hierarchy Plugin Codec Demux Effect Mux Renderer VideoRenderer
    • Plugin Manager
      • Use addPlugin() to add a new plug-in to the list
      • commit() updates changes to the plug-in list on disk
      • Register with the manager at install-time
    • Codecs
      • Codec interface extends Plugin
      • Codecs have input and output, modifying the content
      Codec A Data 1 Format A Data 2 Format B Codec B Data 3 Format C
    • Effects
      • Effect interface extends Codec
      • Input format of Effect is same as output
      Effect A Data 1 Format A Data 2 Format A Effect B Data 3 Format A
    • Multiplexer
      • Merges multiple streams to a single stream
      Mux Data 1A Audio Data 1B Video Data 1 Compound
    • Demultiplexer
      • Takes a single buffer and outputs to many buffers
      Demux Data 1 Compound Data 1B Video Data 1A Audio
    • MediaHandler Demux
      • Outputs multiple stream formats
      Video stream Audio stream
    • Applications of JMF
      • Teleconferencing
      • Multimedia editing/sequencing
      • Streaming multimedia web content
    • Problems with JMF
      • JMF 2.0 is still beta
      • Crashes occasionally
      • Can lock up video capture devices
      • API well documented, but usage and examples not
    • Conclusions
      • JMF is highly flexible
      • Shows a lot of promise
      • Major stability and documentation issues
      • Video For Windows (VFW) support adds great value (no need for native drivers)
      • Currently difficult to use to create a complex program
    • Issues for Discussion
      • Can JMF help propel Java into the field of multimedia display and editing?
      • Will Sun develop a Linux-native &quot;performance pack&quot; for JMF, even though Linux competes with Solaris?
      • What changes need to be made to the current beta version of JMF to make it more usable/stable when it becomes a release?