Java™ Media Framework API Guide

Total Page:16

File Type:pdf, Size:1020Kb

Java™ Media Framework API Guide i Javaª Media Framework API Guide November 19,1999 JMF 2.0 FCS ii JMF API Guide iii 1998-99 Sun Microsystems, Inc. 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A. All rights reserved. The images of the video camera, video tape, VCR, television, and speakers on page 12 copyright www.arttoday.com. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227-14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-1(a). The release described in this document may be protected by one or more U.S. patents, foreign patents, or pending applications. Sun, the Sun logo, Sun Microsystems, JDK, Java, and the Java Coffee Cup logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. THIS PUBLICATION IS PROVIDED ÒAS ISÓ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. iv JMF API Guide Contents Preface . .xiii About JMF. xiii Design Goals for the JMF API . xiv About the JMF RTP APIs . xv Design Goals for the JMF RTP APIs. xvi Partners in the Development of the JMF API . .xvii Contact Information . .xvii About this Document . .xvii Guide to Contents . .xvii Change History . xix Comments . xx Part 1: Javaª Media Framework . .1 Working with Time-Based Media . .3 Streaming Media . 4 Content Type . 4 Media Streams . 4 Common Media Formats . 5 Media Presentation . 7 Presentation Controls . 7 Latency . 7 Presentation Quality. 7 v vi JMF API Guide Media Processing . .8 Demultiplexers and Multiplexers . .9 Codecs . .9 Effect Filters . .9 Renderers . .9 Compositing . .9 Media Capture . .10 Capture Devices. .10 Capture Controls . .10 Understanding JMF . 11 High-Level Architecture . .11 Time Model. .13 Managers. .14 Event Model . .15 Data Model . .16 Push and Pull Data Sources . .17 Specialty DataSources . .18 Data Formats . .19 Controls. .20 Standard Controls . .20 User Interface Components . .23 Extensibility . .23 Presentation . .24 Players . .25 Player States . .26 Methods Available in Each Player State. .28 Processors . .29 Presentation Controls . .29 Standard User Interface Components . .30 Controller Events. .30 Processing . .32 Processor States . .33 Methods Available in Each Processor State. .35 Processing Controls. .36 Data Output . .36 vii Capture . 37 Media Data Storage and Transmission. 37 Storage Controls . 37 Extensibility . 38 Implementing Plug-Ins . 38 Implementing MediaHandlers and DataSources. 39 MediaHandler Construction . 39 DataSource Construction . 42 Presenting Time-Based Media with JMF . .43 Controlling a Player. 43 Creating a Player. 44 Blocking Until a Player is Realized. 44 Using a ProcessorModel to Create a Processor . 44 Displaying Media Interface Components . 45 Displaying a Visual Component. 45 Displaying a Control Panel Component . 45 Displaying a Gain-Control Component. 46 Displaying Custom Control Components. 46 Displaying a Download-Progress Component. 47 Setting the Playback Rate. 47 Setting the Start Position . 48 Frame Positioning . 48 Preparing to Start . 49 Realizing and Prefetching a Player. 49 Determining the Start Latency . 50 Starting and Stopping the Presentation. 50 Starting the Presentation . 50 Stopping the Presentation . 50 Stopping the Presentation at a Specified Time . 51 Releasing Player Resources . 52 Querying a Player . 53 Getting the Playback Rate . 53 Getting the Media Time . 53 Getting the Time-Base Time . 54 Getting the Duration of the Media Stream . 54 viii JMF API Guide Responding to Media Events . .54 Implementing the ControllerListener Interface . .54 Using ControllerAdapter . .55 Synchronizing Multiple Media Streams . .56 Using a Player to Synchronize Controllers . .57 Adding a Controller . .58 Controlling Managed Controllers . .58 Removing a Controller . .59 Synchronizing Players Directly . .60 Example: Playing an MPEG Movie in an Applet. .61 Overview of PlayerApplet . .62 Initializing the Applet. .64 Controlling the Player. .65 Responding to Media Events . .66 Presenting Media with the MediaPlayer Bean . .66 Presenting RTP Media Streams . ..
Recommended publications
  • Steps for Downloading And/Or Installing Java SE 7, the JMF, Apache Tomcat & Eclipse
    Steps for Downloading and/or Installing Java SE 7, the JMF, Apache Tomcat & Eclipse Java SE 7 The download instructions below refer to the latest version of the Java Standard Edition (Java SE), which (at the time of writing) is Java SE 7 Update 5. The Java SE Development Kit (JDK) includes the Java Runtime Environment (JRE) and command-line development tools. It is actually the JDK that you are downloading, but we shall be referring only to the Java SE. 1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html. 2. Click on the Download button underneath JDK, which is to the right of the text heading showing the latest version of Java. 3. In the table heading halfway down the page, click on the radio button to accept the licence agreement. 4. Click on the filename that appears alongside Windows x86. (This should have the format jdk- 7u<Update version>-windows-i586.exe, where <Update version> is replaced with a number that is either 5 or one slightly higher. 5. Click on the Save button and navigate to a suitable location for the download file (probably the top level of your drive C) and then click the next Save button. (File takes up 87.95MB or more.) 6. After downloading to a suitable location, click on the Open Folder button. 7. Double-click on the executable file that has either been downloaded or been copied from the CD. 8. Click on the Run button. 9. Click on the Next> button (when it becomes available). 10.
    [Show full text]
  • Media Rate Allocation
    MEDIA RATE ALLOCATION A PROJECT REPORT Submitted by P.BALASUBRAMANIAN (32205205004) R.VIGNESWARAN (32205205302) in the partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY In INFORMATION TECHNOLOGY DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY: Mamallapuram ANNA UNIVERSITY: CHENNAI 600025 APRIL 2009 1 ANNA UNIVERSITY: CHENNAI 600 025 BONAFIDE CERTIFICATE Certified that this project report “MEDIA RATE ALLOCATION” is the bonafide work of “P.BALASUBRAMANIAN (32205205004), R.VIGNESWARAN (32205205302)” who carried out the project work under my supervision. SIGNATURE SIGNATURE Ms.D.Jansi Rani Ms.T.Yogeswari HEAD OF THE DEPARTMENT SUPERVISOR Department of Information Technology Department of Information Technology Dhanalakshmi Srinivasan Dhanalakshmi Srinivasan College of Engineering and Technology, College of Engineering and Technology, Mamallapuram. Mamallapuram. Submitted for the project viva voce examination held on ____________ INTERNAL EXAMINER EXTERNAL EXAMINER 2 ACKNOWLEDGEMENT We are glad to take this opportunity to cordially acknowledge a number of people who provide me with great support in these six months. First, we would like to thank Mr.A.Srinivasan, our Chairman who allowed me to do the project in the college campus. We are also thankful to Dr.R.Ponraj M.Tech Ph.D., our Principal, for his constant support in selecting the project. We wish to express my sincere gratitude to our respected Vice Principal, Mr.Pon.Arivanandham M.E, PhD., for his continued encouragement and support. We are grateful to Lecturer Ms.D.Jansi Rani M.Tech., our Head of the Department, who expressed her interest in my work and supplied me with some of her recent works. We would like to thank Lecturer Ms.T.Yogeswari B.E., for following my project with interest and for giving me constant support.
    [Show full text]
  • Javafx Strengths and Weaknesses
    JavaFX: Current Status; Strategic and Tactical Outlook Document Extract Summary of JavaFX (Mobile) Strengths and Weaknesses as of March 2009 Killer Strengths Comments DSL productivity Terse code; reflective of intent. Considerably easier to maintain than Java equivalent. Java integration Seamless integration enables existing libraries to be leveraged very efficiently. Bind (the killer keyword) Results in extremely succinct code (in comparison to Java.) Key-frame animation Used wisely, animation can significantly increase the quality of the end- user experience. Can also be used for programming (simple) games. In combination with “bind”, key-frame animations can now be constructed easily and intuitively. Java2D effects Effects can improve the look of an application substantially and are now very quick and easy to use. Multimedia Multimedia is finally (!) easy to integrate in an application. Designer / developer Graphical designers and software developers can work efficiently workflow together using JavaFX Plugins for Photoshop / Illustrator. However, more experience is required to seriously test the viability and scalability of this approach. Light-weight access to RESTful Web-service invocation now requires very little code. Call is web services automatically handled asynchronously although the developer must manage asynchronous handling of time-consuming processing. Light-weight XML parsing Especially powerful in conjunction with web-services. Reuse potential across The rule here is: Develop for mobile from the outset! Then, in a new desktop/mobile project, make whatever enhancements are necessary for the desktop version. Potential Killer Strengths Comments 3D Promised for later this year, this feature will almost certainly wrap the Java3D API. But how will it perform under JavaME? TV Promised for later this year, this feature will presumably build on JSR927 Killer Weaknesses Comments Widgets JFX text field of limited use.
    [Show full text]
  • High Level Architecture Framework
    Java Media Framework Multimedia Systems: Module 3 Lesson 1 Summary: Sources: H JMF Core Model H JMF 2.0 API Programmers m Guide from Sun: Architecture http://java.sun.com/products/java-media/jmf/2.1/guide/ m Models: time, event, data H JMF 2.0 API H JMF Core Functionality H JMF White Paper from IBM m Presentation http://www- 4.ibm.com/software/developer/library/jmf/jmfwhite. m Processing html m Capture m Storage and Transmission H JMF Extensibility High Level Architecture H A demultiplexer extracts individual tracks of media data JMF Applications, Applets, Beans from a multiplexed media stream. A mutliplexer performs the JMF Presentation and Processing API opposite function, it takes individual tracks of media data and merges them into a single JMF Plug-In API multiplexed media stream. H A codec performs media-data Muxes & Codecs Effects Renderers Demuxes compression and decompression. Each codec has certain input formats that it can handle and H A renderer is an abstraction of a certain output formats that it can presentation device. For audio, the generate presentation device is typically the H An effect filter modifies the computer's hardware audio card track data in some way, often to that outputs sound to the speakers. create special effects such as For video, the presentation device is blur or echo typically the computer monitor. Framework JMF H Media Streams m A media stream is the media data obtained from a local file, acquired over the network, or captured from a camera or microphone. Media streams often contain multiple channels of data called tracks.
    [Show full text]
  • JCP at Javapolis 2007
    Javapolis News ❙ 14 December 2007 ❙ Nr 5 ❙ Published by Minoc Business Press 54 www.nonillion.com Parleys Want to become a NONILLIONAIRE ? mail us at : [email protected] Building Rich Internet Applications with Flex and JavaFX “There’s a well thought out com- an online environment using Adobe AIR. “Even when you ponent model for Flex”, he said. are offl ine, you still can update data. When the connec- “And there’s a thriving market tion comes back on, the system synchronizes automati- for components out there, both cally.” Open Source and commercial. So there are literally hundreds JavaPolis founder Stephan Janssen was next to explain of components available to how he decided to have Parleys.com rewritten using Flex. use in Flex.” And no, Flex isn’t Parleys.com offers a massive amount of Java talks – from there for fun and games only. JavaPolis, JavaOne and other Java events from all over “There are already a great the world – combining video images with the actual pres- number of business applica- entation slides of the speakers. Janssen programmed the tions running today, all built application for fun at fi rst, but with over 10 TB of streamed with Flex.” Eckel backed up video in just under a year, it’s clear Parleys.com sort of his statement with an ex- started to lead its own life. “The decision to write a new ample of an interface for an version was made six months ago”, he said. “It was still intranet sales application. too early to use JavaFX. And Silverlight? No thanks.” “Some people think Flex Flex allowed him to leverage the Java code of the earlier isn’t the right choice to version of Parleys.com and to resolve the Web 2.0 and make for business applica- AJAX issues he had en- countered while programming tions, because the render- the fi rst version.
    [Show full text]
  • Using the ELECTRIC VLSI Design System Version 9.07
    Using the ELECTRIC VLSI Design System Version 9.07 Steven M. Rubin Author's affiliation: Static Free Software ISBN 0−9727514−3−2 Published by R.L. Ranch Press, 2016. Copyright (c) 2016 Static Free Software Permission is granted to make and distribute verbatim copies of this book provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this book under the conditions for verbatim copying, provided also that they are labeled prominently as modified versions, that the authors' names and title from this version are unchanged (though subtitles and additional authors' names may be added), and that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this book into another language, under the above conditions for modified versions. Electric is distributed by Static Free Software (staticfreesoft.com), a division of RuLabinsky Enterprises, Incorporated. Table of Contents Chapter 1: Introduction.....................................................................................................................................1 1−1: Welcome.........................................................................................................................................1 1−2: About Electric.................................................................................................................................2 1−3: Running
    [Show full text]
  • Design of a Distributed Architecture for Enriching Media Experience in Home Theaters
    Design of a distributed architecture for enriching media experience in home theaters Citation for published version (APA): Hu, J. (2006). Design of a distributed architecture for enriching media experience in home theaters. Technische Universiteit Eindhoven. https://doi.org/10.6100/IR611954 DOI: 10.6100/IR611954 Document status and date: Published: 01/01/2006 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal.
    [Show full text]
  • Puneet Lakhina
    PUNEET LAKHINA 1. PERSONAL INFORMATION • Address: 182 Kailash Hills,Near East of Kailash, New Delhi – 10065, India • E-Mail: [email protected] • Phone: 00919818069803 2. AREAS OF INTEREST Distributed Systems, Peer to Peer Systems, Software Engineering, Information Retrieval, Computer Networks, Databases. 3. EDUCATION • Bachelor of Technology in Information Technology, Vellore Institute of Technology University, November 2006 CGPA: 9.23 Scale: 10 Rank: 5th (Class Strength: 65) 4. ACADEMIC INTERNSHIPS/FELLOWSHIPS • Position: Project Trainee (January 2006 – May 2006) Institution: Kanwal Rekhi School of Information Technology, Indian Institute Of Technology Bombay Mentor: Dr. Deepak. B. Phatak • Position: Summer Intern (June 2005-August 2005) Institution: Kanwal Rekhi School of Information Technology, Indian Institute Of Technology Bombay Mentor: Dr. Deepak B. Phatak 5. PROFESSIONAL WORK EXPERIENCE • Position: Associate System Engineer (June 2006 – Present) Institution: IBM India Private Limited. 6. PROJECTS • Virtualization: Executed at: IBM India Pvt. Ltd Team Size: 25 Abstract: Virtualization is a SOA based platform, that allows integration of multiple type of bearers (USSD, Web, SMS, IVR, Kiosk etc.) with service platform (network elements) providing scalable, flexible and easily configurable solutions. Virtualization is a key part of the Prepaid transformation that allows IT system to manage the increasing subscriber base (from current 45 million to projected 157 million by 2013) and can be applied for any telecom scenario. My role in the project was to manage the transport layer based on IBM Websphere MQ™ for service request processing. This involved development of a Listener Framework for allowing a business logic plugging without regard to the nature of the transport layer. I was also the lead for load testing and optimization group, whereby the performance target of 43 service requests processing per second was achieved.
    [Show full text]
  • Capabilities of the Horchow Auditorium and the Orientation
    Performance Capabilities of Horchow Auditorium and Atrium at the Dallas Museum of Art Horchow Auditorium Capacity and Stage: The auditorium seats 333 people (with a 12 removable chair option in the back), maxing out the capacity at 345). The stage is 45’ X 18’and the screen is 27’ X 14’. A height adjustable podium, microphone, podium clock and light are standard equipment available. Installed/Available Equipment Sound: Lighting: 24 channel sound board 24 fixed lights 4 stage monitors (with up to 4 Mixes) 5 movers (these give a wide array of lighting looks) 6 hardwired microphones 4 wireless lavaliere microphones 2 handheld wireless microphones (with headphone option) 9-foot Steinway Concert Grand Piano 3 Bose towers (these have been requested by Acoustic performers before and work very well) Music stands Projection Panasonic PTRQ32 4K 20,000 Lumen Laser Projector Preferred Video Formats in Horchow Blu Ray DVD Apple ProRes 4:2:2 Standard in a .mov wrapper H.264 in a .mov wrapper Formats we can use, but are not optimal MPEG-1/2 Dirac / VC-2 DivX® (1/2/3/4/5/6) MJPEG (A/B) MPEG-4 ASP WMV 1/2 XviD WMV 3 / WMV-9 / VC-1 3ivX D4 Sorenson 1/3 H.261/H.263 / H.263i DV H.264 / MPEG-4 AVC On2 VP3/VP5/VP6 Cinepak Indeo Video v3 (IV32) Theora Real Video (1/2/3/4) Atrium Capacity and Stage: The Atrium seats up to 500 people (chair rental required). The stage available to be installed in the Atrium is 16’ x 12’ x 1’.
    [Show full text]
  • (A/V Codecs) REDCODE RAW (.R3D) ARRIRAW
    What is a Codec? Codec is a portmanteau of either "Compressor-Decompressor" or "Coder-Decoder," which describes a device or program capable of performing transformations on a data stream or signal. Codecs encode a stream or signal for transmission, storage or encryption and decode it for viewing or editing. Codecs are often used in videoconferencing and streaming media solutions. A video codec converts analog video signals from a video camera into digital signals for transmission. It then converts the digital signals back to analog for display. An audio codec converts analog audio signals from a microphone into digital signals for transmission. It then converts the digital signals back to analog for playing. The raw encoded form of audio and video data is often called essence, to distinguish it from the metadata information that together make up the information content of the stream and any "wrapper" data that is then added to aid access to or improve the robustness of the stream. Most codecs are lossy, in order to get a reasonably small file size. There are lossless codecs as well, but for most purposes the almost imperceptible increase in quality is not worth the considerable increase in data size. The main exception is if the data will undergo more processing in the future, in which case the repeated lossy encoding would damage the eventual quality too much. Many multimedia data streams need to contain both audio and video data, and often some form of metadata that permits synchronization of the audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data stream to be useful in stored or transmitted form, they must be encapsulated together in a container format.
    [Show full text]
  • Digital Synthesis by Plug-In Method in Java Media Framework Environment
    Proceedings of the COST G-6 Conference on Digital Audio Effects (DAFX-01), Limerick, Ireland, December 6-8, 2001 DIGITAL SYNTHESIS BY PLUG-IN METHOD IN JAVA MEDIA FRAMEWORK ENVIRONMENT Jiri Schimmel Rostislav Fitz Department of Telecommunications Department of Computer Science and Engineering FEECS FEECS Brno University of Technology Brno University of Technology [email protected] [email protected] ABSTRACT JMF requires the appropriate input and output devices such as microphones, cameras, speakers, and monitors. This paper deals with the implementation of real-time digital Data sources and players are integral parts of JMF's high-level musical sound synthesizers by the Plug-In method in the Sun API for managing the capture, presentation, and processing of Microsystems Java Media Framework environment. This time-based media. JMF also provides a lower-level API that environment use the Plug-In technology as well as the DirectX or supports the seamless integration of custom processing VST environments, but the implementation methods are different. components and extensions. This layering provides Java developers with an easy-to-use API for incorporating time-based media into Java programs while maintaining the flexibility and extensibility required supporting advanced media applications 1. JAVA MEDIA FRAMEWORK and future media technologies. Java is object-oriented multi-platform programming language developed by the Sun Microsystems company that is used mainly for Internet applet production. The Java Media Framework (JMF) is an application programming interface (API) for incorporating time-based media into Java applications and applets. The JMF 1.0 API (the Java Media Player API) enabled programmers to develop Java programs that presented time-based media.
    [Show full text]
  • Codec Is a Portmanteau of Either
    What is a Codec? Codec is a portmanteau of either "Compressor-Decompressor" or "Coder-Decoder," which describes a device or program capable of performing transformations on a data stream or signal. Codecs encode a stream or signal for transmission, storage or encryption and decode it for viewing or editing. Codecs are often used in videoconferencing and streaming media solutions. A video codec converts analog video signals from a video camera into digital signals for transmission. It then converts the digital signals back to analog for display. An audio codec converts analog audio signals from a microphone into digital signals for transmission. It then converts the digital signals back to analog for playing. The raw encoded form of audio and video data is often called essence, to distinguish it from the metadata information that together make up the information content of the stream and any "wrapper" data that is then added to aid access to or improve the robustness of the stream. Most codecs are lossy, in order to get a reasonably small file size. There are lossless codecs as well, but for most purposes the almost imperceptible increase in quality is not worth the considerable increase in data size. The main exception is if the data will undergo more processing in the future, in which case the repeated lossy encoding would damage the eventual quality too much. Many multimedia data streams need to contain both audio and video data, and often some form of metadata that permits synchronization of the audio and video. Each of these three streams may be handled by different programs, processes, or hardware; but for the multimedia data stream to be useful in stored or transmitted form, they must be encapsulated together in a container format.
    [Show full text]