HOME

TheInfoList



OR:

QuickTime for Java or QTJ is a
software library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subr ...
that allows software written in the
Java programming language Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let programmers ''write once, run anywh ...
to provide
multimedia Multimedia is a form of communication that uses a combination of different content forms such as text, audio, images, animations, or video into a single interactive presentation, in contrast to tradition ...
functionality, by making calls into the native
QuickTime QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is avai ...
library. In practice, it allows Java applications on
Mac OS Two major famlies of Mac operating systems were developed by Apple Inc. In 1984, Apple debuted the operating system that is now known as the "Classic" Mac OS with its release of the original Macintosh System Software. The system, rebranded "M ...
,
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
and
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
to support the capture, editing, playback, and export of many different
media formats Media may refer to: Communication * Media (communication), tools used to deliver information or data ** Advertising media, various media, content, buying and placement for advertising ** Broadcast media, communications delivered over mass el ...
and
codec A codec is a device or computer program that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder. In electronic communications, an endec is a device that acts as both an encoder and a decoder on a signal or da ...
s. QTJ has been deprecated by Apple.


History

Owen W. Linzmayer, in ''Apple Confidential 2.0'', traces QuickTime for Java's genesis back to
Kaleida Labs Kaleida Labs formed in 1991 to produce the multimedia cross-platform Kaleida Media Player and the object oriented scripting language ScriptX that was used to program its behavior. The system was aimed at the production of interactive CD ROM title ...
, a spin-off company created by
Apple Computer Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company b ...
and IBM, noting that it and some Unicode text classes were the only Mac software salvaged from the four-year, $150 million disaster. Ported to the Mac OS, it was developed under the code-name "Biscotti", and first released as a public beta in 1999. Later versions were installed by default with Mac OS and Mac OS X, and were an optional part of the QuickTime install for Windows.


QTJ 6.1

In 2003, Apple issued a Java 1.4.1 implementation that broke any QTJ applications that tried to run under 1.4.1 on Mac OS X. The underlying problem was Apple's move from
Carbon Carbon () is a chemical element with the symbol C and atomic number 6. It is nonmetallic and tetravalent In chemistry, the valence (US spelling) or valency (British spelling) of an element is the measure of its combining capacity with o ...
to
Cocoa Cocoa may refer to: Chocolate * Chocolate * ''Theobroma cacao'', the cocoa tree * Cocoa bean, seed of ''Theobroma cacao'' * Chocolate liquor, or cocoa liquor, pure, liquid chocolate extracted from the cocoa bean, including both cocoa butter and ...
for their AWT implementation, and the removal of a Java-to-native library called "JDirect" that QTJ relied on. QTJ applications could still run under Java 1.3.1, but apps that did not specify the version of Java they required, or that needed 1.4 features, were rendered unusable. Later that year, Apple released a new version of QTJ that dealt with the incompatibilities, by offering a compatible but scaled-down version of the GUI classes. This 6.1 version of QTJ also radically changed the API, so that instead of having developers create GUI components and associate Movies or other renderable objects with them, the developers now needed to start with the Movie and request a suitable component from a factory. The new version also neglected to provide a component to show a visual preview of the input from a capture device, such as a
webcam A webcam is a video camera which is designed to record or stream to a computer or computer network. They are primarily used in videotelephony, livestreaming and social media, and security. Webcams can be built-in computer hardware or peripheral d ...
or
camcorder A camcorder is a self-contained portable electronic device with video and recording as its primary function. It is typically equipped with an articulating screen mounted on the left side, a belt to facilitate holding on the right side, hot-swa ...
.


Design

QTJ lays an
object-oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of pro ...
API on top of the native C-based QuickTime library. It does this by associating common structs and the functions that work with them into classes. For example, the Movie struct is the basis of the class quicktime.std.movies.Movie, with functions like NewMovieFromFile and GetMovieTrackCount becoming the instance methods fromFile() and getTrackCount() respectively. The result is more like a genuine object-oriented API than other C-to-Java adaptations (such as
JOGL Java OpenGL (JOGL) is a wrapper library that allows OpenGL to be used in the Java programming language. It was originally developed by Kenneth Bradley Russell and Christopher John Kline, and was further developed by the Sun Microsystems Game Techn ...
, which dumps the OpenGL
header file Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of the specified file to be inserted into the original file. These included files are called copybooks ...
s into classes with thousands of static methods).Chris Adamson, ''QuickTime for Java: A Developer's Notebook'' The Cocoa-based
QTKit QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is avail ...
is a similar attempt to put an object-oriented layer atop the procedural QuickTime library, using
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTS ...
. Apple's use of the top-level package name quicktime violates the Java Language's Specification convention that packages use a reverse-domain-name scheme, such as com.apple.quicktime. However, as Apple owns the "QuickTime" trademark, there is no realistic chance of a
namespace In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified. Namespaces ...
collision, the prevention of which is the purpose of the package naming convention. It is important to remember that QTJ is not a Java implementation of QuickTime, it is a Java ''wrapper'' around native QuickTime calls. For this reason, it can only run on systems that have the QuickTime libraries installed, namely the classic Mac OS (which is no longer supported), Mac OS X, and Windows.


