|Oracle® interMedia Reference
10g Release 1 (10.1)
Part Number B10829-01
The examples in this chapter use the ONLINE_MEDIA table in the Product Media sample schema. The examples assume that the table has been populated as shown in examples in Chapter 4, Chapter 6, and Chapter 8.
See Oracle Database Sample Schemas for information on the sample schemas.
Note:The interMedia methods are designed to be internally consistent. If you use interMedia methods (such as import( ) or image process( )) to modify the media data, interMedia will ensure that object attributes remain synchronized with the media data. However, if you manipulate the data itself (by either directly modifying the BLOB or changing the external source), then you must ensure that the object attributes stay synchronized and the update time is modified; otherwise, the object attributes will not match the data.
The ORDSource object is embedded within the ORDAudio, ORDDoc, and ORDVideo object types. The ORDSource object type supports access to a variety of sources of multimedia data. It supports access to data sources locally in a BLOB within Oracle Database, externally from a BFILE on a local file system, externally from a URL on an HTTP server, or externally from a user-defined source on another server. See Chapter 10 for details on how the ORDSource object type is defined, including supported values for the ORDSource attributes, which are the following:
localData: the locally stored multimedia data stored as a BLOB within the object. Up to 4 gigabytes of data can be stored as a BLOB.
srcType: the data source type.
srcLocation: the place where data can be found based on the srcType value.
srcName: the data object name.
updateTime: the time at which the data was last updated.
local: a flag that indicates whether the data is local (1 or NULL) or external (0).
Methods invoked at the ORDSource level that are handed off to a source plug-in for processing have ctx (RAW) as the first argument. Before calling any of these methods for the first time, the client should allocate the ctx structure, initialize it to NULL, and invoke the openSource( ) method. At this point, the source plug-in can initialize context for this client. When processing is complete, the client should invoke the closeSource( ) method.
Methods invoked at the ORDAudio, ORDDoc, or ORDVideo level that are handed off to a format plug-in for processing have ctx (RAW) as the first argument. Before calling any of these methods for the first time, the client should allocate the ctx structure and initialize it to NULL.
Note:In the current release, none of the plug-ins provided by Oracle and not all source or format plug-ins will use the ctx argument, but if you code as previously described, your application should work with current or future source or format plug-ins.
For ORDAudio, ORDDoc, or ORDVideo object types, you should use any of the individual set methods to set the attribute value for an object for formats not natively supported, or write a format plug-in and call the setProperties( ) method; otherwise, for formats natively supported, use the setProperties( ) method to populate the attributes of the object.
For ORDImage object types, use the setProperties( ) method to populate the attributes of the object. Use the setProperties( ) for foreign images method for formats that are not natively supported.
This section presents reference information on the interMedia methods that are common to all object types (except Still Image objects).
For more information on object types and methods, see Oracle Database Concepts.
The following methods are presented in this section: