Functions
VideoFunctions

For a specified video format, returns the default color mode, and whether each of the various color modes is supported for export. More...

Functions

VIDEOLIB_EXPORT int mdlVideo_getExportSupport (int *defaultModeP, int *rgbSupportP, int *palette256SupportP, int *palette16SupportP, int *greyScaleSupportP, int *monochromeSupportP, int videoType)
 
VIDEOLIB_EXPORT int mdlVideo_getExtension (WCharP ext, int type)
 Returns the default three character file extension for the specified image format. More...
 
VIDEOLIB_EXPORT int mdlVideo_createFileFromBitMap (WCharCP nameP, int type, Point2d *sizeP, byte *bitMapP, bool runLengthEncode, RgbColorDef *foregroundColorP, RgbColorDef *backgroundColorP)
 creates an image file from a memory bitmap. More...
 
VIDEOLIB_EXPORT int mdlVideo_createFileFromBuffer (WCharCP saveAsFileNameP, int fileType, DgnPlatform::ImageColorMode colorMode, Point2d *sizeP, byte *imageDataP, int imageFormat, void *param1P, void *param2P, void *param3P, int paletteSize, int compressType)
 Creates a video file from an image buffer by using the imageFormat to determine how to best write the file. More...
 
VIDEOLIB_EXPORT int mdlVideo_createFileFromMap (WCharCP name, int type, DgnPlatform::ImageColorMode colorMode, Point2d *sizeP, byte *imageMapP, byte *redPaletteP, byte *grnPaletteP, byte *bluPaletteP, int paletteSize)
 Creates the video file specified by fileName, fileType and colorMode from a mapped image. More...
 
VIDEOLIB_EXPORT int mdlVideo_createFileFromRGB (WCharCP name, int type, DgnPlatform::ImageColorMode colorMode, Point2d *sizeP, byte *imageBufferP)
 Creates the video file specified by fileName, fileType and colorMode from an RGB image. More...
 
VIDEOLIB_EXPORT int mdlVideo_extCreateFileFromMap (WCharCP name, int type, DgnPlatform::ImageColorMode colorMode, Point2d *sizeP, byte *imageMapP, byte *redPaletteP, byte *grnPaletteP, byte *bluPaletteP, int paletteSize, int compressType, byte *transparencyP)
 Creates the video file specified by fileName, fileType and colorMode from a mapped image, allowing compression and transparency to be set. More...
 
VIDEOLIB_EXPORT int mdlVideo_extCreateFileFromRGB (WCharCP name, int type, DgnPlatform::ImageColorMode colorMode, Point2d *sizeP, byte *imageBufferP, int compressType, byte *transparencyP)
 Creates the video file specified by fileName, fileType and colorMode from an RGB image, allowing compression type and transparency to be set. More...
 
VIDEOLIB_EXPORT int mdlVideo_saveMovie (WCharP fileName, int fileType, DgnPlatform::ImageColorMode colorMode, DgnPlatform::MSMovie *movieP)
 Saves a movie sequence to a single animation file or series of single image files. More...
 
VIDEOLIB_EXPORT int mdlVideo_extendedSaveMovie (WCharCP fileName, int fileType, DgnPlatform::ImageColorMode colorMode, DgnPlatform::MSMovie *movieP, int compression)
 Saves a movie sequence to a single animation file or series of single image files. More...
 
VIDEOLIB_EXPORT int mdlVideo_readMovie (DgnPlatform::MSMovie *movieP, WCharP fileName, int fileType, byte *redMapP, byte *grnMapP, byte *bluMapP, int paletteSize, double gammaCorrection)
 Reads a sequence of images from a single animation file or a series of single image files and stores them in the DgnPlatform::MSMovie structure movieP. More...
 
VIDEOLIB_EXPORT int mdlVideo_readMovieWithBuffering (DgnPlatform::MSMovie *movieP, WCharCP fileName, int fileType, byte *redMapP, byte *grnMapP, byte *bluMapP, int paletteSize, double gammaCorrection, bool firstFrameOnly)
 Reads a sequence of images from a single animation file or a series of single image files and stores them in the DgnPlatform::MSMovie structure movieP. More...
 
VIDEOLIB_EXPORT int mdlVideo_insertMovie (DgnPlatform::MSMovie *movieP, DgnPlatform::MSMovieFrame *insertFrameP, DgnPlatform::MSMovie *insertMovieP, int transitionType, int transitionFrames, bool stillTransition)
 Inserts the movie specified by insertMovieP into the movie movieP at insertFrameP. More...
 
