Usage

Applications can use AIV Extenders by calling UDFs in SQL statements or by calling the AIV Extender API. Calling UDFs is the preferred method of using AIV Extenders from remote clients because they do not require the AIV Extenders client to be installed locally. Applications linking to the API must have AIV Extenders server or client installed on the same machine.

AIV Extender UDFs

Many UDFs are available to extend SQL functionality for media data. AIV Extenders can be used to display and play video and audio clips. It also can use QBICs for searching images by content, and detecting a scene change in a video. Some UDFs are available for more than one media type. Some UDFs are available for all three. Table 17.1 lists some of the UDFs that are available and the media types they support.

Table 17.1. AIV Extender UDF
FunctionDescriptionMedia Types
AlignValueReturns the number of bytes per sample in a WAVE audio or in an audio track of a videoAudio and Video
AspectRatioReturns the aspect ratio of the first track of an MPEG1 and MPEG2 videoVideo
BitsPerSampleReturns the number of bits of data used to represent each sample of WAVE or AIFF audio in an audio or in an audio track of a videoAudio and Video
BytesPerSecReturns the data transfer rate in average bytes per second for a WAVE audioAudio
CommentReturns or updates a comment stored with an image, audio, or videoAll
CompressTypeReturns the compression format, such as MPEG-1, of a videoVideo
ContentRetrieves or updates the content of an image, audio, or video from a databaseAll
DB2AudioStores the content of an audio in a database tableAudio
DB2ImageStores the content of an image in a database tableImage
DB2VideoStores the content of a video in a database tableVideo
DurationReturns the duration (that is, playing time in seconds) of a WAVE or AIFF audio, or videoAudio and Video
FilenameReturns the name of the server file that contains the contents of an image, audio, or videoAll
FindInstrumentReturns the track number of the first occurrence of a specified instrument in a MIDI audioAudio
FindTrackNameReturns the number of a specified named track in a MIDI audioAudio
FormatReturns the format of an image, audio, or videoAll
FrameRateReturns the throughput of a video in frames per secondVideo
GetInstrumentsReturns the instrument name of all instruments in a MIDI audioAudio
GetTrackNamesReturns the name of all tracks in a MIDI audioAudio
HeightReturns the height, in pixels, of an image or video frameImage and Video
ImporterReturns the user ID of the person who stored an image, audio, or video in a database tableAll
ImportTimeReturns a timestamp that indicates when an image, audio, or video was stored in a database tableAll
MaxBytesPerSecReturns the maximum throughput of a video in bytes per secondVideo
NumAudioTracksReturns the number of audio tracks in a video or MIDI audioAudio and Video
NumChannelsReturns the number of recorded audio channels in a WAVE or AIFF audio or videoAudio and Video
NumColorsReturns the number of colors in an imageImage
NumFramesReturns the number of frames in a videoVideo
NumVideoTracksReturns the number of video tracks in a videoVideo
QbScoreFromNameReturns the score of an image (uses a named query object)Image
QbScoreFromStrReturns the score of an image (uses a query string)Image
QbScoreTBFromNameReturns a table of scores for an image column (uses a named query object)Image
QbScoreTBFromStrReturns a table of scores for an image column (uses a query string)Image
ReplaceUpdates the content of an image, audio, or video stored in a database, and updates its commentAll
SamplingRateReturns the sampling rate of a WAVE or AIFF audio, or of an audio track in a video, in number of samples per secondAudio and Video
SizeReturns the size of an image, audio, or video in bytesAll
ThumbnailReturns or updates a thumbnail-size version of an image or video frame stored in a databaseImage and Video
TicksPerQNoteReturns the clock speed of a recorded MIDI audio, in ticks per quarter noteAudio
TicksPerSecReturns the clock speed of a recorded MIDI audio, in ticks per secondAudio
UpdaterReturns the user ID of the person who last updated an image, audio, or video in a database tableAll
UpdateTimeReturns a timestamp that indicates when an image, audio, or video in a database table was last updatedAll
WidthReturns the width in pixels of an image or video frameImage and Video

UDFs are a subset of the available AIV Extender APIs. In addition to displaying and playing video and audio clips, searching images by content, and detecting a scene change in a video, API functions also can be used to prepare and maintain a database for AIV Extenders. Applications calling AIV Extender API functions must be executed locally on the database search or on a DB2 client with the AIV Extender client installed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.230.172