Oracle® interMedia Annotator User's Guide Release 9.2 Part No. A96120-01 |
|
This chapter describes how to get started in using Oracle interMedia Annotator. It discusses the following topics:
Before you can use Oracle interMedia Annotator, you must specify preferences for the environment. You specify the preferences in the Annotator.prefs
file, located in the configuration directory. By default, Oracle interMedia Annotator assumes that the configuration directory is the \lib\conf
or /lib/conf
subdirectory of the current directory.
However, at installation, the configuration files are placed in the following directory:
On UNIX: $ORACLE_HOME
/ord/Annotator/lib/conf
On Windows: ORACLE_HOME
\ord\Annotator\lib\conf
You must ensure that the configuration directory contains the preferences file and other configuration files before you use Oracle interMedia Annotator. For example, if you run interMedia Annotator from the directory /usr5/myfiles
, interMedia Annotator assumes the configuration directory to be /usr5/myfiles/lib/conf
.
The format of entries in the preferences file is:
preference_parameter=preference_value
Table 2-1 shows the names of the preference parameters and the possible values for each parameter.
Table 2-1 Preferences
You can also set preferences by using the Preferences.setProperty( ) method. See "setProperty( )" for more information.
The following sections discuss using some of the preferences to configure your environment before you begin to use Oracle interMedia Annotator.
You can connect to an Oracle database using the JDBC Thin driver or the JDBC OCI driver.
To use the JDBC Thin driver, specify the following in the Annotator.prefs
file:
For the value of the parameter connectDriver
, enter the following:
oracle.jdbc.driver.OracleDriver
For value of the parameter connectJDBCProt
, enter the following:
jdbc:oracle:thin
For value of the parameter serviceName
, enter the service name of your database, using the following format:
host-name:port_name:oracle-sid
To use the JDBC OCI driver, specify the following:
For the value of the parameter connectDriver
, enter the following:
oracle.jdbc.driver.OracleDriver
For value of the parameter connectJDBCProt
, enter the following:
jdbc:oracle:oci8:@
For the value of the parameter serviceName
, enter the service name of your database, using the syntax used by Oracle Net. See the Oracle9i Net Services Administrator's Guide for more information.
Oracle interMedia Annotator can annotate media sources that are available remotely over the Internet through the HTTP protocol.
If you are running in a secure environment, you must configure Oracle interMedia Annotator to use your proxy server before you can access the Internet. To configure the proxy server, specify the following in the Annotator.prefs
file:
For the parameter useHttpProxy
, enter the value true
.
For the parameter httpProxyServer
, enter the address of your HTTP proxy server. For example:
www-ourproxy.ourcompany.com
For the parameter httpProxyPort
, enter the port number for the HTTP proxy server.
Oracle interMedia Annotator can parse media sources accessible through the URL protocols shown in Table 2-2.
Table 2-2 Available URL Protocols
URL Protocol | Description |
---|---|
file |
Access all the files on local or remotely mounted disks in your computer. |
http |
Access media available through an Internet Web server. |
If you are parsing a local file or a file available over the Internet through the HTTP protocol, Oracle interMedia Annotator extracts the time-independent attributes from the media file and inserts them into a logical annotation.
If you are parsing a media source with multiple tracks, such as a video source, a subannotation is created for each track.
To use Oracle interMedia Annotator, you take the following general steps:
Optionally, set preferences using the Preferences.setProperty( ) method. You can set preferences such as the type of JDBC driver or information about the HTTP Server proxy. See setProperty( ) for more information about this method.
Parse a media source file from a given URL to create an annotation about the source. Use the Annotation.parseMedia( ) method to parse the source file.
Optionally, get the defined attributes of the annotation and set additional attributes for the annotation.
Oracle interMedia Annotator defines a given number of attributes (see Appendix C for a complete list of attributes). However, not all media sources will provide values for every attribute. You can use the Annotation.getAttribute( ) method to get the existing attributes and the Annotation.setAttribute( ) method to add a value to your annotation for any attribute that does not have a value.
Get any subannotations using the Annotation.getSubAnnotations( ) method and, optionally, define additional subannotations, using the Annotation.addSubAnnotation( ) method.
An annotation will usually contain one or more subannotations, which contain the metadata associated with a portion of the media source, such as a text track or an audio track. In addition to these populated subannotations, you can define your own subannotations by adding an empty annotation and then populating it with your own values.
For parsers such as the QuickTime parser, you can extract media samples from the media source file, using the AnnotationHandler.extractMedia( ) method.
Upload the annotation to an Oracle database, using the AnnotationHandler.insertMedia( ) method.
Note: Oracle interMedia Annotator cannot change the attribute values in the media itself; it can change only the attribute values in the extracted annotation. If you parse the media file again, your annotation will be overwritten and any attributes that you have edited will revert to their original values. |
Chapter 3 describes a sample program that parses a media source file, creates an annotation, and uploads the annotation to an Oracle database.
|
Copyright © 1999, 2002 Oracle Corporation All rights reserved |
|