VIDEOLIB_EXPORT int mdlVideo_insertMovieFrame (DgnPlatform::MSMovie *movieP, DgnPlatform::MSMovieFrame *insertFrameP, byte *rgbFrameP)
 Inserts a single frame from an RGB buffer into a movie sequence. More...
 
VIDEOLIB_EXPORT int mdlVideo_deleteMovieFrame (DgnPlatform::MSMovie *movieP, DgnPlatform::MSMovieFrame **framePP)
 mdlVideo_deleteMovieFrame deletes the frame framePP from the movie movieP. More...
 
VIDEOLIB_EXPORT void mdlVideo_freeMovie (DgnPlatform::MSMovie *movieP)
 mdlVideo_freeMovie frees the memory associated with a movie. More...
 
VIDEOLIB_EXPORT int mdlVideo_createFli (void **fliFilePP, Point2d *sizeP, int speed, WCharCP fileName, bool flcFormat)
 Creates an AutoDesk Animator FLI or FLC file. More...
 
VIDEOLIB_EXPORT int mdlVideo_appendFliFromMap (void *fliP, byte *mapP, byte *redMapP, byte *grnMapP, byte *bluMapP, int paletteSize)
 Appends a movie frame to an AutoDesk Animator FLI or FLC file. More...
 
VIDEOLIB_EXPORT int mdlVideo_appendFliFromRGB (void *fliP, byte *redMapP, byte *grnMapP, byte *bluMapP, int paletteSize, byte *imageBuffer)
 Appends a movie frame to an AutoDesk Animator FLI or FLC file. More...
 
VIDEOLIB_EXPORT void mdlVideo_completeFli (void *fliP)
 Closes an AutoDesk Animator FLI or FLC file and frees the internal buffers. More...
 
VIDEOLIB_EXPORT bool mdlVideo_isAVIAvailable ()
 Determine whether the AVI file format is supported on the current MicroStation platform. More...
 
VIDEOLIB_EXPORT int mdlVideo_createMovie (void **movieContextPP, DgnPlatform::MSMovie *movieP, WCharCP fileName, int fileType)
 Begins the process of saving a sequence of images to disk. More...
 
VIDEOLIB_EXPORT int mdlVideo_addMovieFrame (void *movieContextP, DgnPlatform::MSMovie *movieP, byte *imageP, BeFileNameR fileNameP, int fileType, DgnPlatform::ImageColorMode colorMode, int compression)
 Adds a single frame to the movie sequence initialized with mdlVideo_createMovie. More...
 
VIDEOLIB_EXPORT int mdlVideo_completeMovie (void *movieContextP, DgnPlatform::MSMovie *movieP, WCharCP fileName, int fileType, DgnPlatform::ImageColorMode colorMode, int compression)
 Completes the process of saving an animation file. More...
 

Detailed Description

For a specified video format, returns the default color mode, and whether each of the various color modes is supported for export.

Parameters
[out]defaultModePdefault color mode.
[out]rgbSupportPsupport for 24 bit RGB.
[out]palette256SupportPsupport for 256 color palette.
[out]palette16SupportPsupport for 16 color palette.
[out]greyScaleSupportPsupport for grey scale.
[out]monochromeSupportPsupport for monochrome.
[in]videoTypevideo type (from image.h).
Returns
SUCCESS if the file type is supported; MDLERR_BADARG if it is not.
Remarks
Required Library: videolib.lib

Function Documentation

VIDEOLIB_EXPORT int mdlVideo_addMovieFrame ( void *  movieContextP,
DgnPlatform::MSMovie *  movieP,
byte imageP,
BeFileNameR  fileNameP,
int  fileType,
DgnPlatform::ImageColorMode  colorMode,
int  compression 
)

Adds a single frame to the movie sequence initialized with mdlVideo_createMovie.

For the FLI and FLC single image formats, the frame is appended to the movie movieP.

When all frames have been added, mdlVideo_completeMovie should be called. mdlVideo_freeMovie should then be called to free the buffers allocated for the movie.

Parameters
[in]movieContextPpointer to the buffer allocated by the call to mdlVideo_createMovie.
[in]moviePpointer to a DgnPlatform::MSMovie structure
[in]imagePan RGB image buffer of the movie frame to add.
[in,out]fileNamePfor formats that save to a series of single images, the file name for the single image file to be created. The fileNameP returned will be that for the next frame in the series. For the single file formats, fileNameP is the name of the animation file.
[in]fileTypespecifies the image format for the animation sequence. Image formats are defined in image.h and begin with IMAGEFILE_.
[in]colorModespecifies whether a imageP is to be saved as a true-color or mapped image. Color modes are defined in image.h and begin with COLORMODE_.
[in]compressionspecifies the type of compression to be used (from image.h), for those formats that support it.
Returns
SUCCESS if is the movie frame is successfully added/created.
If processing is aborted by a non-zero return value from stopFunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
Required Library: videolib.lib
See also
mdlVideo_createMovie mdlVideo_completeMovie
VIDEOLIB_EXPORT int mdlVideo_appendFliFromMap ( void *  fliP,
byte mapP,
byte redMapP,
byte grnMapP,
byte bluMapP,
int  paletteSize 
)

