Oracle Video Client Software Guide
Release 2.1.8
A42334_4

Library

Product

Contents

Index


Prev Next

Appendix A
The Sample Applications

The software distribution for the Oracle Video Client includes sample client applications for several products. This appendix contains these sections that describe how to set up and use the sample applications:

This appendix lists the contents of each of these sample applications and describes how to set them up and run them.

Important

Different client platforms have their Oracle files installed in different areas. For this reason, file paths will be given relative to the variable location %ORACLE_HOME%, which should be read as the directory where you installed the Client.

When you install the Oracle Video Client software, sample applications for Oracle Power Objects, Oracle Forms, Microsoft Visual Basic, and internet browsers are installed in the directory %ORACLE_HOME%\vc21\demo.

Setting Up the Applications

The Oracle Forms and Oracle Power Objects sample applications illustrate how to incorporate videos with a database. Other sample applications do not require database access, but still require video server setup. This section describes the steps required to set up the client, video server, and database before you can run the sample applications.

Setting up the Oracle Video Server

The sample applications expect to find five video files in the directory $ORACLE_HOME/vs21/demo/content. The files are named oracle1.mpg, oracle2.mpg, oracle3.mpg, oracle4.mpg, and oracle5.mpg.

Note

The steps listed in this section assume a fresh install of the Oracle Video Server and that there is a volume named video in the Media Data Store (MDS).

To load these sample application video files into the Oracle Video Server:

  1. Log in as the owner of the Oracle Video Server files.
  2. Set the environment variable OMN_ADDR to the Media Net address of the server. For example, to set 192.25.102.201:5000 as the OMN_ADDR from a C-shell, enter:
  3. % setenv OMN_ADDR UDP:192.25.102.201:5000 
    
  4. Set the environment variable $ORACLE_HOME to the home directory of the owner of the Oracle Video Server files. For example, if /local/home/ovs is the home directory, enter:
  5. % setenv $ORACLE_HOME /local/home/ovs 
    
  6. Start the Oracle Video Server. If the Oracle Video Server is already running, there is no need to start it. However, if the Oracle Video Server is not running, start it by executing the script $ORACLE_HOME/vs21/admin/ovsstart.
  7. Copy the MPEG files into the newly created MDS volume. Change the current working directory to $ORACLE_HOME/vs21/demo/content, like this:
  8. % cd $ORACLE_HOME/vs21/demo/content
    

Use the MDS utility mdscopy to copy the files from the UNIX file system into the MDS. For example, if you have an MDS volume named video, you would enter:

    mdscopy ./oracle1.mpg /mds/video/oracle1.mpg 
    
    mdscopy ./oracle2.mpg /mds/video/oracle2.mpg 
    
    mdscopy ./oracle3.mpg /mds/video/oracle3.mpg 
    
    mdscopy ./oracle4.mpg /mds/video/oracle3.mpg 
    
    mdscopy ./oracle5.mpg /mds/video/oracle5.mpg 
    

See the Oracle Video Server Utilities User's Guide for further information on the MDS utilities.

  1. Tag the files in the MDS volume. Use the MDS utility vstag to create the tag files for the mpg files. For example:
  2. vstag -E mpi oracle1.mpg oracle2.mpg oracle3.mpg oracle4.mpg \ 
    oracle5.mpg 
    

See the Oracle Video Server Utilities User's Guide for further information on vstag.

Setting up the Oracle Video Client

To set up SQL *Net on the Oracle Video Client machine:

  1. Install SQL*Net v2 and TCP/IP adapter v2.
  2. Edit TNSNAMES.ORA to configure SQL*Net. To do this, copy %ORACLE_HOME%\NETWORK\ADMIN\SAMPLE\TNSNAMES.ORA to %ORACLE_HOME%\NETWORK\ADMIN\TNSNAMES.ORA.
  3. The sample applications connect to the database using a SQL*Net alias named "ovsdemo". If you are using SQL*Net TCP/IP, the entry in TNSNAMES.ORA should have this form:
  4. ovsdemo  =    
    
        (DESCRIPTION  =  
    
            (ADDRESS  =    
    
                (PROTOCOL  =  tcp)  
    
                (HOST  =  <name  or  ip  address  of  the  database  server>)      
    
                (PORT  =  1521)  
    
            )  
    
            (CONNECT_DATA  =  (SID  =  <SID  on  the  database  server>)  
    
            )  
    
        )  
    

Setting up the Database Server

