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.
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 };
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.
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. |
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.
For certain error codes, more specific information can be obtained from the error_string parameter.
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.