Appends a movie frame to an AutoDesk Animator FLI or FLC file.

These files contain an entire sequence of images, with each frame defined by the screen changes from the previous frame. MicroStation supports only mapped, 256 color FLI files. The palette for each frame can be different, although on most players this causes distracting flicker.

Parameters
[in]fliPpointer to an internal structure created by mdlVideo_createFli. The contents of this structure are not published or required.
[in]mapPimage to append to FLI file.
[in]redMapPred palette entries.
[in]grnMapPgreen palette entries.
[in]bluMapPblue palette entries.
[in]paletteSizenumber of palette entries.
Remarks
Frames can also be added to the file with mdlVideo_appendFliFromRGB.
When all frames have been added, mdlVideo_completeFli should be called to close the file and free the internal buffers.
The size of these images must match the size parameter passed to mdlVideo_createFli.
Returns
SUCCESS if the operation wa/// s completed successfully.
MDLERR_WRITEFAILED if the frame could not be written to the FLI file.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_createFli mdlVideo_appendFliFromRGB
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_appendFliFromRGB ( void *  fliP,
byte redMapP,
byte grnMapP,
byte bluMapP,
int  paletteSize,
byte imageBuffer 
)

Appends a movie frame to an AutoDesk Animator FLI or FLC file.

These files contain an entire sequence of images, with each frame defined by the screen changes from the previous frame. MicroStation supports only mapped, 256 color FLI files. The palette for each frame can be different, although on most players this causes distracting flicker.

Parameters
[in]fliPpointer to an internal structure created by mdlVideo_createFli. The contents of this structure are not published or required.
[in]redMapPred palette entries.
[in]grnMapPgreen palette entries.
[in]bluMapPblue palette entries.
[in]paletteSizenumber of palette entries.
[in]imageBufferRGB buffer to append to FLI file.
Remarks
Frames can also be added to the file with mdlVideo_appendFliFromMap.
When all frames have been added, mdlVideo_completeFli should be called to close the file and free the internal buffers.
The size of these images must match the size parameter passed to mdlVideo_createFli.
Returns
SUCCESS if the operation was completed successfully.
MDLERR_WRITEFAILED if the frame could not be written to the FLI file.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_createFli mdlVideo_completeFli mdlVideo_appendFliFromMap
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT void mdlVideo_completeFli ( void *  fliP)

Closes an AutoDesk Animator FLI or FLC file and frees the internal buffers.

Parameters
[in]fliPpointer to an internal structure created by mdlVideo_createFli. The contents of this structure are not published or required.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_createFli mdlVideo_appendFliFromMap mdlVideo_appendFliFromRGB
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_completeMovie ( void *  movieContextP,
DgnPlatform::MSMovie *  movieP,
WCharCP  fileName,
int  fileType,
DgnPlatform::ImageColorMode  colorMode,
int  compression 
)

Completes the process of saving an animation file.

In the case of FLI and FLC, movieP is processed at this time and the animation file is created. For AVI files, the file handle for the open animation file is closed.

Used in conjunction with mdlVideo_addMovieFrame and mdlVideo_createMovie

After processing is complete, mdlVideo_freeMovie should be called to free the buffers allocated for the movie.

Parameters
[in]movieContextPpointer to the buffer allocated by the call to mdlVideo_createMovie.
[in]moviePpointer to a DgnPlatform::MSMovie structure
[in]fileNamename of the animation file (only required for FLI and FLC).
[in]fileTypeimage format for the animation sequence. Image formats are defined in image.h and begin with IMAGEFILE_.
[in]colorModespecifies whether a movieP is to be saved as a true-color or mapped image. Color modes are defined in image.h and begin with COLORMODE_.
[in]compressionspecifies the type of compression to be used (from image.h), for those formats that support it.
Returns
SUCCESS if the animation file was successfully created.
If processing is aborted by a non-zero return value from stopFunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
MDLERR_BADFILETYPE if filetype is not supported.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
Required Library: videolib.lib
See also
mdlVideo_createMovie mdlVideo_addMovieFrame
VIDEOLIB_EXPORT int mdlVideo_createFileFromBitMap ( WCharCP  nameP,
int  type,
Point2d *  sizeP,
byte bitMapP,
bool  runLengthEncode,
RgbColorDef *  foregroundColorP,
RgbColorDef *  backgroundColorP 
)

