I Oracle Multimedia Relational Interface
This appendix describes the original Oracle Multimedia relational interface. This interface has been superseded by the new PL/SQL API.
The relational interface consists of a set of static methods for each of these Oracle Multimedia objects:
-
ORDAudio
-
ORDDoc
-
ORDImage
-
ORDVideo
Because the relational interface consists of static methods, no objects are instantiated. So, data is passed by method arguments rather than by object attributes.
The static methods for these four Oracle Multimedia objects are defined in the ordaspec.sql
, orddspec.sql
, ordispec.sql
, and ordvspec.sql
files, respectively. After installation, these files are available in the Oracle home directory at:
<ORACLE_HOME>
/ord/im/admin
(on Linux and UNIX)
<ORACLE_HOME>
\ord\im\admin
(on Windows)
Note:
In place of the relational interface, Oracle recommends using the simplified PL/SQL API for managing image, audio, video, and other heterogeneous media data stored in BLOBs and BFILEs in Oracle Database. This PL/SQL API includes ORD_AUDIO, ORD_DOC, ORD_IMAGE, and ORD_VIDEO PL/SQL packages, which enable common operations such as metadata extraction and image processing to be more intuitively included in SQL and PL/SQL applications.
See the following topics for details about the static methods in the original Oracle Multimedia relational interface:
I.1 Purpose of the Oracle Multimedia Relational Interface
Application developers, who created multimedia applications without using the Oracle Multimedia object types to store and manage media data in relational tables, and who do not want to migrate their existing multimedia applications to use Oracle Multimedia objects, can use the Oracle Multimedia relational interface for managing their media data. The Oracle Multimedia relational interface consists of a set of methods for these operations:
-
Extracting information directly from media data, either as an XML string or as XML and individual attributes
-
Processing and copying image data
-
Loading media data into Oracle Database
-
Exporting media data from Oracle Database into operating system files
The Oracle Multimedia relational interface enables application developers to take advantage of Oracle Multimedia functions with only minimal changes to their applications, and all without having to change their schemas to the Oracle Multimedia objects to store their data.
I.2 Important Notes for Relational Methods
Methods related to the source of the media have ctx (RAW) as the first argument. Before calling any of these methods for the first time, the client must allocate the ctx structure and initialize it to NULL.
ORDAudio, ORDDoc, and ORDVideo methods related to media parsing have ctx (RAW) as the first argument. Before calling any of these methods for the first time, the client must allocate the ctx structure and initialize it to NULL.
I.3 Static Methods Common to All Oracle Multimedia Object Types
The following Oracle Multimedia common static methods are designed for the relational interface:
These common static methods for the ORDAudio, ORDDoc, ORDImage, and ORDVideo relational interfaces are defined in the ordaspec.sql
, orddspec.sql
, ordispec.sql
, and ordvspec.sql
files, respectively.
I.3.1 export( )
Format
export(ctx IN OUT RAW, local_data IN BLOB, source_type IN VARCHAR2, source_location IN VARCHAR2, source_name IN VARCHAR2);
Description
Copies data from a local source (local_data) within the database to an external data source.
Note:
The export( ) method provides native support only when the value of the source_type parameter is FILE
. In this case, this method writes the data to a file within a directory that is accessible to Oracle Database. User-defined sources may support the export( ) method to provide WRITE access to other types of data stores.
Parameters
- ctx
-
The source plug-in context information. (See Important Notes for Relational Methods.)
- local_data
-
The BLOB location that is being exported.
- source_type
-
The type of the external source data. This parameter is not case sensitive. (See Table 7-1.)
- source_location
-
The location to which the source data is to be exported. (See Table 7-2.)
- source_name
-
The name of the object to which the source data is to be exported. (See Table 7-3.)
Usage Notes
After calling the export( ) method, you can issue a SQL DELETE statement or call the DBMS_LOB.TRIM procedure to delete the content stored locally, if desired.
The export( ) method for a source type of FILE
does not modify data stored in the BLOB.
When the source_type parameter has a value of FILE
, the source_location parameter specifies the name of an Oracle directory object, and the source_name parameter specifies the name of the file to contain the data.
The export( ) method writes only to a database directory object that the user has privilege to access. That is, you can access a directory object that you have created using the SQL statement CREATE DIRECTORY, or one to which you have been granted READ and WRITE access.
For example, the following SQL*Plus commands create a directory object and grant the user mediauser
permission to read and write to any file within the directory c:\mydir\work
. Before executing these commands, you must be connected as a user with privileges to create a directory object.
CREATE OR REPLACE DIRECTORY FILE_DIR AS 'c:\mydir\work'; GRANT READ,WRITE ON DIRECTORY FILE_DIR TO mediauser;
Pragmas
None.
Exceptions
ORDSourceExceptions.INCOMPLETE_SOURCE_INFORMATION
This exception is raised if you call the export( ) method and the value of the source_type parameter is NULL
.
ORDSourceExceptions.METHOD_NOT_SUPPORTED
This exception is raised if you call the export( ) method and this method is not supported by the source plug-in being used.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.3.2 importFrom( )
Format
importFrom(ctx IN OUT RAW, local_data IN OUT NOCOPY BLOB, source_type IN VARCHAR2, source_location IN VARCHAR2, source_name IN VARCHAR2);
Description
Transfers data from the specified external data source to the BLOB specified by the local_data parameter.
Parameters
- ctx
-
The source plug-in context information. This parameter must be allocated and initialized to NULL. If you are using a user-defined source plug-in, call the openSource( ) method. (See Important Notes for Relational Methods.)
- local_data
-
The BLOB location to receive the data.
- source_type
-
The type of the source data. (See Table 7-1.)
- source_location
-
The location from which the source data is to be imported. (See Table 7-2.)
- source_name
-
The name of the source data. (See Table 7-3.)
Usage Notes
If the value of the source_type parameter is FILE
, the source_location parameter contains the name of a database directory object that contains the file to be imported, and the source_name parameter contains the name of the file to be imported. You must ensure that the directory for the external source location exists or is created before you use this method.
The importFrom( ) method reads only from a database directory object that the user has privilege to access. That is, you can access a directory object that you have created using the SQL statement CREATE DIRECTORY, or one to which you have been granted READ access.
For example, the following SQL*Plus commands create a directory object and grant the user mediauser
permission to read any file within the directory c:\mydir\work
. Before executing these commands, you must be connected as a user with privileges to create a directory object.
CREATE OR REPLACE DIRECTORY FILE_DIR AS 'c:\mydir\work'; GRANT READ ON DIRECTORY FILE_DIR TO mediauser;
If the value of the source_type parameter is HTTP
, the source_location parameter contains the base URL needed to find the directory that contains the object to be imported, and the source_name parameter contains the name of the object to be imported.
This method uses the PL/SQL UTL_HTTP package to import media data from an HTTP data source. You can use environment variables to specify the proxy behavior of the UTL_HTTP package. For example, on Linux and UNIX, setting the environment variable http_proxy to a URL specifies that the UTL_HTTP package must use that URL as the proxy server for HTTP requests. Setting the no_proxy environment variable to a domain name specifies that the HTTP proxy server not be used for URLs in the specified domain.
See Also:
Oracle Database PL/SQL Packages and Types Reference for more information about the UTL_HTTP package
If the value of the source_type parameter is a user-defined name, the source_location parameter contains an identifier string required to access the user-defined object to be imported, and the source_name parameter contains the name of the object to be imported.
Pragmas
None.
Exceptions
ORDSourceExceptions.METHOD_NOT_SUPPORTED
This exception is raised if you call the importFrom( ) method and this method is not supported by the source plug-in being used.
ORDSourceExceptions.NULL_SOURCE
This exception is raised if you call the importFrom( ) method and the value of the local_data parameter is NULL
or has not been initialized.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.3.3 importFrom( ) (with attributes)
Format
importFrom(ctx IN OUT RAW, local_data IN OUT NOCOPY BLOB, source_type IN VARCHAR2, source_location IN VARCHAR2, source_name IN VARCHAR2, format OUT VARCHAR2, mime_type OUT VARCHAR2);
Description
Transfers data from the specified external data source to the BLOB specified by the local_data parameter.
Parameters
- ctx
-
The source plug-in context information. (See Important Notes for Relational Methods.)
- local_data
-
The BLOB location to receive the data.
- source_type
-
The type of the source data. (See Table 7-1.)
- source_location
-
The location from which the source data is to be imported. (See Table 7-2.)
- source_name
-
The name of the source data. (See Table 7-3.)
- format
-
The format of the data. The value is returned if it is available (from HTTP sources).
- mime_type
-
The MIME type of the data. The value is returned if it is available (from HTTP sources).
Usage Notes
If the value of the source_type parameter is FILE
, the source_location parameter contains the name of a database directory object that contains the file to be imported, and the source_name parameter contains the name of the file to be imported. You must ensure that the directory for the external source location exists or is created before you use this method.
The importFrom( ) method reads only from a database directory object that the user has privilege to access. That is, you can access a directory object that you have created using the SQL statement CREATE DIRECTORY, or one to which you have been granted READ access.
For example, the following SQL*Plus commands create a directory object and grant the user mediauser
permission to read any file within the directory c:\mydir\work
. Before executing these commands, you must be connected as a user with privileges to create a directory object.
CREATE OR REPLACE DIRECTORY FILE_DIR AS 'c:\mydir\work'; GRANT READ ON DIRECTORY FILE_DIR TO mediauser;
If the value of the source_type parameter is HTTP
, the source_location parameter contains the base URL needed to find the directory that contains the object to be imported, and the source_name parameter contains the name of the object to be imported.
This method uses the PL/SQL UTL_HTTP package to import media data from an HTTP data source. You can use environment variables to specify the proxy behavior of the UTL_HTTP package. For example, on Linux and UNIX, setting the environment variable http_proxy to a URL specifies that the UTL_HTTP package must use that URL as the proxy server for HTTP requests. Setting the no_proxy environment variable to a domain name specifies that the HTTP proxy server not be used for URLs in the specified domain.
See Also:
Oracle Database PL/SQL Packages and Types Reference for more information about the UTL_HTTP package
If the value of the source_type parameter is a user-defined name, the source_location parameter contains an identifier string required to access the user-defined object to be imported, and the source_name parameter contains the name of the object to be imported.
Pragmas
None.
Exceptions
ORDSourceExceptions.METHOD_NOT_SUPPORTED
This exception is raised if you call the importFrom( ) method and this method is not supported by the source plug-in being used.
ORDSourceExceptions.NULL_SOURCE
This exception is raised if you call the importFrom( ) method and the value of the local_data parameter is NULL
or has not been initialized.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.4 Static Methods Unique to the ORDAudio Object Type Relational Interface
Some Oracle Multimedia static methods are unique to the ORDAudio relational interface.
The relational interface adds Oracle Multimedia support to audio data stored in BLOBs and BFILEs rather than in the ORDAudio object type. The static methods that are unique to the ORDAudio relational interface are defined in the ordaspec.sql
file.
I.4.1 getProperties( ) for BFILEs
Format
getProperties(ctx IN OUT RAW, audioBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the audio BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- audioBfile
-
The audio data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the audio BFILE data in XML form.
- format
-
The format of the audio data. If a non-NULL value is specified for this parameter, then the format plug-in for this format type is invoked.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDAudioExceptions.AUDIO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the audio plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.4.2 getProperties( ) (all attributes) for BFILEs
Format
getProperties(ctx IN OUT RAW, audioBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2 encoding OUT VARCHAR2, numberOfChannels OUT INTEGER, samplingRate OUT INTEGER, sampleSize OUT INTEGER, compressionType OUT VARCHAR2, audioDuration OUT INTEGER);
Description
Reads the audio BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the audio data: duration, MIME type, compression type, format, encoding type, number of channels, sampling rate, and sample size. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- audioBfile
-
The audio data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the audio BFILE data in XML form.
- mimeType
-
The MIME type of the audio data.
- format
-
The format of the audio data. If a non-NULL value is specified, then the format plug-in for this format type is invoked. If not specified, the default plug-in is used and the derived format value is returned.
- encoding
-
The encoding type of the audio data.
- numberOfChannels
-
The number of channels in the audio data.
- samplingRate
-
The sampling rate in samples per second at which the audio data was recorded.
- sampleSize
-
The sample width or number of samples of audio in the data.
- compressionType
-
The compression type of the audio data.
- audioDuration
-
The total time required to play the audio data.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDAudioExceptions.AUDIO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the audio plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.4.3 getProperties( ) for BLOBs
Format
getProperties(ctx IN OUT RAW, audioBlob IN BLOB, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the audio BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- audioBlob
-
The audio data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the audio BLOB data in XML form.
- format
-
The format of the audio data. If a non-NULL value is specified for this parameter, then the format plug-in for this format type is invoked; otherwise, the default plug-in is used.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDAudioExceptions.AUDIO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the audio plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.4.4 getProperties( ) (all attributes) for BLOBs
Format
getProperties(ctx IN OUT RAW, audioBlob IN BLOB, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2 encoding OUT VARCHAR2, numberOfChannels OUT INTEGER, samplingRate OUT INTEGER, sampleSize OUT INTEGER, compressionType OUT VARCHAR2, audioDuration OUT INTEGER);
Description
Reads the audio BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the audio data: duration, MIME type, compression type, format, encoding type, number of channels, sampling rate, and sample size. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- audioBlob
-
The audio data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the audio BLOB data in XML form.
- mimeType
-
The MIME type of the audio data.
- format
-
The format of the audio data. If a non-NULL value is specified, then the format plug-in for this format type is invoked. If not specified, the derived format value is returned.
- encoding
-
The encoding type of the audio data.
- numberOfChannels
-
The number of channels in the audio data.
- samplingRate
-
The sampling rate in samples per second at which the audio data was recorded.
- sampleSize
-
The sample width or number of samples of audio in the data.
- compressionType
-
The compression type of the audio data.
- audioDuration
-
The total time required to play the audio data.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDAudioExceptions.AUDIO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the audio plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.5 Static Methods Unique to the ORDDoc Object Type Relational Interface
There are several Oracle Multimedia static methods that are unique to the ORDDoc relational interface.
The relational interface adds Oracle Multimedia support to audio, image, video, and other heterogeneous media data stored in BLOBs and BFILEs rather than in the ORDDoc object type. The static methods that are unique to the ORDDoc relational interface are defined in the orddspec.sql
file.
I.5.1 getProperties( ) for BFILEs
Format
getProperties(ctx IN OUT RAW, docBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the document BFILE data to get the values of the media attributes, and then stores them in the input CLOB. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- docBfile
-
The document data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the document BFILE data in XML form.
- format
-
The format of the document data. If a non-NULL value is specified, then the format plug-in for this format type is invoked.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDDocExceptions.DOC_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the document plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.5.2 getProperties( ) (all attributes) for BFILEs
Format
getProperties(ctx IN OUT RAW, docBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2, contentLength OUT INTEGER);
Description
Reads the document BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the document data: MIME type, content length, and format. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- docBfile
-
The document data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the document BFILE data in XML form.
- mimeType
-
The MIME type of the document data.
- format
-
The format of the document data. If a non-NULL value is specified, then the format plug-in for this format type is invoked. If not specified, the derived format is returned.
- contentLength
-
The length of the content, in bytes.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDDocExceptions.DOC_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the document plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.5.3 getProperties( ) for BLOBs
Format
getProperties(ctx IN OUT RAW, docBlob IN BLOB, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the document BLOB data to get the values of the media attributes, and then stores them in the input CLOB. This method populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- docBlob
-
The document data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the document BLOB data in XML form.
- format
-
The format of the document data. If a non-NULL value is specified, then the format plug-in for this format type is invoked.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDDocExceptions.DOC_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the document plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.5.4 getProperties( ) (all attributes) for BLOBs
Format
getProperties(ctx IN OUT RAW, docBlob IN BLOB, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2, contentLength OUT INTEGER);
Description
Reads the document BLOB data to get the values of the media attributes, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the document data: MIME type, content length, and format. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- docBlob
-
The document data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the document BLOB data in XML form.
- mimeType
-
The MIME type of the document data.
- format
-
The format of the document data. If a non-NULL value is specified, then the format plug-in for this format type is invoked.
- contentLength
-
The length of the content, in bytes.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDDocExceptions.DOC_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the document plug-in raises an exception.
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.6 Static Methods Unique to the ORDImage Object Type Relational Interface
Several Oracle Multimedia static methods are unique to the ORDImage relational interface.
The relational interface adds Oracle Multimedia support to image data stored in BLOBs and BFILEs rather than in the ORDImage object type. The static methods that are unique to the ORDImage relational interface are defined in the ordispec.sql
file.
I.6.1 applyWatermark( ) image for BFILEs
Format
applyWatermark(imageBfile IN OUT NOCOPY BFILE, added_image IN OUT NOCOPY BFILE, dest IN OUT NOCOPY BLOB, logging OUT VARCHAR2, watermark_properties IN ordsys.ord_str_list default null);
Description
Overlays an image watermark onto a source image stored in a BFILE and writes it to a destination BLOB.
Parameters
- imageBfile
-
The source image data represented as a BFILE.
- added_image
-
The watermark image stored in a BFILE to be added to the source image.
- dest
-
The destination BLOB for the watermarked image.
- logging
-
A string that contains information about any unexpected behavior that occurred during the watermarking operation. If the operation is successful, an empty string is returned.
- watermark_properties
-
A string list of name-value pairs that define attributes of the watermark image, including: width, height, position, position_x, position_y, and transparency. See Table D-4 for the complete list of watermark properties.
Usage Notes
Calling this method processes the image into the destination BLOB from any source BFILE.
See Watermarking Operations for more information about watermarking operations and watermark properties.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the source image or added image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image BLOB is NULL.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.6.2 applyWatermark( ) image for BLOBs
Format
applyWatermark(imageBlob IN BLOB, added_image IN BLOB, dest IN OUT NOCOPY BLOB, logging OUT VARCHAR2, watermark_properties IN ordsys.ord_str_list default null);
Description
Overlays an image watermark onto a source image stored in a BLOB and writes it to a destination BLOB.
Parameters
- imageBlob
-
The source image data represented as a BLOB.
- added_image
-
The watermark image stored in a BLOB to be added to the source image.
- dest
-
The destination BLOB for the watermarked image.
- logging
-
A string that contains information about any unexpected behavior that occurred during the watermarking operation. If the operation is successful, an empty string is returned.
- watermark_properties
-
A string list of name-value pairs that define attributes of the watermark image, including: width, height, position, position_x, position_y, and transparency. See Table D-4 for the complete list of watermark properties.
Usage Notes
Because temporary LOBs do not have read consistency, you cannot use the same temporary LOB for both the imageBlob and dest parameters.
Calling this method processes the image into the destination BLOB from any source BLOB.
See Watermarking Operations for more information about watermarking operations and watermark properties.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the source image or added image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image BLOB is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.3 applyWatermark( ) text for BFILEs
Format
applyWatermark(imageBfile IN OUT NOCOPY BFILE, added_text IN VARCHAR2, dest IN OUT NOCOPY BLOB, logging OUT VARCHAR2, watermark_properties IN ordsys.ord_str_list default null);
Description
Overlays a text watermark onto a source image stored in a BFILE and writes it to a destination BLOB.
Parameters
- imageBfile
-
The source image data represented as a BFILE.
- added_text
-
The watermark text stored in a string to be added to the source image.
- dest
-
The destination BLOB for the watermarked image.
- logging
-
A string that contains information about any unexpected behavior that occurred during the watermarking operation. If the operation is successful, an empty string is returned. Otherwise, this method returns a string that describes the unexpected behavior. For example: if watermark text is so long that it is truncated, this string is returned:
WARNING: text is too long and truncated.
- watermark_properties
-
A string list of name-value pairs that define attributes of the watermark text, including: font_name, font_style, font_size, text_color, position_x, position_y, and transparency. See Table D-4 for the complete list of watermark properties.
Usage Notes
Calling this method processes the image into the destination BLOB from any source BFILE.
See Watermarking Operations for more information about watermarking operations and watermark properties.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the source image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image BLOB is NULL.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.6.4 applyWatermark( ) text for BLOBs
Format
applyWatermark(imageBlob IN BLOB, added_text IN VARCHAR2, dest IN OUT NOCOPY BLOB, logging OUT VARCHAR2, watermark_properties IN ordsys.ord_str_list default null);
Description
Overlays a text watermark onto a source image stored in a BLOB and writes it to a destination BLOB.
Parameters
- imageBfile
-
The source image data represented as a BLOB.
- added_text
-
The watermark text stored in a string to be added to the source image.
- dest
-
The destination BLOB for the watermarked image.
- logging
-
A string that contains information about any unexpected behavior that occurred during the watermarking operation. If the operation is successful, an empty string is returned. Otherwise, this method returns a string that describes the unexpected behavior. For example: if watermark text is so long that it is truncated, this string is returned:
WARNING: text is too long and truncated.
- watermark_properties
-
A string list of name-value pairs that define attributes of the watermark text, including: font_name, font_style, font_size, text_color, position_x, position_y, and transparency. See Table D-4 for the complete list of watermark properties.
Usage Notes
Because temporary LOBs do not have read consistency, you cannot use the same temporary LOB for both the imageBlob and dest parameters.
Calling this method processes the image into the destination BLOB from any source BLOB.
See Watermarking Operations for more information about watermarking operations and watermark properties.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the source image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image BLOB is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.5 getMetadata( ) for BFILEs
Format
getMetadata(imageBfile IN NOCOPY BFILE, metadataType IN VARCHAR2 DEFAULT 'ALL') RETURN XMLSequenceType;
Description
Extracts the specified types of metadata from the imageBfile and returns an array of schema-valid XML documents. If no matching metadata is found, an empty array is returned.
Parameters
Usage Notes
When the value of input parameter metadataType is ALL
, and two or more types of supported metadata are present in the image, this method returns several XML documents, one for each type of metadata found. For other values of the input parameter, the method returns zero or one XML document.
Each document is stored as an instance of XMLType, and is based on one of the metadata schemas. Use the XQuery function fn:namespace-uri
to determine the type of metadata represented in that document.
See Oracle Multimedia Metadata XML Schemas for information about the supported metadata schemas.
See Also:
-
Oracle Multimedia User's Guide for more information about the metadata feature
-
Oracle XML DB Developer's Guide for more information about XQuery functions
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBfile parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.6 getMetadata( ) for BLOBs
Format
getMetadata(imageBlob IN NOCOPY BLOB, metadataType IN VARCHAR2 DEFAULT 'ALL') RETURN XMLSequenceType;
Description
Extracts the specified types of metadata from the imageBlob and returns an array of schema-valid XML documents. If no matching metadata is found, an empty array is returned.
Parameters
Usage Notes
When the value of input parameter metadataType is ALL
, and two or more types of supported metadata are present in the image, this method returns several XML documents, one for each type of metadata found. For other values of the input parameter, the method returns zero or one XML document.
Each document is stored as an instance of XMLType, and is based on one of the metadata schemas. Use the XQuery function fn:namespace-uri
to determine the type of metadata represented in that document.
See Oracle Multimedia Metadata XML Schemas for information about the supported metadata schemas.
See Also:
-
Oracle Multimedia User's Guide for more information about the metadata feature
-
Oracle XML DB Developer's Guide for more information about XQuery functions
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBlob parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.7 getProperties( ) for BFILEs
Format
getProperties(imageBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB);
Description
Reads the image BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with a set of format properties in XML form.
Parameters
Usage Notes
None.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBfile parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.8 getProperties( ) (all attributes) for BFILEs
Format
getProperties(imageBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, width OUT INTEGER, height OUT INTEGER, fileFormat OUT VARCHAR2, contentFormat OUT VARCHAR2, compressionFormat OUT VARCHAR2, contentLength OUT INTEGER);
Description
Reads the image BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the image data: MIME type, width, height, file format, content format, compression format, and content length. It populates the CLOB with a set of format properties in XML form.
Parameters
- imageBfile
-
The image data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with a set of format properties of the image BFILE data in XML form.
- mimeType
-
The MIME type of the image data.
- width
-
The width of the image in pixels.
- height
-
The height of the image in pixels.
- fileFormat
-
The format of the image data.
- contentFormat
-
The type of image (monochrome, and so on).
- compressionFormat
-
The compression algorithm used on the image data.
- contentLength
-
The size of the image file on disk, in bytes.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBfile parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.9 getProperties( ) for BLOBs
Format
getProperties(imageBlob IN BLOB, attributes IN OUT NOCOPY CLOB);
Description
Reads the image BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with a set of format properties in XML form.
Parameters
Usage Notes
None.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBlob parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.10 getProperties( ) (all attributes) for BLOBs
Format
getProperties(imageBlob IN BLOB, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, width OUT INTEGER, height OUT INTEGER, fileFormat OUT VARCHAR2, contentFormat OUT VARCHAR2, compressionFormat OUT VARCHAR2, contentLength OUT INTEGER);
Description
Reads the image BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the image data: MIME type, width, height, file format, content format, compression format, and content length. It populates the CLOB with a set of format properties in XML form.
Parameters
- imageBlob
-
The image data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with a set of format properties of the image BLOB data in XML form.
- mimeType
-
The MIME type of the image data.
- width
-
The width of the image in pixels.
- height
-
The height of the image in pixels.
- fileFormat
-
The format of the image data.
- contentFormat
-
The type of image (monochrome, and so on).
- compressionFormat
-
The compression algorithm used on the image data.
- contentLength
-
The size of the image file on disk, in bytes.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL
.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the imageBlob parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.11 process( )
Format
process(imageBlob IN OUT NOCOPY BLOB, command IN VARCHAR2);
Description
Performs one or more image processing operations on a BLOB, writing the image back onto itself.
Parameters
Usage Notes
You can change one or more of the image attributes shown in Table 10-1. Table 10-2 shows additional changes that can be made only to raw pixel and foreign images.
See Oracle Multimedia Image Processing for more information about process( ) operators.
The process( ) method changes image attributes, therefore if you are storing image attributes, call the getProperties( ) method after calling the process( ) method.
Pragmas
None.
Exceptions
ORDImageExceptions.DATA_NOT_LOCAL
This exception is raised if you call the process( ) method and the imageBlob parameter is not initialized.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.12 processCopy( ) for BFILEs
Format
processCopy(imageBfile IN OUT NOCOPY BFILE, command IN VARCHAR2, dest IN OUT NOCOPY BLOB);
Description
Reads the image in the source BFILE, performs one or more image processing operations on the image, and then stores the resulting image in the destination BLOB. The original image content in the source BFILE remains unchanged.
Parameters
Usage Notes
See Table 10-1 and Table 10-2 for information about image processing operators.
Calling this method processes the image into the destination BLOB from any source BFILE.
The processCopy( ) method changes image attributes, therefore, if you are storing image attributes, call the getProperties( ) method on the destination image after calling the processCopy( ) method.
See Oracle Multimedia Image Processing for more information about processCopy( ) operators.
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_DESTINATION
This exception is raised if you call the processCopy( ) method and the destination image is NULL.
ORDImageExceptions.NULL_LOCAL_DATA
This exception is raised when the imageBfile parameter is NULL.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.6.13 processCopy( ) for BLOBs
Format
processCopy(imageBlob IN BLOB, command IN VARCHAR2, dest IN OUT NOCOPY BLOB);
Description
Reads the image in the source BLOB, performs one or more image processing operations on the image, and then stores the resulting image in the destination BLOB. The original image content in the source BLOB remains unchanged.
Parameters
Usage Notes
See Table 10-1 and Table 10-2 for information about image processing operators.
Because temporary LOBs do not have read consistency, you cannot use the same temporary LOB for both the imageBlob and dest parameters.
Calling this method processes the image into the destination BLOB from any source BLOB.
The processCopy( ) method changes image attributes, therefore, if you are storing image attributes, call the getProperties( ) method on the destination image after calling the processCopy( ) method.
See Oracle Multimedia Image Processing for more information about processCopy( ) operators.
Pragmas
None.
Exceptions
ORDImageExceptions.DATA_NOT_LOCAL
This exception is raised if you call the processCopy( ) method and the imageBlob parameter is not initialized.
See Exceptions for Oracle Multimedia Objects for more information about this exception.
Examples
None.
I.6.14 putMetadata( ) for BFILEs
Format
putMetadata(imageBfile IN NOCOPY BFILE, dest IN OUT NOCOPY BLOB xmlData IN NOCOPY XMLType, metadataType IN VARCHAR2 DEFAULT 'XMP', encoding IN VARCHAR2 DEFAULT "UTF-8");
Description
Accepts a BFILE containing an image and a schema-valid XML document, and creates a binary packet suitable for embedding in the target image file format. The packet is encoded according to the value of the encoding parameter. If the value of the metadataType parameter is XMP
, this method writes a new XMP packet to the image, replacing any existing XMP packets. The new image file with embedded metadata is returned in the dest parameter.
Parameters
- imageBfile
-
The BFILE handle to the image.
- dest
-
The BLOB to receive the image containing the embedded metadata.
- xmlData
-
The XMLtype that contains a schema-valid XML document for the indicated metadataType. If the value of the metadataType parameter is
XMP
, the root element should contain a well-formed RDF document. - metadataType
-
A string that specifies the type of metadata to write. The valid value is
XMP
; it is also the default. - encoding
-
The character encoding to be used in the image file. Valid values are:
UTF-8
,UTF-16
,UTF-16BE
, andUTF-16LE
. The default isUTF-8
.
Usage Notes
The binary metadata packet generated from the same xmlData input may have different sizes for different encodings. Different image file formats support different encodings, and may restrict the binary metadata packet size. The restrictions of the supported image formats are as follows:
-
GIF89a supports UTF-8 encoding only.
-
JPEG requires a binary packet size of less than 65502 bytes.
-
TIFF requires a binary packet size of less than 4 gigabytes.
See Also:
Oracle Multimedia User's Guide for more information about the metadata feature
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image is NULL.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.6.15 putMetadata( ) for BLOBs
Format
putMetadata(imageBlob IN NOCOPY BLOB, dest IN OUT NOCOPY BLOB xmlData IN NOCOPY XMLType, metadataType IN VARCHAR2 DEFAULT 'XMP', encoding IN VARCHAR2 DEFAULT "UTF-8");
Description
Accepts a BLOB containing an image and a schema-valid XML document, and creates a binary packet suitable for embedding in the target image file format. The packet is encoded according to the value of the encoding parameter. If the value of the metadataType parameter is XMP
, this method writes a new XMP packet to the image, replacing any existing XMP packets. The new image file with embedded metadata is returned in the dest parameter.
Parameters
- imageBlob
-
The BLOB handle to the image.
- dest
-
The BLOB to receive the image containing the embedded metadata.
- xmlData
-
The XMLtype that contains a schema-valid XML document for the indicated metadataType. If the value of the metadataType parameter is
XMP
, the root element should contain a well-formed RDF document. - metadataType
-
A string that specifies the type of metadata to write. The valid value is
XMP
; it is also the default. - encoding
-
The character encoding to be used in the image file. Valid values are:
UTF-8
,UTF-16
,UTF-16BE
, andUTF-16LE
. The default isUTF-8
.
Usage Notes
Because temporary LOBs do not have read consistency, you cannot use one temporary LOB for both the imageBlob and dest parameters. The binary metadata packet generated from the same xmlData input may have different sizes for different encodings. Different image file formats support different encodings, and may restrict the binary metadata packet size. The restrictions of the supported image formats are as follows:
-
GIF89a supports UTF-8 encoding only.
-
JPEG requires a binary packet size of less than 65502 bytes.
-
TIFF requires a binary packet size of less than 4 gigabytes.
See Also:
Oracle Multimedia User's Guide for more information about the metadata feature
Pragmas
None.
Exceptions
ORDImageExceptions.NULL_CONTENT
This exception is raised when the image is NULL.
ORDImageExceptions.NULL_DESTINATION
This exception is raised when the destination image is NULL.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.7 Static Methods Unique to the ORDVideo Object Type Relational Interface
Some Oracle Multimedia static methods are unique to the ORDVideo relational interface.
The relational interface adds Oracle Multimedia support to video data stored in BLOBs and BFILEs rather than in the ORDVideo object type. The static methods that are unique to the ORDVideo relational interface are defined in the ordvspec.sql
file.
I.7.1 getProperties( ) for BFILEs
Format
getProperties(ctx IN OUT RAW, videoBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the video BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- videoBfile
-
The video data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the video BFILE data in XML form.
- format
-
The format of the video data. If a non-NULL value is specified, then the format plug-in for this format type is invoked.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
ORDVideoExceptions.VIDEO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the video plug-in raises an exception.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.7.2 getProperties( ) (all attributes) for BFILEs
Format
getProperties(ctx IN OUT RAW, videoBfile IN OUT NOCOPY BFILE, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2, width OUT INTEGER, height OUT INTEGER, frameResolution OUT INTEGER, frameRate OUT INTEGER, videoDuration OUT INTEGER, numberOfFrames OUT INTEGER, compressionType OUT VARCHAR2, numberOfColors OUT INTEGER, bitRate OUT INTEGER);
Description
Reads the video BFILE data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the video data: MIME type, format, frame size, frame resolution, frame rate, video duration, number of frames, compression type, number of colors, and bit rate. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- videoBfile
-
The video data represented as a BFILE.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the video BFILE data in XML form.
- mimeType
-
The MIME type of the video data.
- format
-
The format of the video data. If a non-NULL value is specified, then the format plug-in for this format type is invoked. If specified as
NULL
, the format of the video data is returned. - width
-
The width of the frame in pixels of the video data.
- height
-
The height of the frame in pixels of the video data.
- frameResolution
-
The number of pixels per inch of frames in the video data.
- frameRate
-
The number of frames per second at which the video data was recorded.
- videoDuration
-
The total time required to play the video data.
- numberOfFrames
-
The total number of frames in the video data.
- compressionType
-
The compression type of the video data.
- numberOfColors
-
The number of colors in the video data.
- bitRate
-
The bit rate in the video data.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
ORDVideoExceptions.VIDEO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the video plug-in raises an exception.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.7.3 getProperties( ) for BLOBs
Format
getProperties(ctx IN OUT RAW, videoBlob IN BLOB, attributes IN OUT NOCOPY CLOB, format IN VARCHAR2);
Description
Reads the video BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB. This method populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- videoBlob
-
The video data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the video BLOB data in XML form.
- format
-
The format of the video data. If a non-NULL value is specified, then the format plug-in for this format type is invoked.
Usage Notes
None.
Pragmas
None.
Exceptions
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
ORDVideoExceptions.VIDEO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the video plug-in raises an exception.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.
I.7.4 getProperties( ) (all attributes) for BLOBs
Format
getProperties(ctx IN OUT RAW, videoBlob IN BLOB, attributes IN OUT NOCOPY CLOB, mimeType OUT VARCHAR2, format IN OUT VARCHAR2 width OUT INTEGER, height OUT INTEGER, frameResolution OUT INTEGER, frameRate OUT INTEGER, videoDuration OUT INTEGER, numberOfFrames OUT INTEGER, compressionType OUT VARCHAR2, numberOfColors OUT INTEGER, bitRate OUT INTEGER);
Description
Reads the video BLOB data to get the values of the media attributes for supported formats, and then stores them in the input CLOB and returns them as explicit parameters. This method gets the properties for these attributes of the video data: MIME type, format, frame size, frame resolution, frame rate, video duration, number of frames, compression type, number of colors, and bit rate. It populates the CLOB with an extensive set of format and application properties in XML form.
Parameters
- ctx
-
The format plug-in context information. (See Important Notes for Relational Methods.)
- videoBlob
-
The video data represented as a BLOB.
- attributes
-
The CLOB to hold the XML attribute information generated by the getProperties( ) method. This CLOB is populated with an extensive set of format and application properties of the video BLOB data in XML form.
- mimeType
-
The MIME type of the video data.
- format
-
The format of the video data. If a non-NULL value is specified, then the format plug-in for this format type is invoked. If specified as
NULL
, the format of the video data is returned. - width
-
The width of the frame in pixels of the video data.
- height
-
The height of the frame in pixels of the video data.
- frameResolution
-
The number of pixels per inch of frames in the video data.
- frameRate
-
The number of frames per second at which the video data was recorded.
- videoDuration
-
The total time required to play the video data.
- numberOfFrames
-
The total number of frames in the video data.
- compressionType
-
The compression type of the video data.
- numberOfColors
-
The number of colors in the video data.
- bitRate
-
The bit rate in the video data.
Usage Notes
If a property cannot be extracted from the media source, then the respective parameter is set to NULL.
Pragmas
None.
Exceptions
ORDSourceExceptions.EMPTY_SOURCE
This exception is raised when the value of the source.local attribute is 1
or 0
(TRUE), but the value of the source.localData attribute is NULL
.
ORDVideoExceptions.VIDEO_PLUGIN_EXCEPTION
This exception is raised if you call the getProperties( ) method and the video plug-in raises an exception.
See Exceptions for Oracle Multimedia Objects for more information about these exceptions.
Examples
None.