To set up the database server:

  1. Install Oracle7, SQL*Net v2, and TCP/IP adapter v2 on the database server.
  2. Configure and start the Oracle7 server and SQL*Net v2 listener process.
  3. Create a user account named DEMO with password DEMO, and the appropriate system privileges:
  4.     SQL>  CREATE  USER  demo    
    
            2    IDENTIFIED  BY  demo  
    
            3    DEFAULT  TABLESPACE  users  
    
            4    TEMPORARY  TABLESPACE  temp  
    
            5    QUOTA  UNLIMITED  ON  users;  
    
        SQL>  GRANT  CREATE  SESSION  TO  demo;  
    
        SQL>  GRANT  CREATE  TABLE  to  demo;  
    
        SQL>  GRANT  CREATE  SEQUENCE  to  demo;  
    
      
    
  5. Copy the database export file from the client (%ORACLE_HOME%\vc21\demo\ovsdemo.dmp) to the server and import it into the DEMO account:
  6. % IMP demo/demo FILE=ovsdemo.dmp buffer=200000 
    

Oracle Video Web Plug-in Sample Pages

Some HTML files are installed on the client machine that will let you test the Web plug-in and play video from the video server. The following files are installed to %ORACLE_HOME%\VC21\DEMO\WWW\CLIENT:

VIDEO.HTM

BANNER.HTM

BLANK.HTM

INDEX.HTM

TITLE.HTM

ORACLE1.HTM

ORACLE2.HTM

ORACLE3.HTM

ORACLE4.HTM

ORACLE5.HTM

OVS_BAN.GIF

ORACLE1.GIF

ORACLE2.GIF

ORACLE3.GIF

ORACLE4.GIF

ORACLE5.GIF

ORACLE.MPG

To test use these pages, load the file index.htm with your web browser by opening this URL:

file://C:\ORAWIN\VC21\DEMO\WWW\CLIENT\index.HTm

Oracle Video Web Plug-in: Unix Web Server

The sample assumes that you are using a common UNIX httpd server (or a server with UNIX utilities, such as AWK) in standard configuration. The sample illustrates:

The sample also requires that both the video server and the web server reside on the same machine.

The sample web pages that reference the Oracle Video Web Plug-in and server scripts are installed in the directory %ORACLE_HOME%\VC21\DEMO\WWW\SERVER\UNIX. The files in the WWW directory are:

File   Contains  

The following file is in the directory %ORACLE_HOME%\VC21\DEMO\WWW\SERVER\UNIX\HTDOCS  

index.htm  

The sample page for the Oracle Video Web Plug-in.  

The following files are in the directory %ORACLE_HOME%\VC21\DEMO\WWW\SERVER\UNIX\HTDOCS\IMAGES  

vid_ban.gif  

A GIF image used in index.htm.  

vid_diag.gif  

A GIF image used in index.htm.  

vidopt.gif  

A GIF image used in mpgpage1 and mpgpage2.  

The following file is in the directory %ORACLE_HOME%\VC21\DEMO\WWW\SERVER\UNIX\HTDOCS\VIDEOS  

oracle.mpg  

A 1-kilobyte MPEG file specified in the src attribute of the embed element.  

The following files are in the directory %ORACLE_HOME%\VC21\DEMO\WWW\SERVER\UNIX\CGI-BIN  

content  

A CGI shell script that retrieves a list of video content from a specified Oracle Video Server.  

mpgpage1  

A CGI shell script that plays a specified video from one Oracle Video Server.  

mpgpage2  

A CGI script that plays a specified video from another Oracle Video Server.  

Setting up the Web Server

To set up the web server:

  1. Copy vid_ban.gif, vid_diag.gif, and vidopt.gif to htdocs/images directory.
  2. Create a videos directory in the htdocs directory.
  3. Copy oracle.mpg to htdocs/videos.
  4. Copy index.htm to the htdocs directory. On some httpd servers you might need to rename index.htm to index.html to that it becomes the default index page.
  5. Modify the href elements in index.htm so that they specify actual Media Net addresses (UDP and port number) and Media Data Store volume names and tag file names (such as /mds/video/oracle1.mpi) for your Oracle Video Servers.
  6. Optionally modify content, mpgpage1, and mpgpage2 so that if the user doesn't specify a Media Net address, the scripts provide a value that is meaningful on your system.
  7. The web server should be configured to support the video file's MIME type. See Chapter 3, Oracle Video Server Web Plug-in, for more information on dummy files. Consult your web server documentation for information on MIME type support.