creates an image file from a memory bitmap.

Parameters
[in]namePfull path name of the file to be written.
[in]typeone of the possible VIDEOFILE_ types.
[in]sizePsize of the bitmap in X and Y pixels.
[in]bitMapPpointer to the bitmap image data. Data must be in either IMAGEFORMAT_BitMap or IMAGEFORMAT_RLEBitMap formats.
[in]runLengthEncodeindicates whether the data has been compressed or not. The following data formats are assumed depending on the value of runLengthEncode:
runLengthEncode Image Format Type Description
true IMAGEFORMAT_RLEBitMap Run length encoded (generally most compressed)
false IMAGEFORMAT_BitMap Bits per pixel (generally least compressed)
[in]foregroundColorPRGB value for the foreground color. This value is used only if type is not one of the monochrome types listed above.
[in]backgroundColorPRGB value for the background color. This value is used only if type is not one of the monochrome types listed above.
Returns
SUCCESS if the file is created successfully.
MDLERR_USERABORT if stopFunc returns a non-zero value.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
Required Library: videolib.lib
See also
mdlVideo_createFileFromMap mdlVideo_createFileFromRGB
VIDEOLIB_EXPORT int mdlVideo_createFileFromBuffer ( WCharCP  saveAsFileNameP,
int  fileType,
DgnPlatform::ImageColorMode  colorMode,
Point2d *  sizeP,
byte imageDataP,
int  imageFormat,
void *  param1P,
void *  param2P,
void *  param3P,
int  paletteSize,
int  compressType 
)

Creates a video file from an image buffer by using the imageFormat to determine how to best write the file.

Parameters
[in]saveAsFileNamePfull path name of the file to be created by this function.
[in]fileTypeone of the VIDEOFILE_ constants in image.h identifying the format.
[in]colorModeone of the COLORMODE_ constants in image.h identifying the color mode of the source buffer.
[in]sizePsource image size in X and Y pixels.
[in]imageDataPpointer to the source data in one of the indicated formats.
[in]imageFormatone of the IMAGEFORMAT_ constants in image.h identifying the memory storage format.
[in]param1Pa pointer that has several uses depending on the imageFormat. (see below)
[in]param2Pa pointer that has several uses depending on the imageFormat. (see below)
[in]param3Pa pointer that has several uses depending on the imageFormat. (see below)
[in]paletteSizethe number of palette entries if the image format is IMAGEFORMAT_ByteMap, IMAGEFORMAT_GreyScale or IMAGEFORMAT_PackByte.
[in]compressTypecompression ratio for JPEG images. Otherwise, it is not used.
Remarks
Depending on the value of fileType, the following sub-functions are called:
imageFormat Value Function Used
IMAGEFORMAT_BitMap IMAGEFORMAT_RLEBitMap mdlVideo_createFileFromBitMap
IMAGEFORMAT_ByteMap IMAGEFORMAT_GreyScale mdlVideo_extCreateFileFromMap
IMAGEFORMAT_PackByte mdlVideo_createFileFromPackByte or if JPEG, then mdlImage_extCreateFileFromRGB
IMAGEFORMAT_RGBSeparate IMAGEFORMAT_RGB IMAGEFORMAT_RGBA mdlVideo_extCreateFileFromRGB
Depending on the value of fileType, param1P has the following use:
imageFormat Value param1P usage
IMAGEFORMAT_BitMap IMAGEFORMAT_RLEBitMap RgbColorDef *foregroundColorP
IMAGEFORMAT_ByteMap IMAGEFORMAT_GreyScale IMAGEFORMAT_PackByte byte *redMapP
Other unused
Depending on the value of fileType, param2P has the following use:
imageFormat Value param2P usage
IMAGEFORMAT_BitMap IMAGEFORMAT_RLEBitMap RgbColorDef *backgroundColorP
IMAGEFORMAT_ByteMap IMAGEFORMAT_GreyScale IMAGEFORMAT_PackByte byte *grnMapP
Other unused
Depending on the value of fileType, param3P has the following use:
imageFormat Value param3P usage
IMAGEFORMAT_BitMap IMAGEFORMAT_RLEBitMap unused
IMAGEFORMAT_ByteMap IMAGEFORMAT_GreyScale IMAGEFORMAT_PackByte byte *bluMapP
Other unused
Returns
SUCCESS if the file is created successfully.
MDLERR_USERABORT if stopFunc returns a non-zero value.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_createFileFromBitMap mdlVideo_extCreateFileFromMap mdlVideo_extCreateFileFromRGB
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_createFileFromMap ( WCharCP  name,
int  type,
DgnPlatform::ImageColorMode  colorMode,
Point2d *  sizeP,
byte imageMapP,
byte redPaletteP,
byte grnPaletteP,
byte bluPaletteP,
int  paletteSize 
)

