JMF Guide - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

JMF Guide

Description:

Java Media Framework is an API which enables Java applications/applets to work ... File Formats: WAV, MP3, AU, AIFF, MOV, VIV, AVI, RTP ... – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 16
Provided by: Muha4
Category:
Tags: jmf | aiff | codecs | guide

less

Transcript and Presenter's Notes

Title: JMF Guide


1
JMF Guide
  • CSC 461/CSC 561 Multimedia Systems
  • Jan 09

2
Introduction
  • Java Media Framework is an API which enables Java
    applications/applets to work with time-based
    audio and video files/streams.
  • Latest Version 2.1.1 implemented by Sun and IBM.

3
Introduction
  • Binaries of this API is available as cross
    platform and OS dependent.
  • It is best to use OS dependent.

4
Capabilities
5
Capabilities
  • Format support
  • File Formats WAV, MP3, AU, AIFF, MOV, VIV, AVI,
    RTP
  • Audio Codecs PCM, ADPCM, Mu-Law, GSM, G.723
  • Video Codecs Cinepak, H.263

6
Basics Time Model
7
Basics Data Model
8
Basics Controls
9
Players States
  • Unrealized
  • Realizing
  • Realized
  • Pre-fetching
  • Pre-fetched
  • Started

10
Processor
11
Controlling Media Playback
  • Set/Get Rate
  • Set/Get time
  • Duration

12
Player Applet
  • import java.applet.
  • import java.awt.
  • import java.net.
  • import javax.media.
  • public class PlayerApplet extends Applet
    implements ControllerListener
  • Player player null
  • 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)

13
Player Applet
  • public void start()
  • player.start()
  • public void stop()
  • player.stop()
  • player.deallocate()
  • public void destroy()
  • player.close()
  • public synchronized void controllerUpdate(Contro
    llerEvent event)
  • if (event instanceof RealizeCompleteEvent)
  • Component comp
  • if ((comp player.getVisualComponent()) !
    null)
  • add ("Center", comp)
  • if ((comp player.getControlPanelComponent())
    ! null)
  • add ("South", comp)
  • validate()

14
Useful Links
  • Download http//java.sun.com/javase/technologies/
    desktop/media/jmf/2.1.1/download.html
  • Documentation http//java.sun.com/javase/technolo
    gies/desktop/media/jmf/reference/docs/index.html
  • Code Samples http//java.sun.com/javase/technolog
    ies/desktop/media/jmf/reference/codesamples/index.
    html

15
Useful Links
  • Guide http//www.cdt.luth.se/johank/smd151/jmf/j
    mf2_0-guide.pdf
  • JMF Movie Player http//rsbweb.nih.gov/ij/plugins
    /jmf-player.html
  • More Code Samples http//jan.newmarch.name/intern
    etdevices/jmf/lecture.html
Write a Comment
User Comments (0)
About PowerShow.com