1 / 29

Java Media Framework JMF

Java Media Framework JMF. Application program interface API JMF API 2.0. JMF API 2.0. Allows Java programmers to incorporate time based media Support applications and applets Developed by Sun, IBM and SGI Plug-in API to extend JMF functionality Downloadable library module. Design Goals 1.

mia-welch
Download Presentation

Java Media Framework JMF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Media Framework JMF Application program interface API JMF API 2.0

  2. JMF API 2.0 • Allows Java programmers to incorporate time based media • Support applications and applets • Developed by Sun, IBM and SGI • Plug-in API to extend JMF functionality • Downloadable library module

  3. Design Goals 1 • Easy to program • Supports media data capture • Enables development f streaming and conferencing applications in Java • Integrates with existing frameworks • Provides access to raw data • Compatible with JMF 1.0

  4. Design Goals 2 • Enables the development of custom, downloadable, demultiplexers, codecs, effects processors, multiplexers and renderers • Use real time transport protocol RTP • RTP enables Tx and Rx of real-time of media streams across a network

  5. Streaming Media • Supports RTP session manager • Important modules • Javax.media.rtp • Javax.media.event • Javax.media.rtp • Javax.media.rtp.rtcp

  6. Useful JMF links • http://java.sun.com/java-media/jmf/ • www.software.ibm.com/net.media/ • JMF functions • MediaPlayer – plug-ins for media streams • Processor – converts media stream formats • Server – stream live data and files

  7. JMF basic operation • Time based media • Input • Process • Output • Streaming media from – local files, acquired across a network, captured from a camera or microphone

  8. Media locator • Media File • Type identification - audio • Format – wav • Media locator – identify media location when URL cannot be used • URL may be used if protocols installed and network enabled

  9. Media Stream Types • Pull – initiated from client side, http and file • Push – server initiates data transfer RTP push protocol for streaming data • Media types all have different requirements • CPU load and bandwidth

  10. Media Stream Types • Formats CPU load Bandwidth • H261 Low Medium • H263 Medium Low • JPEG Low High • A number of factors to be taken int account

  11. Building blocks 1 • Multiplexer – merges tracks • Demultiplexer – demerges tracks • Framerate – typical 30 frames per sec • Codecs – perform compression and decompression • Codecs may be chained • Effects filter – echo or blur normally applied to raw data

  12. Building blocks 2 • Renderer – audio sent to sound card and video to vdu screen • Capture devices • Still camera – pull source • Live stream – push source (microphone) • Output – raw or processed • Raw – high data rate • Processed – loads CPU

  13. Capture Controls • Main control • Data rates • Encoding type • Start • Stop

  14. High level JMF architecture • 1 JMF presentation and processor API • 2 JMF plugins • 3 JMF low level modules • Demultiplexers • Codecs • Effects • Multiplexer • Renderer

  15. Time Object • Specifies time in nano seconds • Clock orivides timing and basic synchronisation • MediaTime = MediaStartTime + • Rate(TimeBaseTime – TimeBaseStartTime) • Rate 1.0 normal rate forward • Rate -1.0 run backwards • Rate 2.0 fast forward

  16. Managers 1 • Manager handle the construnction of players and processors • Package manager – maintains registry of Players, Processors, DataSources and DataSinks • Cature Device Manager – maintains registry of avaible capture devices

  17. Managers 2 • PlugInManager – manages registry for • multiplexers, • demultiplexers (demux), • codecs, • effect and • renderer (objects)

  18. Event model • Events are created by Players and Processors • Event model • Strutured event reporting model • State of the media system .e.g. • Out of data • Resource unavailable

  19. Listener interface • Register listener class with addListener() method

  20. Data Model • Media locator • URL if protocol installed • Datasource manager transfers media • DataSource BufferedDataSource allows for latency in network • Pull or push • Disable reverse option if media from remote server

  21. Control 1 • Important controls • Gain • Start/Stop • Monitor control – preview media during capture • Bitrate • Framerate • Frameposition • Portcontrol • Quality control

  22. User Interface Components • Interface uses AWT component • Methods • getVisualComponent • getControlPanelComponent

  23. Extensibility • Extend system with plug-ins • 1 - K lite codec pack • 2 – XP codec pack • Link • http://www.free-codecs.com/download/K_Lite_Codec_Pack.htm

  24. Player States • Primary States • Stopped and started • Stopped (standby states) • Unrealized – media unknown • Realizing – acquire resources • Realized – hardware (audio card) • Prefetching – preload data ready to play • Prefetched – change rates • and configure buffers

  25. Real-Time Transport Protocol • End to end networ delivery services for the tranmissin of real-time data. • Defined in IETF RFC 1889 • RTP is transport independent • Is often used over UDP • Unicast and multicast modes • RTCP – real time control protocol

  26. RTP Protocol Stack • Real time media framework applications • Real time control protocol RTCP • Real time transport protocol RTP • UDP and IP

  27. RTCP • RTCP – enables the programmer to monitor the quality of the data distributon • RTCP also provides control and identifcatoin mechanisms for RTP transmission • RTP may also be used over resource reservation protocol

  28. Example Source Code • Applet • JavaMediaPlayerApplet.java • TVApplet.java • Applications • AVTransmit2.java • AVReceive2.java

  29. JMStudio • Java Media Studio • Player and • Server • Unicast • File IP address port number • File.ext 157.228.x.y 4444 • Multicast • File.ext 224.0.0.1 4444 • Portnumber must be even

More Related