Creates the video file specified by fileName, fileType and colorMode from a mapped image.

Parameters
[in]namename of file.
[in]typetype of file (from image.h).
[in]colorModecolor mode (from image.h).
[in]sizePpointer to size of image in X and Y pixels.
[in]imageMapPaddress of the image map with a single-byte color palette index for each of the (sizeP->x * sizeP->y) pixels.
[in]redPalettePred palette values.
[in]grnPalettePgreen palette values.
[in]bluPalettePblue palette values.
[in]paletteSizespecifies number of color palette entries.
Remarks
Required Library: videolib.lib
Returns
SUCCESS if the file is created successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_BADFILETYPE: if filetype is not supported.
MDLERR_CANNOTOPENFILE: if the file cannot be created.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_createFileFromRGB mdlVideo_createFileFromBitMap mdlVideo_createFileFromBuffer
VIDEOLIB_EXPORT int mdlVideo_createFileFromRGB ( WCharCP  name,
int  type,
DgnPlatform::ImageColorMode  colorMode,
Point2d *  sizeP,
byte imageBufferP 
)

Creates the video file specified by fileName, fileType and colorMode from an RGB image.

Parameters
[in]namename of file.
[in]typetype of file (from image.h).
[in]colorModecolor mode (from image.h).
[in]sizePpointer to size of image in X and Y pixels.
[in]imageBufferPaddress of the image buffer with red, green and blue rows stored separately for each scan line. The size of imageBuffer should be (3 * sizeP->x * sizeP->y).
Remarks
Required Library: videolib.lib
Returns
SUCCESS if the file is created successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_BADFILETYPE: if filetype is not supported.
MDLERR_CANNOTOPENFILE: if the file cannot be created.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_createFileFromMap mdlVideo_createFileFromBuffer mdlVideo_createFileFromBitMap
VIDEOLIB_EXPORT int mdlVideo_createFli ( void **  fliFilePP,
Point2d *  sizeP,
int  speed,
WCharCP  fileName,
bool  flcFormat 
)

Creates an AutoDesk Animator FLI or FLC file.

These files contain an entire sequence of images, with each frame defined by the screen changes from the previous frame. MicroStation supports only mapped, 256 color FLI files.

The palette for each frame can be different, although on most players this causes distracting flicker.

Frames can be added to the file with either mdlVideo_appendFliFromRGB or mdlVideo_appendFliFromMap. When all frames have been added, mdlVideo_completeFli should be called to close the file and free the internal buffers.

Parameters
[in,out]fliFilePPpointer to an internal structure created by this function. The contents of this structure are not published or required. This pointer is passed to the other FLI functions.
[in]sizePpointer to size of the frame in X and Y pixels.
[in]speeddesired playback speed in jiffies (1/60 of a second).
[in]fileNamefull pathname of file to create.
[in]flcFormattrue to create FLC file.
Returns
SUCCESS if the file could be created successfully.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_completeFli mdlVideo_appendFliFromMap mdlVideo_appendFliFromRGB
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_createMovie ( void **  movieContextPP,
DgnPlatform::MSMovie *  movieP,
WCharCP  fileName,
int  fileType 
)

Begins the process of saving a sequence of images to disk.

In the case of FLI, FLC and AVI, the images are saved to a single animation file; whereas the other supported image formats save to a series of single image files.

Parameters
[in,out]movieContextPPpointer to a buffer which is allocated to store information that will be needed by mdlVideo_addMovieFrame and mdlVideo_completeMovie.
[in]moviePpointer to a DgnPlatform::MSMovie structure. There are members of this structure to specify the palette and size of a movie frame. For FLI, FLC and AVI formats, you must also specify a playback speed.
[in]fileNamespecifies the name of the animation file for the single image formats FLI, FLC and AVI. For other formats which create a series of single image files, fileNameP must contain an imbedded frame number (e.g., FRAME001.TIF).
[in]fileTypespecifies the image format for the animation sequence. These constants begin with IMAGEFILE_ and are defined in image.h.
Returns
SUCCESS if fileType is valid and movieContextPP is successfully initialized.
MDLERR_BADFILETYPE: if filetype is not supported.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
Required Library: videolib.lib
See also
mdlVideo_addMovieFrame mdlVideo_completeMovie
VIDEOLIB_EXPORT int mdlVideo_deleteMovieFrame ( DgnPlatform::MSMovie *  movieP,
DgnPlatform::MSMovieFrame **  framePP 
)

