|Oracle8i interMedia Audio, Image, and Video User's Guide and Reference
Oracle8i interMedia Audio, Image and Video is a component of the Oracle8i interMedia product. Oracle8i interMedia Audio, Image and Video enables Oracle8i to manage image, audio, and video in an integrated fashion with other enterprise information, through object types. Oracle8i interMedia extends Oracle8i reliability, availability, and data management to multimedia content in Internet, electronic commerce, and media-rich applications.
The capabilities of interMedia audio, image, and video encompass the storage, retrieval, management, and manipulation of multimedia data managed by Oracle8i. interMedia audio, image, and video support multimedia storage, retrieval, and management of:
interMedia is designed to be extensible. It supports a base set of popular audio, image, and video data characteristics for multimedia processing that also can be extended, for example, to support additional formats, new digital compression and decompression schemes (codecs), data sources, and 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 along with related methods for managing and processing multimedia data. Some example applications for interMedia audio, image, and video are:
These applications have common and unique requirements. Oracle8i interMedia Audio, Image, and Video object types support common application requirements and can be extended to address application-specific requirements. With Oracle8i interMedia, multimedia data can be managed as easily as standard attribute data.
Oracle8i interMedia is accessible to applications through both relational and object interfaces. Database applications written in JAVA, C++, or traditional 3GLs can interface to interMedia through modern class library interfaces, or PL/SQL and the Oracle Call Interface (OCI).
interMedia supports storage of many of the popular file formats, including desktop publishing image and 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 conversion between application formats. This enables database designers to extend existing application databases with multimedia data or to build new end-user multimedia database applications. interMedia developers can use the basic functions provided here to build specialized multimedia applications.
Oracle8i interMedia uses object types, similar to JAVA or C++ classes, to describe audio, image, and video data. These object types are called ORDAudio, ORDImage, and ORDVideo. An instance of these object types consists of attributes, including metadata and the media data, and methods. Media data is the actual audio, image, or video. Metadata is information about the data, including information like object length, compression, or format. Methods are procedures that can be performed on the object like getContent( ) and process( ).
interMedia objects (ORDAudio, ORDImage, and ORDVideo) have a common media data storage model. The media data component of these objects can be stored in the database, in a binary large object (BLOB) under transaction control. The media data can also be stored outside the database without transaction control. In this case, a pointer is stored in the database under transaction control and the media data is stored in:
Media data stored outside the database can provide a convenient mechanism for managing large, pre-existing or new media repositories that reside as flat files on erasable or read-only media. This data can be imported into BLOBs at any time for transaction control.
Object metadata and methods are always stored in the database under Oracle8i interMedia control. Whether media data is stored within or outside the database, interMedia manages metadata for all the media types and may automatically extract it for audio, image, and video. This metadata includes the following attributes:
In addition, a minimal set of image and data manipulation methods is provided. For image, this includes verifying the image properties match the image, performing format conversion and compression, scaling, cropping, copying, and deleting images.
It is possible to extend Oracle8i interMedia by:
This section contains information about digitized audio concepts and using interMedia audio to build audio applications or specialized interMedia audio objects.
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 as format, encoding type, number of channels, sampling rate, sample size, compression type, and audio duration.
interMedia audio integrates the storage, retrieval, and management of digitized audio data in Oracle databases using Oracle8i.
interMedia audio supports applications that either play or process audio data that are in a particular file format with a specific sampling rate, encoding type, sample size, and number of channels depending upon available hardware capabilities or processing power for user-defined formats. interMedia audio is extensible so that it can support any variety of special audio characteristics.
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. Each audio data characteristic is crucial to audio data access and represents the audio data quality.
Given that an audio clip may not have any compression, description, and source information (source type, source location, source name), the minimal attributes carried along with an audio clip may include the file format, MIME type, encoding type, number of channels, sampling rate, sample size, and audio duration. These data attributes describe or characterize the audio data as it was recorded or produced by the digitized recording device.
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.
This section contains information about digitized image concepts and using interMedia image to build image applications or specialized interMedia image objects.
interMedia image can help integrate the storage, retrieval, and management of digitized images in Oracle databases using Oracle8i.
interMedia image supports two-dimensional, static, digitized 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.
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 read and write image data using a variety of current data formats. See Appendix B for a list of supported data formats. In addition, certain foreign images (formats not natively supported by interMedia image) have limited support. See Appendix D for more information.
Given that an image may not have any compression and source information (source type, source location, source name), the minimal attributes of an image may include such things as its size (height in scan lines and width in pixels), and the file and content format.
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 utilize digitized images within these. interMedia image supports reading and writing many interchange formats (see Appendix B).
This section contains information about digitized video concepts and using interMedia video to build video applications or specialized interMedia video objects.
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 the video picked up by a video camera or video recorded on magnetic media, and convert it into digital values with specific video characteristics such as 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 are 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 available hardware capabilities or processing power for user-defined formats. interMedia video is extensible so that it can support any variety of special video characteristics.
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, 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.
Given that a video clip may not have any compression, description, and source information (source type, source location, source name), the minimal attributes carried along with a video clip may include the file format, MIME type, 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 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.
Oracle8i is an object relational database management system. That means that in addition to its traditional role in the safe and efficient management of relational data, it now provides support for the definition of object types, including the data involved in objects and the operations (methods) that can be performed on them. This powerful mechanism, well established in the object-oriented world, includes integral support for BLOBs to provide the basis for adding complex objects, such as digitized audio, image, and video to Oracle8i databases.
Within Oracle8i interMedia, audio data characteristics have an object relational type known as ORDAudio, image data characteristics have an object relational type known as ORDImage, and video data characteristics have an object relational type known as ORDVideo. All three store data source information in an object relational type known as ORDSource.
See the following references for extensive information on using BLOBs and BFILEs:
See the chapter on Object Views.
Oracle8i interMedia provides the ORDAudio, ORDImage, and ORDVideo object types and methods for:
Oracle8i interMedia provides the ORDSource object type and methods for multimedia data source manipulation. This section presents a conceptual overview of the ORDSource object type methods.
interMedia can store multimedia data as an internal source within the Oracle8i database, under transactional control as a BLOB. It can also externally reference digitized multimedia data stored as an external source in an operating system-specific BFILE in a local file-system, as a URL on an HTTP server, as streaming audio or video stored on media servers, or as a user-defined source on other servers. Although these external storage mechanisms are particularly convenient for integrating pre-existing sets of multimedia data with an Oracle8i database, the multimedia data will not be under transactional control.
BLOBs are stored in the database tablespaces in a way that optimizes space and provides efficient access. BLOBs may not be stored inline with other row data. Depending on the size of the BLOB, a locator is stored in the row and the actual BLOB (up to 4 gigabytes) is stored in other tablespaces. The locator can be considered a pointer to the actual location of the BLOB value. When you select a BLOB, you are selecting the locator instead of the value, although this is done transparently. An advantage of this design is that multiple BLOB locators can exist in a single row. For example, you might want to store a short video clip of a training tape, an audio recording containing a brief description of its contents, a syllabus of the course, a picture of the instructor, and a set of maps and directions to each training center.
Because BFILEs are not under the transactional control of the database, users could change the external source without updating the database, thus causing an inconsistency with the BFILE locator. Only the locator for a BFILE, URL, streaming audio or video source on a media server, or a user-defined source located on other servers is stored in the row. See Oracle8i Application Developer's Guide - Large Objects (LOBs) and Oracle Call Interface Programmer's Guide for detailed information on using BLOBs and BFILEs.
interMedia provides the ORDSource object type and methods for performing local attribute manipulation, updateTime attribute manipulation, source attribute manipulation, import/export operations, source content operations, source access operations, source read and write operations, and command process operations.
Once stored within an Oracle8i database, multimedia data can be queried and retrieved by using the various alphanumeric columns (attributes) of the table to find a row that contains the data. For example, you can select a video clip from the Training table where the course name is 'Oracle8i Concepts'.
The collection of multimedia data in the database can be related to some set of attributes or keywords that describe the associated content. The multimedia data content can be described with textual components and numeric attributes such as dates and identification numbers. For Oracle8i, data attributes can now reside in the same table as the object type. Alternatively, the application designer could define a composite object type that contains one of the object types along with other attributes.
Applications access and manipulate multimedia data using SQL, PL/SQL, or JAVA through the object relational types ORDAudio, ORDImage, and ORDVideo. See Oracle8i interMedia Audio, Image, and Video Java Client User's Guide and Reference for more information about using JAVA. The object syntax for accessing attributes within a complex object is the dot notation:
The syntax for invoking methods of a complex object is also the dot notation:
variable.function(parameter1, parameter2, ...)
See Oracle8i Concepts for information on this and other SQL syntax.
interMedia audio, interMedia image, and interMedia video can be extended to support:
The following sections describe each of these topics and where to find more information.
For each unique external audio, image, or video data source or each unique audio or video data format that you want to support, you must:
To implement your new data source, you must implement the required interfaces in the ORDX_<srcType>_SOURCE package in ORDPLUGINS schema (where <srcType> represents the name of the new external source type). Use the package body example in Section 6.3.2 as a template to create the package body. Then set the source parameter in the setSourceInformation( ) call to the appropriate source value to indicate to the audio, image, or video object that package ORDPLUG-
INS.ORDX_<srcType>_SOURCE is available as a plug-in. Use the ORDPLUG-
INS.ORDX_FILE_SOURCE and ORDPLUGINS.ORDX_HTTP_SOURCE packages as guides when you extend support to other external audio, image, or video sources.
To implement your new audio or video data format, you must implement the required interfaces in the ORDPLUGINS.ORDX_<format>_<media> package in the ORDPLUGINS schema (where <format> represents the name of the new audio or video data format and <media> represents the media of the format). Use the ORDPLUGINS.ORDX_DEFAULT_<media> package as a guide when you extend support to other audio or video data formats. Use the package body examples in Section 3.3.6 and Section 5.3.6 as templates to create the audio or video package body, respectively. Then set the new format parameter in the setFormat( ) call to the appropriate format value to indicate to the audio or video object that package ORDPLUGINS.ORDX_<format>_<media> is available as a plug-in.
Oracle8i interMedia image supports certain other image formats through the setProperties( ) method for foreign images. This method allows other image formats to be recognized by writing the values supplied to the setProperties( ) method for foreign images to the existing ORDImage data attributes. See "setProperties( ) Method for Foreign Images" in Chapter 4 for more information.
To support audio data processing, that is, the passing of an audio processing command and set of arguments to a format plug-in for processing, use the processAudioCommand( ) method. This method is only available for user-defined formats.
To support video data processing, that is, the passing of a command and set of arguments to a format plug-in for processing, use the processVideoCommand( ) method. This method is only available for user-defined formats.