Oracle Video Web Plug-in: Windows NT Web Server

The sample assumes that you have the NT version of Perl installed. The sample illustrates:

The sample also requires that both the video server and the web server reside on the same machine.

The sample web pages that reference for the Oracle Video Web Plug-in and server scripts are installed in the directory %ORACLE_HOME%\VC21\DEMO\WWW\server\Winnt. The files in the WWW directory are:

File   Contains  

The following file is in the directory %ORACLE_HOME%\Vc21\Demo\www\Server\Winnt\Htdocs  

index.htm  

The sample page for the Oracle Video Web Plug-in.  

The following files are in the directory %ORACLE_HOME%\Vc21\Demo\www\Server\Winnt\Htdocs\Images  

vid_ban.gif  

A GIF image used in index.htm.  

vid_diag.gif  

A GIF image used in index.htm.  

vidopt.gif  

A GIF image used in mpgpage.pl.  

The following file is in the directory %ORACLE_HOME%\vc21\demo\www\server\winnt\htdocs\videos  

oracle.mpg  

A 1-kilobyte MPEG file specified in the src attribute of the embed element.  

The following files are in the directory %ORACLE_HOME%\vc21\demo\www\server\winnt\cgi-bin  

content.pl  

A CGI shell script that retrieves a list of video content from a specified Oracle Video Server.  

mpgpage.pl  

A CGI shell script that plays a specified video from one Oracle Video Server.  

mdsdirvr.bat  

Batch file used by content.pl Perl script.  

Oracle Power Objects

The sample client application for Oracle Power Objects is installed in the directory %ORACLE_HOME%\VC21\DEMO\OPO. The files in the OPO directory are:

File   Contains  

NODB.POA  

An Oracle Power Objects application that accesses the video server without any database access.  

OVSDEMO.POA  

Provides content management functions for:

  • videos on the Oracle Video Server
  • bitmaps and video information stored in a remote database.

 

OVSDEMO.POS  

A database session for use with OVSDEMO.POA.  

Running the Application

  1. Start Oracle Power Object Designer
  2. Open %ORACLE_HOME%\VC21\DEMO\OPO\OMSDEMO.POA (or NODB.POA)
  3. Choose Run Application from the Run menu.

Microsoft Visual Basic

The sample client application for Microsoft Visual Basic is installed in the directory %ORACLE_HOME%\VC21\DEMO\VB. The files in the VB directory are:

File   Contains  

OVSDEMO.VBP  

A Microsoft Visual Basic application that accesses the video server without any database access.  

CONTROL.FRM  

A form that uses the controls that are built into the Oracle Video Custom Control.  

NOCONTRO.FRM  

A form that uses Visual Basic buttons.  

MOVIE.CLS  

A Visual Basic class containing "generic" OCX handler code.  

MAINMENU.FRM  

The main menu form for the application.  

Running the Application

To run the application:

  1. Start Microsoft Visual Basic
  2. Open %ORACLE_HOME%\VC21\DEMO\VB\OVSDEMO.VBP.
  3. Choose "Start" from the Run menu.

Oracle Forms

The sample client application for Oracle Forms is installed in the directory %ORACLE_HOME%\VC21\DEMO\FORMS. The files in the FORMS directory are:

File   Contains  

BLOBMAIN.FMB  

A form used to browse bitmaps stored in the database  

BROWSER.FMB  

A form used to browse video information stored in the database  

LISTBROW.FMB  

A form used to browse video information stored in the database using a list  

MAINTAIN.FMB  

A form used to associate bitmaps with videos  

MENU.FMB  

The main menu form of the application  

NODBPLAY.FMB  

An Oracle Forms application that access the video server without any database access  

PLAYPOP.FMB  

A pop-up form called by BROWSER.FMB  

Running the Application

  1. Start Forms Designer (v4.5.7). Within the Forms Designer, open each of the files listed above and generate an executable (FMX) file.
  2. Open %ORACLE_HOME%\VC21\DEMO\FORMS\MENU.FMB
  3. The menu application assumes that the forms are located in the directory %ORACLE_HOME%\VC21\DEMO\FORMS. If you have moved them, you will need to modify MENU.FMB and BROWSER.FMB.

  4. Choose Connect... from the File menu, and connect using these values:
  5. Choose Run from the File menu
  6. 
    




Prev

Next
Oracle
Copyright © 1997 Oracle Corporation.
All Rights Reserved.

Library

Product

Contents

Index