mdlVideo_deleteMovieFrame deletes the frame framePP from the movie movieP.

Parameters
[in,out]moviePpointer to the DgnPlatform::MSMovie structure for the movie sequence to be modified.
[in]framePPframe to delete.
Returns
SUCCESS if the edit could be performed successfully.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_insertMovieFrame
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_extCreateFileFromMap ( WCharCP  name,
int  type,
DgnPlatform::ImageColorMode  colorMode,
Point2d *  sizeP,
byte imageMapP,
byte redPaletteP,
byte grnPaletteP,
byte bluPaletteP,
int  paletteSize,
int  compressType,
byte transparencyP 
)

Creates the video file specified by fileName, fileType and colorMode from a mapped image, allowing compression and transparency to be set.

Parameters
[in]namename of file.
[in]typetype of file (from image.h).
[in]colorModecolor mode (from image.h).
[in]sizePpointer to size of image in X and Y pixels.
[in]imageMapPaddress of the image map with a single-byte color palette index for each of the (sizeP->x * sizeP->y) pixels.
[in]redPalettePred palette values.
[in]grnPalettePgreen palette values.
[in]bluPalettePblue palette values.
[in]paletteSizespecifies number of color palette entries.
[in]compressTypethe type of compression to use in creating the file (from image.h)
[in]transparencyPthe index of the transparency value, or the RGB triple to use for the transparency value.
Remarks
Required Library: videolib.lib
Returns
SUCCESS if the file is created successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_BADFILETYPE: if filetype is not supported.
MDLERR_CANNOTOPENFILE: if the file cannot be created.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_createFileFromRGB mdlVideo_createFileFromBitMap mdlVideo_createFileFromBuffer
VIDEOLIB_EXPORT int mdlVideo_extCreateFileFromRGB ( WCharCP  name,
int  type,
DgnPlatform::ImageColorMode  colorMode,
Point2d *  sizeP,
byte imageBufferP,
int  compressType,
byte transparencyP 
)

Creates the video file specified by fileName, fileType and colorMode from an RGB image, allowing compression type and transparency to be set.

Parameters
[in]namename of file.
[in]typetype of file (from image.h).
[in]colorModecolor mode (from image.h).
[in]sizePpointer to size of image in X and Y pixels.
[in]imageBufferPaddress of the image buffer with red, green and blue rows stored separately for each scan line. The size of imageBuffer should be (3 * sizeP->x * sizeP->y).
[in]compressTypethe type of compression to use in creating the file (from image.h)
[in]transparencyPthe index of the transparency value, or the RGB tripple to use for the transparency value.
Remarks
Required Library: videolib.lib
Returns
SUCCESS if the file is created successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_BADFILETYPE: if filetype is not supported.
MDLERR_CANNOTOPENFILE: if the file cannot be created.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_createFileFromMap mdlVideo_createFileFromBuffer mdlVideo_createFileFromBitMap
VIDEOLIB_EXPORT int mdlVideo_extendedSaveMovie ( WCharCP  fileName,
int  fileType,
DgnPlatform::ImageColorMode  colorMode,
DgnPlatform::MSMovie *  movieP,
int  compression 
)

Saves a movie sequence to a single animation file or series of single image files.

This function is similar to mdlVideo_saveMovie, but can additionally set the file compression, for those formats that support it.

Parameters
[in]fileNamespecifies the name of the animation file for the single image formats FLI, FLC and AVI. For other formats which create a series of single image files, fileNameP must contain an imbedded frame number (e.g., FRAME001.TIF).
[in]fileTypespecifies the image format for the animation sequence. These constants begin with IMAGEFILE_ and are defined in image.h.
[in]colorModespecifies whether a imageP is to be saved as a true-color or mapped image. Color modes are defined in image.h and begin with COLORMODE_.
[in]moviePpointer to a DgnPlatform::MSMovie structure. There are members of this structure to specify the palette and size of a movie frame. For FLI, FLC and AVI formats, you must also specify a playback speed.
[in]compressionspecifies the type of compression to be used (from image.h), for those formats that support it.///
Returns
SUCCESS if the file is saved successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
Required Library: videolib.lib
See also
mdlVideo_freeMovie mdlVideo_readMovie
VIDEOLIB_EXPORT void mdlVideo_freeMovie ( DgnPlatform::MSMovie *  movieP)

