[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

UMSMovieFileReaderMClass Class

The UMSMovieFileReaderMClass class is a metaclass that defines the class methods for children of the UMSMovieFileReader base class. In particular, UMSMovieFileReaderMClass specifies creation methods for UMSMovieFileReader objects.

The metaclass provides a method to construct a specific UMSMovieFileReader object based on data in the configuration file and either an application supplied alias or a pathname to a file with MovieFile data. This allows an application to be ported to a new type of MovieFile file merely by adding information in the configuration file. This is the preferred construction technique for applications.

To learn more about the UMSMovieFileReaderMClass class, see:

For introductory information, see MetaClass Objects.

Enumeration Lists

To avoid name collision on defines, integer values have been captured as enumeration lists. The set of valid values from an enumerated list can vary with the application. The detailed method descriptions describe the valid or possible values for the specific use. The enumerated lists that are defined for this object are listed as follows:

enum ReturnCode {
   Success, 
   Failure, 
   FatalUMSError, 
   NoConfigObject,
   AliasNotFound, 
   PropertyNotFound,
   InvalidClassName, 
   NotAChild, 
   UnsupportedFormat,
   FilePermissions,
   FileNotFound
   };

Method Descriptions

UMSMovieFileReader make_by_pathname(in string pathname, inout ErrorCode error, out string error_string, out string movie_file_alias)

Description

This method returns an instantiated child of the UMSMovieFileReader class that is capable of processing the file indicated by pathname. The particular child returned depends upon interaction with a UMSConfig object.

Arguments
in string pathname Specifies the pathname of the file that the instantiated UMSMovieFileReader object is required to process.
inout ErrorCode error Provides success or reason for failure. If a failure occurred, a null pointer is returned instead of an instantiated object.
out string error_string If an error occurred, this string contains more detailed information about the point of failure.
out string movie_file_alias This is the alias in the configuration file for the particular object returned. This allows applications to determine more detailed information about the particular UMSMovieFileReader class returned from the configuration file stanza.
Error Codes

For certain error codes, more specific information can be obtained from the error_string parameter.

Error Code error_string
FileNotFound The specified file does not exist.

UMSMovieFileReader make_by_alias(in string alias, inout ErrorCode error, out string error_string)

Description

This method returns an instantiated child of the UMSMovieFileReader class as determined by the alias parameter. The particular child returned depends upon interaction with a UMSConfig object.

Arguments
in string alias Specifies the alias to seek using the UMSConfig object.
inout ErrorCode error Provides success or reason for failure. If a failure occurred, a null pointer is returned instead of an instantiated object.
out string error_string If an error occurred, this string contains more detailed information about the point of failure.
Error Codes

For certain error codes, more specific information can be obtained from the error_string parameter.

Error Code error_string
Failure Name of the class that failed to be created.
AliasNotFound Alias that could not be found by the UMSConfig object.
PropertyNotFound Property that could not be found by the UMSConfig object.
InvalidClassName Name of the class that could not be found by the SOM runtime.
NotAChild Name of the class that is not a child of the UMSMovieFileReader base class.

UMSMovieFileReaderMClass Usage

The MovieFileReaderMClass methods use the configuration file to determine that particular subclass of the MovieFileReader class to instantiate. The make_by_pathname method first uses the FiletypeDetector object and the Detector.movie stanza to run a series of detectors on the file indicated by the pathname parameter. This process yields a file_type_alias.

Once the MovieFileReaderMClass class has a file_type_alias (whether through the FiletypeDetector or through direct invocation of the make_by_alias method), it uses the Config object to look up that particular MovieFileReader subclass to instantiate.

Detector.movie:
        detection_module         "d_AVI"
        file_type_alias          "AVImovie"
*NEXT:
        detection_module         "d_FFRW"
        file_type_alias          "FFmovie"
AVImovie:
        CLASS_UMSMovieFileReader   "UMSAVIMovieFileReader"
        audio_formats_alias        "UMSAVIAudioFormats"
        video_formats_alias        "UMSAVIVideoFormats"
FFmovie:
        CLASS_UMSMovieFileReader   "UMSFFMovieFileReader"
        audio_formats_alias        "UMSFFAudioFormats"
        video_formats_alias        "UMSFFVideoFormats"

For introductory information, see MetaClass Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]