Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference
Release 8.1.5

A67296-01

Library

Product

Contents

Index

Prev Next

1
Introduction

Oracle8i interMedia is an extension to Oracle8i and Oracle8i Enterprise Edition. This extension uses object types to manage multimedia data. The capabilities of
interMedia include limited image-conversion capabilities, storage, retrieval, management, and manipulation of audio, image, and video data managed by Oracle8i. interMedia supports multimedia storage, retrieval, and management of the following:

interMedia is designed to be extensible. It supports a base set of popular audio, image, and video data characteristics for multimedia processing that can be extended to support additional formats, codecs, or even specialized data processing algorithms for audio and video data.

interMedia is a building block for various multimedia applications rather than being an end-user application. It consists of object types and their related methods for managing and processing multimedia data. The following are some example applications for interMedia:

These applications have certain distinct requirements and some degree of commonality. The audio, image, and video object types accommodate the commonality and support extensions that address application-specific requirements. With interMedia, multimedia data can be managed as easily as standard attribute data.

interMedia supports storage of many popular file formats, including popular desktop image, streaming audio, and video formats, in Oracle8i databases. interMedia provides the means to add audio, image, and video columns or objects to existing tables, insert and retrieve multimedia data, and provide limited processing and conversion between application formats. Database designers can extend existing application databases with multimedia data or build new end-user multimedia database applications.

1.1 If You Already Understand interMedia Multimedia Options

If you are already familiar with interMedia, you may not need to read much of the conceptual information in this chapter.

interMedia lets you store audio, image, or video data as objects in the database or as references to the following:

interMedia lets you store and manage media data, and manipulate the following attributes:

1.2 Audio Concepts

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

1.2.1 Digitized Audio

Audio may be produced by an audio recorder, a microphone, digitized audio, 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 recorded on magnetic media, and convert it into digital values with specific audio characteristics. These characteristics include format, encoding type, number of channels, sampling rate, sample size, compression type, and audio duration.

interMedia audio provides the mechanism to integrate the storage and retrieval of audio data in Oracle databases using Oracle8i.

interMedia audio supports applications that either play or process audio data that is in a particular file format. This file format has a specific sampling rate, encoding type, sample size, compression type, and number of channels depending upon hardware or processing power. interMedia audio is extensible, and therefore can support any variety of special audio characteristics.

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.

Given that an audio file may or may not include compression type and source information, the minimal attributes carried along with an audio clip may include the file format, MIME media type, encoding type, number of channels, sampling rate, sample size, and audio duration. These data attributes describe the audio data as it was recorded or produced by the digitized recording device.

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. Each audio data characteristic is crucial to audio data access and represents the audio data quality.

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 digital images and using interMedia image to build image applications or specialized interMedia image.

1.3.1 Digitized Images

interMedia image can help integrate the storage and retrieval of digital images in Oracle databases using Oracle8i.

interMedia image supports two-dimensional, static, digital 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

A digital image consists of attributes that describe the characteristics of the image, and the image data itself (the digitized bits). Occasionally, image applications will associate application-specific information with an image, such as including the name of the person pictured in a photograph.

Given that an image file may or may not include compression type and source information, the minimal attributes of an image may include its size (height in scan lines and width in pixels), the resolution at which it was sampled, and the number of bits per pixel in each of the colors sampled.

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 read and write image data using a variety of the data formats in use today. In addition, certain foreign images (formats not natively supported by interMedia image) have limited support.

The storage space required for digital 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.

1.3.3 Interchange Formats

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 digital imaging world and many applications that create or utilize digital images within these. interMedia image supports reading and writing many interchange formats.

1.4 Video Concepts

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

1.4.1 Digitized Video

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

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

interMedia video supports applications that either play or process video data that is in a particular file format. This file format has a specific frame rate, frame size, frame resolution, compression type, video length, bit rate, and number of colors depending upon hardware or processing power. interMedia video is extensible, and therefore can support any variety of special video characteristics.

1.4.2 Video Components

Digitized video components consist 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.

Given that a video file may or may not include compression type and source information, the minimal attributes carried along with a video clip may include the format, MIME media type, file format, encoding type, frame rate, frame size, frame resolution, total length of playing time, total number of frames, number of colors, and bit rate. These data attributes describe the video data as it was recorded or produced by the digitized recording device.

The video data can have different formats, compression types, frame rates, frame sizes, frame resolutions, playing times, compression types, number of colors, and bit rates depending upon how the video data was digitally recorded. Each video data characteristic is crucial to video data access and represents the video data quality.

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 Client-Side Support

Oracle8i interMedia Audio, Image, and Video Options let you store your multimedia information in a database table. However, in addition to storing this data, you might want to manipulate it or modify it. Oracle8i interMedia Audio, Image, and Video Java Client lets you to use local (client-side) applications to manipulate
and/or modify multimedia data stored in a network-accessible (server-side) database.

Oracle8i interMedia Audio, Image, and Video Java Client lets you connect to a server-side multimedia object, copy that object from the server side to the client side, perform various operations on the client-side object, and transfer the new multimedia object back to the server side.

For situations where you do not have permission to modify the server-side object, Oracle8i interMedia Audio, Image, and Video Java Client can retrieve the multimedia data from the server side for display purposes only.

In addition, Oracle8i interMedia Audio, Image, and Video Java Client gives you the ability to integrate multimedia objects with various media frameworks, such as the Java Media Framework (JMF), RealPlayer, or Oracle Video Client (OVC).

