0% found this document useful (0 votes)
102 views21 pages

Java Media Framework Overview

This document provides an overview of the Java Media Framework (JMF) API. JMF is an API that allows Java programmers to incorporate time-based media like video and audio into applications. It supports streaming media, common media formats, capturing and processing media streams. The document describes JMF architecture and concepts like managers, events, data models and players. It also discusses using JMF for RTP streaming and provides an example of creating an RTP session manager and sending/receiving streams.

Uploaded by

Vinod VM
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views21 pages

Java Media Framework Overview

This document provides an overview of the Java Media Framework (JMF) API. JMF is an API that allows Java programmers to incorporate time-based media like video and audio into applications. It supports streaming media, common media formats, capturing and processing media streams. The document describes JMF architecture and concepts like managers, events, data models and players. It also discusses using JMF for RTP streaming and provides an example of creating an RTP session manager and sending/receiving streams.

Uploaded by

Vinod VM
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

JAVA Media Frame Work (API)

try By:
{ Naveen Kumar A.S
[Link]();
}
catch(Exception e) Guide:
{ } Manjula G.R [Link]

JMF API
Introduction
TM

The Java Media Framework (JMF) is an
application programming interface (API)
for incorporating time-based media into
Java applications and applets.
 JMF is intended for Java programmers
Time-based media into Applications and
supports additional media types and
perform ,custom processing and
rendering.
JMF API
Versions of JMF
 The JMF 1.0 API (the Java Media Player
API) enabled programmers to develop Java
programs that presented time-based media

 The JMF 2.0 API extends the framework to


provide support for capturing and storing
media data, controlling the type of
processing that is performed during
playback, and performing custom
processing on media data streams.
JMF API
JMF RTP API:

Provide support for RTP (Real-Time Transport


Protocol). RTP enables the transmission and
reception of real-time media streams across the
network.

JMF Programming enables following

 Working with Real-Time Media Streams.


 Receiving and Presenting RTP Media Streams.
 Transmitting RTP Media Streams.
 Importing and Exporting RTP Media Streams.

JMF API
Concepts of Time Based Media
Application
Media data that changes meaningfully
with respect to time can be characterized
as time-based media
Concepts:
Streaming Media ?
Content Type ?
Media Streams ?
Common Media Formats ?
Media Presentation ?
JMF API
Contd…
Latency ?
Presentation Quality ?
Demultiplexers and Multiplexers?
Codecs ?
Renderers ?
Media Capture?

JMF API
JMF API Architecture
 Provide Unified architecture and
messaging protocol for managing the
acquisition, processing, and delivery of
time-based media data.

 Support media content types, such as


AIFF, AU, AVI, MIDI, MPEG, QuickTime,
RMF, and WAV.

 “Write Once, Run Anywhere”

JMF API
Figure: JMF Architecture

JMF API
Concepts associated with JMF
 Managers:
Manager, PackageManager,
CaptureDeviceManager ,
PluginManager.

 Event Model :
ReceiveStreamListener,
ControllerListener.

 Data Model
DataSource: buffer data source ,
Push and Pull Data Sources
Cloneable Data Source.
Merging Data Source.

JMF API
Player

Fig :Player Model

JMF API
Player States
A Player can be in one of six states

 Unrealized
 Realizing
 Realized
 prefetching
 Prefetched
 Started
JMF API
 Processor :
Is just a specialized type of Player that
provides control over what processing is
performed on the input media stream. A
Processor supports all of the same
presentation controls as a Player.
 Data Output :
The getDataOutput method returns
data source.
Input to another Player or Processor or
as the input to a data sink.

JMF API
RTP and RTCP

 Streaming media concepts and describes


the Real-time Transport Protocol JMF uses
for receiving and transmitting media
streams across the network.

 RTP provides end-to-end network delivery


services for the transmission of real-time
data. RTP is network and transport-
protocol independent, though it is often
used over UDP.

 Multicasting using IP

JMF API
Contd..
RTP Session is established through
address and a pair of ports.
Data Port:
unique number for trans and
recv of the media packets.
Control port:
unique number for sending RTCP
stream for QOS.

RTP Participants and types.


JMF API
RTCP
Control data (RTCP) packets are sent
periodically to all of the participants in the
session.

RTCP packets can contain information


about the quality of service for the session
participants information about the source
of the media being transmitted on the
data port, and statistics pertaining to the
data that has been transmitted network.

JMF API
JMF and RTP Programming Issues
an example
[Link] media locator :

String str=”file:/c:/Geetha/Jotheyali.mp3”;
MediaLocator ml=new MediaLocator (str);

2. Creating Player:

Player playObj=[Link](ml);

To play the file which is located by the


MediaLocator through start( ) method from the
reference of Player .
JMF API

[Link]() ;
[Link] Data Source :

createDataSource( ) association with the Manager.

DataSource ds=
[Link]([Link] ());
Here getLocator( ) : get the path where that media file is
located.

[Link] Processor :

Processor’s methods like createProcessor (),


setContentType(),start() .
Contents get from processor’s Data Source through
getDataOutPut() .

Processor p=[Link](ds);
Processor contents can set by ,
JMF API

[Link](RAW);
[Link] RTP Session Manager Send and Receiving
Streams:
Server Side:

RTPSessionManager mgrSer= CreateSessionManager(String


address , int dataPort ,int controlPort);
DataSource nds=[Link](p);
[Link]( nds);

Client Side :

RTPSessionManager mgrCli= CreateSessionManager(String


address, int dataPort, int controlPort);
[Link](this);

update(ReceiveStreamListener event)
{
PullBufferDataSource pbs=[Link]();
//play out the content in the pbs
}
JMF API
Snap of JMF media application - player

C M P l ay er
N layer
NCMP

JMF API
References

[Link] API guide - [Link]

[Link] Doc - [Link]

3. JAVA How To Program - Dietel

& Dietel
JMF API
Seminar( JMF ?) throws questions ? ?
{
Thank you !!

JMF API

You might also like