User Tools

Site Tools


DzMultiMediaMgr

Manager of multimedia (video and audio) export/import classes.

More...

Inherits :

Static Methods

Methods

DAZ Script
DzErrorexportVideoClip ( String fileName, DzVideoClip clip, Number exporterIndex=-1 )
StringgetAudioClipLoadPath ()
StringgetVideoClipSavePath ()
DzErrorimportAudioClip ( String fileName, DzAudioClip clip, Number importerIndex=-1 )

Detailed Description

There is only one instance of this manager in an application. This instance is created and owned by DzApp. Don't create an instance of this class, but rather request a pointer to it from DzApp via DzApp::getMultiMediaMgr().

Static Methods


DzAudioImporter : findAudioImporter( String filename )

Uses the filename extension to find an appropriate audio importer.

Return Value:

  • An appropriate importer for the given file name, or NULL if none is found. The caller takes ownership of this object and is responsible for deleting it.

DzVideoExporter : findVideoExporter( String filename )

Uses the filename extension to find an appropriate video exporter.

Return Value:

  • An appropriate exporter for the given file name, or NULL if none is found. The caller takes ownership of this object and is responsible for deleting it.

DzAudioImporter : getAudioImporter( Number i )

Return Value:

  • A new instance of the i'th audio importer in the list. The caller takes ownership of this object and is responsible for deleting it.

Number : getNumAudioImporters()

Return Value:

  • The number of audio importers currently supported.

Number : getNumVideoExporters()

Return Value:

  • The number of video exporters currently supported.

DzVideoExporter : getVideoExporter( Number i )

Parameter(s):

  • i - The index of the exporter to create.

Return Value:

  • A new instance of the i'th video exporter in the list. The caller takes ownership of this object and is responsible for deleting it.

void : makeAudioImportFileFilter( DzFileFilter filter, String defaultFilter=“”, Boolean makeAllFilesEntry=true )

Populates the given filter with all the audio types recognized by the multimedia manager.

Parameter(s):

  • filter - The filter to populate
  • defaultFilter - The filter to set as the default
  • makeAllFilesEntry - If true, and additional filter is created for all recognized file extensions.

void : makeVideoExportFileFilter( DzFileFilter filter, String defaultFilter=“” )

Populates the given filter with all the video types recognized by the multimedia manager.

Parameter(s):

  • filter - The filter to populate
  • defaultFilter - The filter to set as the default

Methods


DzError : exportVideoClip( String fileName, DzVideoClip clip, Number exporterIndex=-1 )

Export the clip to a video file.

Parameter(s):

  • filename - The name of the file to export to.
  • clip - An instance of DzVideoClip containing the data to save.
  • exporterIndex - The index of the exporter class to use. If this is less than 0, then the extension of fileName is used to attempt to find an appropriate exporter.

Return Value:

  • DZ_NO_ERROR if the file export was successful.

String : getAudioClipLoadPath()

Return Value:

  • Last directory that audio files were imported from.

String : getVideoClipSavePath()

Return Value:

  • Last directory that video files were exported to.

DzError : importAudioClip( String fileName, DzAudioClip clip, Number importerIndex=-1 )

Import an audio clip from a file.

Parameter(s):

  • filename - The name of the file to import from.
  • clip - A pointer to a DzAudioClip instance to import the data into.
  • importerIndex - The index of the importer class to use. If this is less than 0, then the extension of fileName is used to attempt to find an appropriate exporter.

Return Value:

  • DZ_NO_ERROR if the file import was successful.