1.6 Client/Server Similarities and Differences

Client-side objects have many similarities to the server-side objects of the same types.

For each client-side object, there must be a corresponding server-side object. The objects are identical, and the client-side object contains all the APIs that the server-side object does.

There are some architectural differences between the two, however.
Oracle8i interMedia Audio, Image, and Video Java Client makes use of Java inheritance to capture the common attributes and behaviors of the ORDAudio, ORDImage, and ORDVideo objects in the ORDMultiMedia abstract superclass. The ORDAudio, ORDImage, and ORDVideo classes are subclasses of the superclass.

There are a number of attributes that are included on the client side that are not present on the server side. These include the following:

The client side also includes some APIs not included on the server side. These APIs are used to do the following:

1.7 Java Client Architecture

Oracle8i interMedia Audio, Image, and Video Java Client contains five basic classes: ORDMultiMedia, ORDSource, ORDAudio, ORDImage, and ORDVideo.

A diagram of the architecture containing these classes is shown in Figure 1-1.

Figure 1-1 Java Client Architecture


1.7.1 ORDMultiMedia Class

The ORDMultiMedia class is an abstract superclass. You will never create a ORDMultiMedia object. Instead, the ORDMultiMedia class contains methods and attributes common to ORDAudio, ORDImage, and ORDVideo.

The ORDMultiMedia class also includes two very important attributes: the binding parameters and the ORDSource object.

The binding parameters are the parameters used to select a server-side object to which the client-side object will be connected. This selection must be unique; that is, you cannot specify parameter values that select multiple objects and perform operations on all the objects at the same time. The binding must be in a one-to-one relationship. The binding parameters are tableName (the table in which the server-side object resides), columnName (the column in which the server-side object resides), and condition (a condition that must be met by the server-side object).

See Section 1.7.2 and Chapter 4 for more information on the ORDSource object.

1.7.2 ORDSource Class

The ORDSource object is created at the same time as the ORDMultiMedia object; you have no control over the creation of the ORDSource object.

The ORDSource object holds the digital media data.

1.7.3 ORDAudio Class

The ORDAudio class contains audio-specific attributes and methods.

As a subclass of the ORDMultiMedia class, the ORDAudio class inherits all the common attributes and methods from the ORDMultiMedia class.

1.7.4 ORDImage Class

The ORDImage class contains image-specific attributes and methods.

As a subclass of the ORDMultiMedia class, the ORDImage class inherits all the common attributes and methods from the ORDMultiMedia class.

1.7.5 ORDVideo Class

The ORDVideo class contains audio-specific attributes and methods.

As a subclass of the ORDMultiMedia class, the ORDVideo class inherits all the common attributes and methods from the ORDMultiMedia class.

1.8 Client/Server Interaction

The client/server interaction described here assumes that you have constructed a media object on the client side.

Figure 1-2 is a diagram of the way that the client communicates with the server.

Figure 1-2 Client/Server Interaction


  • Make a connection from the client to the server with the setConnection( ) method.

  • Bind a client-side object to a matching server-side object based on the tableName, columnName, and condition variables.

  • Refresh the client-side object. The server sends information about the server-side object to the client-side object. The client-side object is then updated so it exactly matches the server-side object.

    It is possible to refresh in two separate modes: for read-only purposes and for update purposes. The difference between the two is the lock value. If the lock value is "false," then you do not have permission to make any changes and the object is locked. Therefore, the refresh is for read-only purposes. If the lock value is "true," then you have permission to make changes to the object.

  • Perform operations on the client-side object.


    Note:

    If you execute a method that operates on the server-side object and changes the state of only the server-side object, you must explicitly refresh the client-side object in order to reflect that change on the client side.  


  • Flush the client-side object. Once you finish using the client-side object, the client sends information about the client-side object to the server-side object. The server-side object is then updated so it exactly matches the client-side object.


    Note:

    If you execute a method that operates on the client-side object and changes the state of only the client-side object, you must explicitly flush the server-side object in order to reflect that change on the server-side.  


    If you have set a lock, it is not automatically released upon flushing. You must release the lock manually by using the setLock( ) method. See Section 3.2.10 for more information on locking.

    See Chapter 2 for examples of operations between the client and server.

    1.9 Extending Oracle8i interMedia

    1.9.1 Client-Side Extensibility

    The ORDMultiMedia superclass can be extended in the same manner as any other Java class. The new class will inherit all methods and attributes from the ORDMultiMedia superclass. It will not, however, inherit any methods or attributes from the ORDAudio, ORDImage, and ORDVideo classes.

    Your new class should have the following format:

    package oracle.ord.media;
    class OrdMedia extends OrdMultimedia {
              <common attributes...>
              .
              .
              .
              
              OrdMedia( ){
                        super( );
              }
              
              <methods...>
              .
              .
              .
    }
    

    1.9.2 Server-Side Extensibility

    See Oracle8i interMedia Audio, Image, and Video User's Guide and Reference for more information on extending interMedia on the server side.


    Note:

    If you want to extend only a client-side object, you can extend it either within the media package or outside the media package. However, if you want to extend both the server-side and client-side objects, you must extend the client-side object within the media package.  





  • Prev

    Next
    Oracle
    Copyright © 1999 Oracle Corporation.

    All Rights Reserved.

    Library

    Product

    Contents

    Index