Oracle interMedia Audio, Image, and Video Java Classes User's Guide and Reference
Release 8.1.7

Part Number A85374-01

Library

Product

Contents

Index

Go to previous page Go to next page

1
Introduction

Oracle interMedia provides Audio, Image, and Video Java Classes (or interMedia Java Classes) to enable users to write Java applications using interMedia audio, image, and video objects.

1.1 Oracle interMedia Audio, Image, and Video

The capabilities of interMedia Audio, Image, and Video include the storage, retrieval, management, and manipulation of multimedia data managed by Oracle8i. Oracle interMedia supports multimedia storage, retrieval, and management of:

interMedia is a building block for various multimedia applications rather than being an end-user application. It consists of object types along with related methods for managing and processing multimedia data. Some example applications for interMedia Audio, Image, and Video are:

1.2 Audio Concepts

This section contains information about digitized audio concepts and using interMedia audio to build audio applications or specialized interMedia audio objects.

1.2.1 Digitized Audio

interMedia audio integrates the storage, retrieval, and management of digitized audio data in Oracle databases using Oracle8i.

Audio may be produced by an audio recorder, an audio source such as a microphone, digitized audio, other specialized audio recording devices, or even by program algorithms. Audio recording devices take an analog or continuous signal, such as the sound picked up by a microphone or sound recorded on magnetic media, and convert it into digital values with specific audio characteristics. Such characteristics include format, encoding type, number of channels, sampling rate, sample size, compression type, and audio duration.

1.2.2 Audio Components

Digitized audio consists of the audio data (digitized bits) and attributes that describe and characterize the audio data. Audio applications sometimes associate application-specific information, such as the description of the audio clip, date recorded, author or artist, and so forth, with audio data by storing descriptive text in an attribute or column in the database table.

The audio data can have different formats, encoding types, compression types, numbers of channels, sampling rates, sample sizes, and playing times (duration) depending upon how the audio data was digitally recorded. interMedia audio can store and retrieve audio data of any data format. interMedia audio can automatically extract metadata from audio data of a variety of popular audio formats. interMedia audio can also extract application attributes and store them in the comments field of the object in XML form identical to what is provided by the interMedia Annotator utility. Supported audio attributes depend upon available hardware capabilities or processing power for any user-defined formats. See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for a list of supported data formats from which interMedia audio can extract and store attributes and other audio features.

interMedia audio is extensible and can support additional audio formats.

The size of digitized audio (number of bytes) tends to be large compared to traditional computer objects, such as numbers and text. Therefore, several encoding schemes are used that squeeze audio data into fewer bytes, thus putting a smaller load on storage devices and networks.

1.3 Image Concepts

This section contains information about digitized image concepts and using interMedia image to build image applications or specialized interMedia image objects.

1.3.1 Digitized Images

interMedia image integrates the storage, retrieval, and management of digitized images in Oracle databases using Oracle8i.

interMedia image supports two-dimensional, static, digitized raster images stored as binary representations of real-world objects or scenes. Images may be produced by a document or photograph scanner, a video source such as a camera or VCR connected to a video digitizer or frame grabber, other specialized image capture devices, or even by program algorithms. Capture devices take an analog or continuous signal such as the light that falls onto the film in a camera, and convert it into digital values on a two-dimensional grid of data points known as pixels. Devices involved in the capture and display of images are under application control.

1.3.2 Image Components

Digitized images consist of the image data (digitized bits) and attributes that describe and characterize the image data. Image applications sometimes associate application-specific information, such as including the name of the person pictured in a photograph, description of the image, date photographed, photographer, and so forth, with image data by storing this descriptive text in an attribute or column in the database table.

The image data (pixels) can have varying depths (bits per pixel) depending on how the image was captured, and can be organized in various ways. The organization of the image data is known as the data format.

interMedia image can store or retrieve image data of any data format. interMedia image can process and automatically extract properties of images of a variety of popular formats. See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for a list of supported data formats for which interMedia image can process and extract metadata. In addition, certain foreign images (formats not natively understood by interMedia image) have limited support for image processing.

The storage space required for digitized images can be large compared to traditional attribute data such as numbers and text. Many compression schemes are available to squeeze an image into fewer bytes, thus reducing storage device and network load. Lossless compression schemes squeeze an image so that when it is decompressed, the resulting image is bit-for-bit identical with the original. Lossy compression schemes do not result in an identical image when decompressed, but rather, one in which the changes may be imperceptible to the human eye.

Image interchange format describes a well-defined organization and use of image attributes, data, and often compression schemes, allowing different applications to create, exchange, and use images. Interchange formats are often stored in or as disk files. They may also be exchanged in a sequential fashion over a network and be referred to as a protocol. There are many application subdomains within the digitized imaging world and many applications that create or use digitized images within these. interMedia image supports storage and retrieval of all formats, as well as processing and attribute extraction of many of those formats.

1.4 Video Concepts