Features

QTJ offers access to most of the native QuickTime library, including * Playback * Editing * Capture * Graphic import and export * Movie import and export * Sample-level access As a wrapper around QuickTime, QTJ also inherits support for a vast collection of media formats and codecs, including
MPEG-1 MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, making ...
,
MPEG-4 MPEG-4 is a group of international standards for the compression of digital audio and visual data, multimedia systems, and file storage formats. It was originally introduced in late 1998 as a group of audio and video coding formats and related tec ...
,
H.264 Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, is a video compression standard based on block-oriented, motion-compensated coding. It is by far the most commonly used format for the recording, compression, and distri ...
,
AAC AAC may refer to: Aviation * Advanced Aircraft, a company from Carlsbad, California * Alaskan Air Command, a radar network * American Aeronautical Corporation, a company from Port Washington, New York * American Aviation, a company from Cleveland, ...
,
Sorenson Video Sorenson Media was an American software company specializing in video encoding technology. Established in December 1995 as Sorenson Vision, the company developed technology which was licensed and ultimately acquired from Utah State University. T ...
,
Flash Flash, flashes, or FLASH may refer to: Arts, entertainment, and media Fictional aliases * Flash (DC Comics character), several DC Comics superheroes with super speed: ** Flash (Barry Allen) ** Flash (Jay Garrick) ** Wally West, the first Kid ...
, 3GPP,
WAV Waveform Audio File Format (WAVE, or WAV due to its filename extension; pronounced "wave") is an audio file format standard, developed by IBM and Microsoft, for storing an audio bitstream on PCs. It is the main format used on Microsoft Win ...
,
AIFF Audio Interchange File Format (AIFF) is an audio file format standard used for storing sound data for personal computers and other electronic audio devices. The format was developed by Apple Inc. in 1988 based on Electronic Arts' Interchange File ...
, and more. Since QuickTime itself can be extended, QTJ can pick up support for formats such as DivX and
Ogg Vorbis Vorbis is a free and open-source software project headed by the Xiph.Org Foundation. The project produces an audio coding format and software reference encoder/decoder (codec) for lossy audio compression. Vorbis is most commonly used in conjun ...
through the use of third-party QuickTime ''components''.


Code Example

The following example shows an AWT file-selection dialog and then tries to import and play the selected media file. import java.io.File; import java.awt.*; import quicktime.*; import quicktime.std.movies.Movie; import quicktime.app.view.QTFactory; import quicktime.io.*; public class TrivialQTJPlayer extends Frame Most of the code in this example involves itself with setting up the GUI. The only calls to QTJ are the calls to OpenMovieFile.asRead() and Movie.fromFile(), which create a QuickTime movie from the specified file, and the calls to create an AWT component from the QTFactory. This example puts the movie into the frame and immediately starts playing it; if a control bar (aka a "scrubber") were desired, you would create a MovieController from the Movie and then create a component from the controller, rather than from the movie.


Status and Outlook

QTJ's acceptance is limited by its nature as a wrapper around Apple's proprietary QuickTime library. It does not exist for any platform other than Mac and Windows, and cannot until and unless Apple ports QuickTime to another platform, such as Linux. Currently most of QTJ is broken on recent Windows-running computers. Windows machines that use the no-execute (NX) page-protection security feature of recent CPUs cannot run even the demos without changing the configuration. This can be easily verified by a developer via a test-run of one of the demos coming with QTJ. An "execution protection violation" is reported and the program is aborted by Windows. This renders QTJ unsuitable for end-user application development due to the necessary complicated configuration of the NX feature. Following the 2003 release of QTJ 6.1, Apple has made few updates to QTJ, mostly fixing bugs. Notably, QuickTime 7 was the first version of QuickTime not to be accompanied or followed by a QTJ release that wrapped the new native API's. QuickTime 7's new API's, such as those for working with metadata and with frame-reordering codecs, are not available to QTJ programmers. Apple has also not offered new classes to provide the capture preview functionality that was present in versions of QTJ prior to 6.1. Indeed, QTJ is dependent on some native API's that Apple no longer recommends, most notably
QuickDraw A quickdraw (also known as an extender) is a piece of climbing equipment used by rock and ice climbers to allow the climbing rope to run freely through protection such as a bolt anchors or other traditional gear while leading. A quickdraw ...
.


See also

*
Java Media Framework The Java Media Framework (JMF) is a Java Library (computing), library that enables audio, video and other time-based media to be added to Java (programming language), Java applications and applets. This optional package, which can capture, play, s ...

Xuggler
Java API for video encoding and decoding that works on Mac, Linux and Windows


External links


QuickTime for Java
at Apple Developer Connection


References

{{Java desktop
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
Java APIs