JMF Study Notes

Source: Internet
Author: User

JMF Brief IntroductionJMF and java media framework. JMF are APIs used to process multimedia resources (audio, video, etc.) in Java. This extension package provides Multimedia Resource playback, transmission, encoding and decoding functions. JMF framework structure: JMF Architecture  Time ModelThe time object represents a time point, accurate to one thousandth of a million (nanosecond ). The clock interface defines basic scheduled and synchronous operations to control the performance of multimedia data. Timebase is similar to the Z oscillator of the watch. The mediatime of clock records the current time pointer of media data. Clock InterfaceController, player, and processor implement this interface. Each clock contains a timebase, which serves as a time source and misses a Z oscillator. ManagerBy using intermediary objects called managers, JMF makes it easy to integrate new implements of key interface that can be used seamlessly with existing classes. JMF uses manager as the media to integrate new implementations of key interfaces with existing JMF classes. JMF has four managers: Manager, packagemanager, capturedevicemanager, and pluginmanager. Manager, which are used to generate player, processor, datasource, and datasink. This factory method facilitates the seamless integration of new implementations into JMF, and generates objects of the same interface in a unified manner. Packagemanager maintains JMF class registration. Capturedevicemanager maintains registration of available audio input devices. Pluginmanager maintains the registration of available audio processing components in JMF. For example, multiplexer, demultiplexer, codec, effect, Renderer Event ModeNo matter when JMF object reports the current situation, a mediaevent is passed. Different event types are child classes of meidaevent. Controller objects (such as player, processor) and some control objects (such as gaincontrol) issue mediaevent. Data ModeDatasource manages the transmission of media data. It encapsulates media positioning information, transmission protocols, and transmission software. Once datasource is created, it cannot be used to transmit other media data. Use JMF medialocator or URL to identify datasource. Medialocator is similar to a URL. However, even if the protocol handle is not installed in the system, medialocator can still be created, but the URL cannot. A datasource can manage a set of sourcestream objects. The standard datasource uses a byte array as the unit of transmission. Buffer datasource uses a buffer object as the transmission unit. JMF has many datasource types. Datasource is divided into two types by transmission control method: pull and push. JMF defines two special datasource types: cloneable datasource and merging datasource. Cloneable datasource is created through manager. createcloneabledatasource (datasource source. Cloneable datasource is associated with its source and clone body. Merging datasource is created through manager. createmergingdatasource (datasource. Used to synthesize sourcestream from multiple datasource. Its Content-Type: Application/mixed-media. Data FormatsFormat describes the format of media data. ControlsThe JMF class implements the controls interface and provides control objects to modify and query their attributes. Many JMF classes provide control, such as controller, datasource, datasink, and plug-ins for operations on them. Ui componetsControl also provides visual components to control JMF objects. Example: Control. getcontrolcomponent (), player. getvisualcomponent (), player. getcontrolpanecomponent () ExtensibilityScalability. See JMF Guide/understanding JMF, jmf2_0-guide-html/jmfarchitecture.html PresentationMedia performance. JMF controller defines the media performance mechanism and main stages. The controller sends a mediaevent notification controllerlistener when the status is changed. Jmf api defines Controller: Player and processor in 2. They are all created from a data source and cannot be reused by other media resources. PlayerPlayer reads and renders the media data stream. A datasource is used to transmit input media streams. The output target of the rendering result depends on the format of the media stream. 6 states of player  Player acquisitionUse the factory Method Manager. createplayer () and manager. createrealizedplayer () to obtain the corresponding Media Resource player. Player related eventsTransitionevent: Enter realizing or prefetching status realizecompleteevent, exit realizing status prefetchcompleteevent, and exit prefetching status. Startevent to enter the stated status. Endofmediaevent: stopbyrequestevent after playing the video. Call stop () to stop the media play deallocateevent. After deallocate () is called, the resources are released and controllercloseevent is called. After close () is called ProcessorExtends player ControllereventChange Notification events, such as ratechangeevent, durationupdateevent, formatchangeeventtransitioneventscontrollercloseevent, controllererrorevent JMF resources:L JMF home page, http://www.javasoft.com/jmfl JMF spec, http://java.sun.com/products/java-media/jmf/2.1.1/specdownload.htmll JMF-Supported file format, http://java.sun.com/products/java-media/jmf/2.1.1/formats.htmll JMF 2.1.1 solutions (code sample and apps), http://java.sun.com/products/java-media/jmf/2.1.1/solutions/l sun developer forums/JMF forum area, http://forum.java.sun.com/forum.jspa? Forumid = 28l exporing temporal media and JMF, http://lipas.uwasa.fi /~ KSA/MM/mediatem.htm VODVideo-on-Demand, VOD Pull ProtocolData converter initialization and control on the client, e.g., HTTP, file Push ProtocolThe server initializes the data converter to control the transmission of data streams, such as e.g., RTP, and SGI mediabase.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.