Multimedia Engine in QuickTime for Java - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Multimedia Engine in QuickTime for Java

Description:

throws IOException. removeHilight (); out.defaultWriteObject (); Object ... throws IOException, ClassNotFoundException. in.defaultReadObject (); initScreen ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 24
Provided by: aucUo
Category:

less

Transcript and Presenter's Notes

Title: Multimedia Engine in QuickTime for Java


1
Multimedia Engine in QuickTime for Java
Academic Developers Conference 2001
  • Dhammika Ruberu Phillip McKerrow
  • University of Wollongong

2
Introduction
  • Why ?
  • Design of the application
  • Examine the MMBuilder
  • Implementation details
  • Why did we use certain methods?
  • Interesting findings and pitfalls

3
Why develop another multimedia engine?
  • Easy to use for non programmers
  • Identify the minimum feature set for a useful
    multimedia engine
  • Be able to extend to meet the changing needs

4
Design
5
Linking of Screens
6
Structure of the editor (MMBuilder)
  • Consists of 4 separate windows
  • Media catalogue
  • Editor window
  • Object inspector
  • Screen manager

7
MMBuilder
  • Media Catalogue
  • Can import any media
  • type supported by
  • QuickTime

8
Editor window
  • Operate in two modes
  • Editor mode
  • Run mode
  • Layout media elements
  • Set QuickTime attributes

9
Editor window - Cont.
  • Setting QuickTime movie attributes

10
Object inspector
  • Change object properties
  • Create a hot object

11
Screen manager
12
Implementation details
13
Background to QuickTime for Java API
  • Not very Java like
  • QTJ object is a handle to an underlying QuickTime
    object
  • Refer to original QuickTime documentation

14
Main QTJ building blocks
  • QTCanvas
  • DirctGroup
  • Compositor

15
Structure of mmScreen
16
Highlighting the selected object
  • Make a compositor of the same size as the
    selected object
  • Create an image of the selected object
  • Create a QuickDraw graphic of the one pixel
    outline
  • Add the outline and the image to the compositor
  • Replace the selected object with the composite
    image
  • Add DragAction to drag the created composite image

17
Matrix manipulation
  • Object inspector is implemented using matrix
    manipulation
  • Matrix operations are additive, but we wanted
    them to be absolute
  • m.setIdentity ()
  • m.translate ((float) x, (float) y)
  • m.scale (scale, scale, x, y)
  • m.rotate (rotation, (float) x, (float) y)

18
Object serialisation
  • Project is saved using Java object serialisation
  • class mmScreen extends Component implements
    Serializable
  • static final long serialVersionUID
    -123456789012345L
  • private transient DirectGroup dg
  • private transient Compositor cm
  • private LayerManager lm

19
Object serialisation - Cont.
  • When writing data
  • private void writeObject (ObjectOutputStream
    out)
  • throws IOException
  • removeHilight ()
  • out.defaultWriteObject ()

20
Object serialisation - Cont.
  • When reading data
  • private void readObject (ObjectInputStream in)
  • throws IOException, ClassNotFoundException
  • in.defaultReadObject ()
  • initScreen ()
  • lm.setDirectGroup (dg)
  • lm.setCompositor (cm)
  • lm.restoreScreen ()

21
Making a movies background transparent
  • Done using QuickTime ink effects
  • //Make it transparent
  • GraphicsMode gm new GraphicsMode
    (QDConstants.transparent, QDColor.black)
  • cm.getMemberSprite (qtObj).setGraphicsMode (gm)
  • //Revert to normal by applying an empty
    GraphicsMode
  • GraphicsMode gm new GraphicsMode ()
  • cm.getMemberSprite (qtObj).setGraphicsMode (gm)

22
Porting to OS X
  • Done using the Project Builder
  • Minimal changes were needed
  • File name mismatch with class name
  • Changes to the file IO

23
QA
Write a Comment
User Comments (0)
About PowerShow.com