Title: Developing a Java API for Digital Video control using the Firewire SDK
1Developing a Java API for Digital Video control
using the Firewire SDK
Academic Developers Conference 2001
- Damon Woolley
- Bing-Chang Lai
- Phillip John McKerrow
- University of Wollongong
2Introduction
- What is Firewire?
- The API
- Version in Paper
- Current Version
- Using the API
- To do list
- Where to get the API
- QA
3What is Firewire?
- Firewire is Apples name for IEEE 1394 Standard
- High-speed bus (Up to 400 Mbits per second)
- Hot-swappable
- Easy cabling
4What is Firewire?
- Different data can be sent across Firewire of
which Digital Video (DV) is one. - Digital Video (DV)
- Uses compression similar to motion-JPEG
- Compression rate of around 51
- Constant data rate of 36 Mbits per second
5What is Firewire?
- Firewire provides a standard for interacting with
DV devices - Called Audio Video/Control (AV/C)
- The Java API being developed by UOW is for
providing an easy-to-use interface to AV/C
6The API
- Easy-to-use Java interface to AV/C
- Original Firewire AV/C commands are all in
low-level C
7The API
- The API has the following structure
- Java Application
- JNI Layer
- C/C Layer
- Firewire
- Version in Paper
- Used a C Layer, adapted from IsochComponent from
the Firewire SDK - Current Version
- Uses a C layer, and mirrors the C API to Java
- Only supports MacOS X
8Version in Paper
- Adapted from IsochTest Example provided with
Firewire SDK - A prototype for learning
- Extract the appropriate functions
- Expose these C functions to Java
- Therefore it does not have a very correct
structure or design
9Version in Paper
- Software Architecture (From Paper)
10Version in Paper
- JNIOut
- void InitDV(String msg)
- Print Information about available components
- void OpenDV(String msg)
- Gets the default dv component
- Print information about the component
- Sets the video configuration of the component
- void OpenControlDV(String msg)
- Open device for reading
- void CloseControlDV()
- Close device
11Version in Paper
- JNIOut
- void ControlDV(int op1, int op2)
- Uses op1 and op2 to create an AV/C command, and
sends it to the DV device - Some opcodes are listed in the paper
- Complete opcodes are available from
http//www.1394ta.org/Technology/Specifications/
Descriptions/1394_AVC.htm - eg. Play (0xc3, 0x75), Stop (0xc4, 0x60), Fast
Forward (0xc4, 0x75), Rewind (0xc4, 0x65)
12Current Version
- DVController
- Uses JNIOut. Calls ControlDV and passes AV/C
operand codes
13Current Version
- In avc namespace, avc package
- AVDeviceFactory
- AVDevice getDefaultDevice()
- Creates an AVDevice from the default dv component
- The device is initialised when AVDevice is
constructed - Corresponds to OpenDV
- AVDevice
- boolean open()
- opens the device
- Corresponds to OpenControlDV
14Current Version
- AVDevice
- boolean close()
- closes the device
- Corresponds to CloseControlDV
- boolean play()
- boolean stop()
- boolean fastforward()
- boolean rewind()
- boolean nextframe()
- boolean prevframe()
15Current Version
- AVDevice
- boolean slowplay()
- boolean fastplay()
- boolean rplay()
16Using the API
Version in Paper System.loadLibrary("JNIOut") ...
JNIOut interface new JNIOut() interface.InitDV
() interface.OpenDV() interface.OpenControlDV()
... // Play Command interface.ControlDV(0xc3,
0x75) ... // Stop Command interface.ControlDV(0xc
4, 0x60) ... interface.CloseControlDV()
Current Version System.loadLibrary("AVC") ... AVD
eviceFactory f new AVDeviceFactory() AVDevice
d f.getDefaultDevice() d.open() // Will
return false if failed ... d.play() // Will
return false if failed ... d.stop() // Will
return false if failed ... d.close()
17To-Do List
- Provide ControlDV equivalent
- Provide more functions
- Time Code Functions
- Get Time Code
- Go to a specific Time Code
- Instead of returning True/False, functions will
throw Exceptions
18Where to get the API
- Planning on putting the current version onto
www.kagi.com for about AU10 a copy, probably
with source - Not done yet
- If you want to know when it will be up, you can
email me on bl12_at_uow.edu.au
19References
- D. Woolley, B. Lai, P.J. McKerrow, Developing a
Java API for Digital Video Control using the
Firewire SDK, AUC 2001 - 1394 Trade Association, AV/C Digital Interface
Command Set, Version 1, Sept 1996, see
http//www.1394ta.org/Technology/Specifications/
Descriptions/1394_AVC.htm - Apple Inc., Firewire SDK 9 for MacOS X, see
http//developer.apple.com/hardware/FireWire/
20QA