|
This release includes the following JMF samples:
JMFRegistry is a standalone Java application used to configure JMF. You can use it to query and manage the list of media handlers, plugin components and capture devices. JMFRegistry is built with the Swing GUI toolkit. To run it requires Java 2 or JDK 1.1.x with Swing 1.1 or above:
java JMFRegistry For more information about how to use JMFRegistry, see the JMFRegistry Guide. To download the source code for JMFRegistry (and JMStudio):
SimplePlayerApplet is a simple applet that can be used to run a JMF
player for a particular media file. The URL for the media file is passed
in
This applet embeds the visual component and control panel component in the browser page, if they are available. The Applet tag for SimplePlayerApplet would look something like: <applet code=SimplePlayerApplet.class
width=640 height=510>
See SimplePlayerApplet.java
for source code.
JMStudio is a standalone Java application built using JMF. You can use it to play, capture, transcode, and store media data. It also supports RTP reception and transmission. To run JMStudio: 1.Set the CLASSPATH and LD_LIBRARY_PATH
as described in
Setting Up JMF.
java JMStudio If you have installed the performace packs, you can also use the JMStudio launch scripts to start the application. JMStudio can also be used as an external helper application for popular browsers. The browser will download the file and then launch JMStudio to play the multimedia content from the locally stored file. To do set up JMStudio as a helper application, edit your applications preferences in your browser, specifying JMStudio as the helper application for each media type you want to play using JMF. For more information about how to use JMStudio, see the JMStudio User's Guide. To download the source code for JMStudio (and JMFRegistry):
Export is a stripped down version of JMStudio. It allows a user to specify an arbitrary input source for transcoding. The user can specify the target data formats and output content types. The transcoded result can be sent to a file, the network or just previewing on screen. To run Export: 1.Set the CLASSPATH and LD_LIBRARY_PATH
as described in
Setting Up JMF.
java Export
The source code for Export is included in the
JMStudio source for JMF 2.1.1.
The MediaPlayer Java Bean is part of the API in the javax.media.bean.playerbean package. MediaPlayer can be instantiated directly and used to present one or more media streams. For more information on how to incorporate MediaPlayer in a java application,
see the MediaPlayer Guide.
RTPPlayerApplet is a sample applet that can play unicast, boradcast, and multicast RTP session. To run RTPPlayerApplet, you can use the AppletViewer to open the rtpclient page: appletviewer rtpclient.htmlSet the videosession, veideoport, audiosession and audioport values to the IP address and port of the RTP session you want to receive. You can turn audio or video off by setting the audio and video parameters to Off. JMF Players are created for all of the RTP streams in the session. You can use the control components to stop and start playback of the RTP streams. See RTPPlayerApplet.java
for source code.
This sample allows users to use the network transport protocol independence of JMF in RTP. Users can run RTP over any underlying transport protocol. By default, JMF uses RTP over UDP. Users running RTP over a non UDP transport, can use the RTPSocket object defined in javax.media.rtp.RTPSocket and its accompanying interfaces. The RTPSocketPlayer.java sampleapp explains the use of the RTPSocket using UDP as its underlying protocol. To use the sample, users need to change the address and port to that of their RTP session. The variables "address" and "port" (line 50) need to match those your RTP server is streaming data to. Recompile the file and run RTPSocketPlayer as java RTPSocketPlayer
See RTPSocketPlayer.java
for source code.
Plugins are used to extend the capabilities of JMF as described in the "Extending JMF" chapter of the Programmer's Guide. A few sample plugins are provided here as reference:
| |||||||||||
|
| ||||||||||||