IBM Books

Image, Audio, and Video Extenders Administration and Programming

Duration


Image Audio Video
  X X

Returns the duration (that is, the playing time in seconds) of a WAVE or AIFF audio, or video.

Include file

audio
dmbaudio.h

video
dmbvideo.h

Syntax

>>-Duration--(--handle--)--------------------------------------><
 

Parameters (data type)

handle (DB2AUDIO or DB2VIDEO)
Column name or host variable that contains the handle of the audio or video.

Return values (data type)

Duration, in seconds, of a video, or the duration, in seconds, of a WAVE, AIFF or user-defined format audio (INTEGER). Returns a null value for audio in other formats.

Examples

Display the duration of all videos that are stored in the video column of the employee table:

EXEC SQL BEGIN DECLARE SECTION;
long hvDur_vid;
EXEC SQL END DECLARE SECTION;
 
EXEC SQL SELECT DURATION(VIDEO)
     INTO :hvDur_vid
     FROM EMPLOYEE;


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]