0% found this document useful (0 votes)
99 views

Working On Time Based Media Using Java: Presented By: Gaurav Kumar Srivastava

This document discusses working with time-based media using Java. It begins with an introduction to time-based media and discusses the Java Media Framework (JMF) which provides APIs for manipulating multimedia formats. It describes the JMF architecture including managers, data sources, players, processors, and data sinks. It also covers topics like building a simple applet video player, streaming media protocols like RTP, and using JMF for video conferencing applications.

Uploaded by

GAURAV
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 PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Working On Time Based Media Using Java: Presented By: Gaurav Kumar Srivastava

This document discusses working with time-based media using Java. It begins with an introduction to time-based media and discusses the Java Media Framework (JMF) which provides APIs for manipulating multimedia formats. It describes the JMF architecture including managers, data sources, players, processors, and data sinks. It also covers topics like building a simple applet video player, streaming media protocols like RTP, and using JMF for video conferencing applications.

Uploaded by

GAURAV
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 PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

WORKING ON TIME

BASED MEDIA USING JAVA


PRESENTED BY :
GAURAV KUMAR SRIVASTAVA
Company profile
Company Name:: Canon Inc.

Founded:: August 10, 1937

Headquarters:: Tokyo, Japan.

Chairman & CEO:: Fujio Mitarai

 Canon ISDC:: noida and


bangalore
Discussion topics
Time based media
Media processing model
Media framework
Jmf architecture
Jmf classes and interfaces
Applet video player
Streaming media
Streaming protocols: RTP
WHAT IS TIME BASED MEDIA?
 Any data that changes meaningfully with respect to time can
be characterized as time-based media.

 Audio clips, MIDI sequences, movie clips, and animations are


common forms of time-based media.

 Such media data can be obtained from a variety of sources,


such as local or network files, cameras,microphones, and live
broadcasts.
MEDIA PROCESSING MODEL
Media framework : its design goals

Java Media Framework (JMF) is a large and versatile API for


manipulation and processing of time-based media in Java
applications and applets.

This optional package which can capture,playback


stream,transcode multimedia formats ,extends the java 2
standard edition for multimedia developers,by providing a
powerful toolkit to develpop a scalable,cross plateform
technology.
Architecture of jmf
Jmf architecture…
Managers

DataSources

Players

Processors

DataSinks
Managers
 JMF uses four managers:

 Manager--handles the construction of Players, Processors,


DataSources, and DataSinks. This level of indirection allows new
implementations to be integrated seamlessly with JMF.

 PackageManager--maintains a registry of packages that contain


JMF classes, such as custom Players, Processors, DataSources, and
DataSinks.

 CaptureDeviceManager--maintains a registry of available capture


devices.

 PlugInManager--maintains a registry of available JMF plug-in


processing components, such as Multiplexers, Demultiplexers,
Codecs, Effects, and Renderers.
Managers..
Data Sources
 JMF media players usually use DataSources to manage the transfer of
media-content. A DataSource encapsulates both the location of media
and the protocol and software used to deliver the media.

 A DataSource is identified by either a JMF MediaLocator or a URL


(universal resource locator).

 JMF data sources can be categorized according to how data transfer is


initiated:
 Pull Data-Source--the client initiates the data transfer and controls
the flow of data from pull data-sources.
 Push Data-Source--the server initiates the data transfer and controls
the flow of data from a push data-source. Push data-sources include
broadcast media, multicast media, and video-on-demand (VOD).
Players
A Player processes an input stream of media data and renders
it at a precise time. A DataSource is used to deliver the input
media-stream to the Player.The rendering destination depends
on the type of media being presented.

Data
player
source
Processor
Specialized type of Player that provides control over
processing performed on the input media stream
Processor stages
Processor stages..
Data Storage and Transmission

Data Sink is used to read data from a DataSource and


render the media to an output destination.

Its typical actions are writing the data to a file across the
network etc..
Simple applet movie player
 Simple Java Applet that demonstrates how to create a simple media
player with a media event listener. It will play the media clip right away
and continuously loop.

<!-- Sample HTML


<applet code=TVApplet width=587 height=510>
<param name=file value=“playme.mov">
</applet> -->
Basic steps..
initialization

Retrieve applet’s FILE parameter

Use this to locate media file and build URL

Create Player using the Manager object

Register applet as a ControllerListener


Controlling the player
 Starting the Player

public void start() {


if (player != null)
player.realize();
}

 Stopping the Player

public void stop() {


if (player != null) {
player.stop();
player.deallocate();
}
}
Applet video player..
Player has methods to get references to
visual components

player.getVisualComponent()

player.getGainControl()

player.
getControlPanelComponent()
Extensibility
Jmf functionality can be extended in two ways:

Direct
Plug-ins implementati
ons

Data
codec mux player sink

process Data
effect demux or source
Streaming media and Rtp
 When media content is streamed to a client in real-time, the client can
begin to play the stream without having to wait for the complete
stream to download.

 Transmitting media data across the net in real-time requires high


network throughput.

 Consequently, the protocols used for static data don’t work well for
streaming media.
Streaming protocols

TCP UDP RTP


http,ftp are ●
Dedicated for
based on tcp real time data

Unreliable

Low transmission

slow
bandwidth, ●
High speed

Slow streaming streaming
RTP architecture
Real time transport protocol

Real time media frameworks and applications

Real time control protocol(RTCP)


Real time transport protocol(RTP)

UDP
Other network and transport
protocols(eg,tcp)
IP
RTP reception
An incoming rtp stream is handled by a session
manager
The presentation of the stream is handled by a player

Data player
source
network Session manager
Data player
source
Rtp transmission
Session manager creates and sends streams for the content and control the
transmission.

file Data Session


source network
manager

Data processor
source
Data Data
source sink file

Capture device
Conferencing :
FILE
WEB CAM UPLOAD
SERVLET

JMF JMF
CAPTURE RECEIVER
APPLET APPLET

DIRECTORY
UPLOAD
OF FILE
THREAD
CLIPS
sender server receiver
Queries?
`
Thank you

You might also like