This section contains information about digitized video concepts and using interMedia video to build video applications or specialized interMedia video objects.

1.4.1 Digitized Video

interMedia video integrates the storage, retrieval, and management of digitized video data in Oracle databases using Oracle8i.

Video may be produced by a video recorder, a video camera, digitized animation video, other specialized video recording devices, or even by program algorithms. Some video recording devices take an analog or continuous signal, such as that picked up by a video camera or video recorded on magnetic media, and convert it into digital values with specific video characteristics. Such characteristics include format, encoding type, frame rate, frame size (width and height), frame resolution, video length, compression type, number of colors, and bit rate.

1.4.2 Video Components

Digitized video consists of the video data (digitized bits) and the attributes that describe and characterize the video data. Video applications sometimes associate application-specific information, such as the description of the video training tape, date recorded, instructor's name, producer's name, and so forth, with video data by storing descriptive text in an attribute or column in the database table.

The video data can have different formats, compression types, frame rates, frame sizes, frame resolutions, playing times, compression types, numbers of colors, and bit rates, depending upon how the video data was digitally recorded. interMedia video can store and retrieve video data of any data format. interMedia video can automatically extract metadata from video data of a variety of popular video formats. interMedia video can also extract application attributes and store them in the comments field of the object in XML form identical to what is provided by the interMedia Annotator utility. Supported video attributes depend upon available hardware capabilities or processing power for any user-defined formats. See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for a list of supported data formats from which interMedia video can extract and store attributes and other video features.

interMedia video is extensible and can support additional video formats.

The size of digitized video (number of bytes) tends to be large compared to traditional computer objects, such as numbers and text. Therefore, several encoding schemes are used that squeeze video data into fewer bytes, thus putting a smaller load on storage devices and networks.

1.5 Java Application Support

Oracle interMedia Audio, Image, and Video lets you store your multimedia information in a database table. However, in addition to storing this data, you might want to retrieve it or modify it. interMedia Java Classes lets you write your own Java applications to use, manipulate, and modify multimedia data stored in an Oracle database.

interMedia Java Classes lets you connect to a database through JDBC calls, select a database interMedia object to become a Java application object, perform various operations on the application object, and commit your changes to the database object.

1.6 Interaction Between Database and Java Application

Perform the following operations to make a connection between a database object and a Java application object:

  1. Make a connection from the Java application to the Oracle database through JDBC calls.

    Write a method that returns a valid OracleConnection object; see Example 2-3 for an example of a method that makes a connection to the database.

  2. Execute a SELECT statement on the database table and store the results in your Java application.

    To execute the SELECT statement, you must create a Statement object in your application, use the executeQuery( ) method to execute the SELECT statement, and put the results into an OracleResultSet object. See steps 1 and 2 of Example 2-4 for an example.

  3. Move the results into an interMedia object with the getCustomDatum( ) method.

    Create a Java application interMedia object, and instantiate it with the results of the getCustomDatum( ) method. See step 5 of Example 2-4 for an example.

    You should now have a Java application interMedia object that is identical to the database object.

  4. Perform operations on the Java application object.

  5. Update the database object to include the results of the operations in step 4.

    Create an OraclePreparedStatement object that contains a SQL statement that updates the database object, and execute the statement. See step 9 of Example 2-4 for an example.

  6. Commit your changes.

    Unless you set the setAutoCommit( ) method to TRUE in your connection method, you must perform an explicit commit to update the database object with any changes that you made to the application object. You do this with the JDBC commit( ) method. See step 4 of Example 2-2 for an example of the commit( ) method.

  7. Close the connection.

    Close the connection between the Java application and the database with the JDBC close( ) method. See step 5 of Example 2-2 for an example of the close( ) method.

    For more information on using JDBC, see Oracle8i JDBC Developer's Guide and Reference.

1.7 Compatibility with Previous Releases of interMedia

Oracle Corporation may improve the interMedia object types by adding new object attributes in a future release of interMedia. Client-side applications that want to maintain compatibility with the 8.1.7 release of the interMedia object types (OrdAudio, OrdImage, OrdVideo, and OrdSource), even after a server upgrade that changes the object types, should make a call to the compatibility initialization function at the beginning of the application.


Note:

If you do not follow the recommended actions, you may have to upgrade and perhaps even recompile your application when you upgrade to a newer server release that enhances the interMedia object types. 


Client-side applications written in Java using interMedia Java Classes for 8.1.7 should call the OrdMediaUtil.imCompatibilityInit( ) function after connecting to Oracle.

public static void imCompatibilityInit(OracleConnection con)
    throws Exception

This Java function takes an OracleConnection as an argument. The interMedia 8.1.7 Java API will ensure compatibility of your 8.1.7 Java application with any future release of interMedia, regardless of enhanced object types.

See step 2 of Example 2-2 for an example of the imCompatibilityInit( ) method.


Go to previous page Go to next page
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index