mdlVideo_freeMovie frees the memory associated with a movie.

Parameters
[in,out]moviePmovie to free
See also
mdlVideo_saveMovie mdlVideo_readMovie
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT int mdlVideo_getExportSupport ( int *  defaultModeP,
int *  rgbSupportP,
int *  palette256SupportP,
int *  palette16SupportP,
int *  greyScaleSupportP,
int *  monochromeSupportP,
int  videoType 
)
VIDEOLIB_EXPORT int mdlVideo_getExtension ( WCharP  ext,
int  type 
)

Returns the default three character file extension for the specified image format.

Parameters
[out]extdefault file extension (3 characters).
[in]typevideo type (from image.h).
Returns
SUCCESS if the file type is found; MDLERR_BADARG if it is not.
Remarks
Required Library: videolib.lib
See also
mdlVideo_getExportSupport
VIDEOLIB_EXPORT int mdlVideo_insertMovie ( DgnPlatform::MSMovie *  movieP,
DgnPlatform::MSMovieFrame *  insertFrameP,
DgnPlatform::MSMovie *  insertMovieP,
int  transitionType,
int  transitionFrames,
bool  stillTransition 
)

Inserts the movie specified by insertMovieP into the movie movieP at insertFrameP.

Use mdlVideo_insertMovieFrame to inserts only a single frame.

Parameters
[in,out]moviePpointer to the DgnPlatform::MSMovie structure for the movie sequence to be modified.
[in]insertFramePframe in movieP to insert at.
[in]insertMoviePpointer to the DgnPlatform::MSMovie structure for the movie sequence to be inserted.
[in]transitionTypetype of transition (cut, horizontal wipe, vertical wipe, fade) from image.h.
[in]transitionFramesthe number of frames that span the transition.
[in]stillTransitionIf non-zero, the transition is made from the last frame of one sequence to the first frame of the next, otherwise the two sequences are overlapped for a rolling transition.
Returns
SUCCESS if the edit could be performed successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
Required Library: videolib.lib
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_deleteMovieFrame
VIDEOLIB_EXPORT int mdlVideo_insertMovieFrame ( DgnPlatform::MSMovie *  movieP,
DgnPlatform::MSMovieFrame *  insertFrameP,
byte rgbFrameP 
)

Inserts a single frame from an RGB buffer into a movie sequence.

mdlVideo_insertMovie can be used to insert an entire sequence.

Parameters
[in,out]moviePpointer to the DgnPlatform::MSMovie structure for the movie sequence to be modified.
[in]insertFramePframe in movieP to insert at.
[in]rgbFramePrgb buffer of frame to insert.
Returns
SUCCESS if the edit could be performed successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
See also
mdlVideo_readMovie mdlVideo_saveMovie mdlVideo_freeMovie mdlVideo_deleteMovieFrame
Remarks
Required Library: videolib.lib
VIDEOLIB_EXPORT bool mdlVideo_isAVIAvailable ( )

Determine whether the AVI file format is supported on the current MicroStation platform.

Often used in conjunction with mdlImage_getExportFormat when setting up file format options.

Returns
SUCCESS if AVI files can be created.
Remarks
Below is an example of adding file types to an option button, but only enabling the option for AVI files if AVI files are supported for the platform.
Example:
char formatName[256];
int exportType, i = 0, enabled;
while (SUCCESS == mdlImage_getExportFormat (formatName, &exportType, i++))
{
enabled = (importType != VIDEOFILE_AVI) ? true : mdlVideo_isAVIAvailable();
mdlDialog_optionButtonInsertItem (formatName, NULL, NULL, NULL,
&exportType, NULL, &enabled, NULL,
dimP->dialogItemP->rawItemP, -1);
}
Required Library: videolib.lib
See also
mdlImage_getExportFormat
VIDEOLIB_EXPORT int mdlVideo_readMovie ( DgnPlatform::MSMovie *  movieP,
WCharP  fileName,
int  fileType,
byte redMapP,
byte grnMapP,
byte bluMapP,
int  paletteSize,
double  gammaCorrection 
)

Reads a sequence of images from a single animation file or a series of single image files and stores them in the DgnPlatform::MSMovie structure movieP.

If paletteSize zero, images will be read as true-color, otherwise redMapP, grnMapP, bluMapP and paletteSize specify the movie palette. Usually these will be the palette for the graphics screen on which the movie is to be displayed.

