Image, Audio, and Video Extenders Administration and Programming
Opens the video player on the client and plays a video. The video
can be stored in a video column or an external file:
- If the video is stored in an external file, you can pass either the name
of the file or the video handle to this API. The API uses the client
environment variable DB2VIDEOPATH to resolve the file location. The
file must be accessible from the client workstation.
- If the video is stored in a column, you must pass the video handle to the
API. The application must be connected to the database and have read
access to the table in which the video is stored.
If the video is stored in a column, the extender creates a temporary file
and copies the content of the object from the column to the file. The
extender might also create a temporary file if the video is stored in an
external file and its relative filename cannot be resolved using the values in
environment variables, or if the file is not accessible on the client
machine. The temporary file is created in the directory specified in
the DB2VIDEOTEMP environment variable. The extender then plays the
video from the temporary file.
Authorization
Select authority on the user table, if playing a video from a
column.
Library file
OS/2 and Windows
| AIX, HP-UX, and Solaris
|
dmbvideo.lib
| libdmbvideo.a (AIX)
|
| libdmbvideo.sl (HP-UX)
|
| libdmbvideo.so (Solaris)
|
Include file
dmbvideo.h
Syntax
Play a video stored in a column
long DBvPlay(
char *playerName,
MMDB_PLAY_HANDLE,
DB2Video *videoHandle,
waitFlag
);
Syntax
Play a video stored as a file
long DBvPlay(
char *playerName,
MMDB_PLAY_FILE,
char *fileName,
waitFlag
);
Parameters
- playerName (in)
- The name of the video player. If set to NULL, the default video
player specified by the DB2VIDEOPLAYER environment variable is used.
- MMDB_PLAY_HANDLE (in)
- A constant that indicates the video is stored in a column.
- MMDB_PLAY_FILE (in)
- A constant that indicates the video is stored as a file that is accessible
from the client.
- videoHandle (in)
- The handle of the video. This parameter must be passed when you
play a video in a column. If the video handle represents an external
file, the client environment variable DB2VIDEOPATH is used to resolve the file
location.
- fileName (in)
- The name of the file that contains the video. The API uses the
client environment variable DB2VIDEOPATH to resolve the file location.
The file must be accessible from the client workstation.
- waitFlag (in)
- A constant that indicates whether your program waits for the user to close
the player before continuing. MMDB_PLAY_WAIT runs the player in the
same thread as your application. MMDB_PLAY_NO_WAIT runs the player in a
separate thread.
Error codes
- MMDB_SUCCESS
- API call processed successfully.
- MMDB_RC_NO_AUTH
- Caller does not have the proper access authority.
- MMDB_RC_NOT_CONNECTED
- Application does not have valid connection to a database.
Examples
Play the video identified by the videoHandle. Run the default player
in the same thread as the application:
#include <dmbvideo.h>
rc = DBvPlay(NULL, MMDB_PLAY_HANDLE, videoHandle,
MMDB_PLAY_WAIT);
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]