Parameters
[out]moviePpointer to an DgnPlatform::MSMovie structure to be populated. Members of this structure include the palette and size of a movie frame.
[in]fileNamespecifies the name of the animation file for the single file animation format (FLI). For other formats which read a series of single image files, fileName should point to the first image with an embedded numeric string in fileName, which will be incremented to read the remaining frames. For example, if fileName is test01.rgb, then test02.rgb, test03.rgb etc. are used for the additional frames.

Currently, the only single file animation format supported is FLI (IMAGEFILE_FLI).

Parameters
[in]fileTypespecifies the image format of the animation sequence. These constants begin with IMAGEFILE_ and are defined in image.h.
[in]redMapPif paletteSize > 0, red palette values.
[in]grnMapPif paletteSize > 0, green palette values.
[in]bluMapPif paletteSize > 0, blue palette values.
[in]paletteSizesize of the palette to use, or 0 for ture color.
[in]gammaCorrectiongamma correction (1.0 means no correction).
Returns
SUCCESS if the file is read successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
Required Library: videolib.lib
See also
mdlVideo_freeMovie mdlVideo_saveMovie
VIDEOLIB_EXPORT int mdlVideo_readMovieWithBuffering ( DgnPlatform::MSMovie *  movieP,
WCharCP  fileName,
int  fileType,
byte redMapP,
byte grnMapP,
byte bluMapP,
int  paletteSize,
double  gammaCorrection,
bool  firstFrameOnly 
)

Reads a sequence of images from a single animation file or a series of single image files and stores them in the DgnPlatform::MSMovie structure movieP.

If paletteSize zero, images will be read as true-color, otherwise redMapP, grnMapP, bluMapP and paletteSize specify the movie palette. Usually these will be the palette for the graphics screen on which the movie is to be displayed. Unlike mdlVideo_readMovie, this function does not read in the actual images for the movie when called. It populates the DgnPlatform::MSMovie structure with frames and image names that can be used with mdlVideo_getBufferedMovieFrame to keep only a certain number of movie frames in memory at any given time.

Parameters
[out]moviePpointer to an DgnPlatform::MSMovie structure to be populated. Members of this structure include the palette and size of a movie frame.
[in]fileNamespecifies the name of the animation file for the single file animation format (FLI). For other formats which read a series of single image files, fileName should point to the first image with an embedded numeric string in fileName, which will be incremented to read the remaining frames. For example, if fileName is test01.rgb, then test02.rgb, test03.rgb etc. are used for the additional frames.

Currently, the only single file animation format supported is FLI (IMAGEFILE_FLI).

Parameters
[in]fileTypespecifies the image format of the animation sequence. These constants begin with IMAGEFILE_ and are defined in image.h.
[in]redMapPif paletteSize > 0, red palette values.
[in]grnMapPif paletteSize > 0, green palette values.
[in]bluMapPif paletteSize > 0, blue palette values.
[in]paletteSizesize of the palette to use, or 0 for ture color.
[in]gammaCorrectiongamma correction (1.0 means no correction).
[in]firstFrameOnlytrue to only read the first frame of the movie.
Returns
SUCCESS if the file is read successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
Required Library: videolib.lib
See also
mdlVideo_freeMovie mdlVideo_saveMovie
VIDEOLIB_EXPORT int mdlVideo_saveMovie ( WCharP  fileName,
int  fileType,
DgnPlatform::ImageColorMode  colorMode,
DgnPlatform::MSMovie *  movieP 
)

Saves a movie sequence to a single animation file or series of single image files.

Parameters
[in]fileNamespecifies the name of the animation file for the single image formats FLI, FLC and AVI. For other formats which create a series of single image files, fileNameP must contain an imbedded frame number (e.g., FRAME001.TIF).
[in]fileTypespecifies the image format for the animation sequence. These constants begin with IMAGEFILE_ and are defined in image.h.
[in]colorModespecifies whether a imageP is to be saved as a true-color or mapped image. Color modes are defined in image.h and begin with COLORMODE_.
[in]moviePpointer to a DgnPlatform::MSMovie structure. There are members of this structure to specify the palette and size of a movie frame. For FLI, FLC and AVI formats, you must also specify a playback speed.
Remarks
Required Library: videolib.lib
Returns
SUCCESS if the file is saved successfully.
If processing is aborted by a non-zero return value from stopfunc, this value is returned.
MDLERR_INSFMEMORY if there is not enough memory available to perform the operation.
Remarks
The arguments to the user defined frameFunc are:
void frameFunc
(
int frameNumber, // current frame number
int nFrames // total number of frames
);
See also
mdlVideo_freeMovie mdlVideo_readMovie

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.