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

UMSMoviePlayer Object

The UMSMoviePlayer object provides methods to play synchronized audio and video from movie files. It uses the generic base classes of UMSMovieFileReader, UMSVideoDecoder, UMSAudioDevice, and UMSImageWindow. Therefore, the UMSMoviePlayer object can be extended without code modifications to support new file formats, new decompression algorithms, new audio devices and new video display devices simply by the availability of new implementations of these base classes.

Ultimedia Services provides UMSMovieFIleReader object implementations for the AVI file format and for a fast file format. UMSVideoDecoder implementations are provided for Ultimotion, JPEG, RTV, and Indeo video compression. And various UMSAudioDevice implementations support the various audio devices used across supported systems.

To learn more about the UMSMoviePlayer object, see:

For introductory information, see Media Handler Objects.

Enumeration Lists

To avoid name collision on defines, integer values have been captured as enumerated 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:

enum ReturnCode {
   Success, 
   NoFile, 
   NoFileObj, 
   NoConfigObj, 
   NoAlias, 
   NoDevice, 
   DeviceNotReady, 
   InvalidState, 
   WrongFormat, 
   InvalidCuepoint, 
   OutOfRange, 
   Duplicate, 
   CueLimit, 
   FileError, 
   InvalidFactor, 
   InvalidCommand, 
   WindowDefined, 
   InvalidWindow, 
   NoWindow, 
   ColorMap, 
   Failure, 
   DecompressFail, 
   NoEventPending, 
   InvalidTrack, 
   InvalidParam, 
   InvalidTimeFmt,
   InvalidClass,
   MemoryError,
   EndOfFile,
   NoAudio,
   ValueChanged
   };
-->
enum State {
   NotReadyState, 
   ReadyState, 
   PlayState, 
   ScanState, 
   FreezeState, 
   PausePlayState, 
   PauseScanState 
   };
enum OnOff {
   Off, 
   On 
   }; 
enum Set clear {
   Clear, 
   Set 
   }; 
enum CueType {
   PlayCue, 
   RecordCue 
   };
enum AudioFormat {
   PCM,
   OtherAudioFormat 
   };
enum BitsPerSample {
   Eight, 
   Sixteen, 
   OtherBitsPerSample
   };
enum TimeFormat {
   Msecs, 
   Frames 
   }
enum SourceType {
   LocalFile 
   }
enum EventType {
   PlayComplete, 
   Cuepoint, 
   PositionAdvise,
   Error
   };

Defined Constants

The movie player defines the following constants:

const unsigned long PLAY_COMPLETE = 0x00000001;
const unsigned long CUE_POINT = 0x00000002;
const unsigned long POSITION_ADVISE = 0x00000004;
const unsigned long PLAYER_ERROR = 0x80000000;
 

Defined Structures

Structures defined for the UMSMoviePlayer object include:

struct EventData {
        EventType type; 
        unsigned long current_position;
        unsigned long specific; 
        };

State Diagram

The player has seven possible states:

NotReady In this state, the player is not ready because it either does not have a file name (as provided by the load method), or it does not have any output defined; for example, neither an audio device for the audio track (as provided by open_audio), nor an AIXwindows window ID for the video track (as provided by set_window).
Ready The player has a file name and either a window ID for the video, or an audio device for the audio, or both. In this state, the media has not been cued (prerolled) for Play.
Play The player is actively playing.
Scan The player is scanning through all video frames without playing the audio.
Freeze The player is actively playing the audio, but a single video frame is being held in view.
PausePlay The player is cued for playing at a certain position. The resume method causes playing.
PauseScan The player is cued for scanning at a certain position. Audio is not cued for play. The resume method causes scanning.

The following table illustrates the UMSMoviePlayer state diagram.

Movie Player States
Not Ready Ready Play Scan Freeze Pause Play/ Pause Scan
load Ready1 Ready Ready Ready Ready Ready
open_audio Ready1 Ready Play Scan Freeze Pause Play/Scan
set_window Ready1 Ready Play Scan Freeze Pause Play/Scan
release_win- dow NotReady Ready2 Play2 Ready2 Freeze2 Pause Play/Scan 2
close_audio Ready3 Ready3 Play3 Scan Pause Play3 Pause Play/Scan3
cue Error Pause Play Pause Play Pause Play Pause Play Pause Play
play Error Play Play Play Play Play
scan4 Error Scan Scan Scan Scan Scan
freeze Error Error Freeze Pause Scan Freeze Pause Play/Scan
seek NotReady Ready Ready Ready Ready Ready
pause Error Error Pause Play Pause Scan Pause Play Pause Play/Scan
resume Error Error Play Scan Play Play/Scan
stop NotReady Ready Ready Ready Ready Ready
step Error Pause Play Pause Play Pause Scan Pause Play Pause Play/Scan

1 open, load, and set_window are methods that can fulfill the last requirement to become Ready.

2 release_window when file has no audio causes NotReady state.

3 close_audio when no window is set causes NotReady state.

4 scan with no window set is an error.

Colormap Handling

The UMSMoviePlayer obtains a color map once the UMSMovie Player has received both the set_window and load (file) methods. You should then issue the get_color_map method to obtain the color map ID and install this color map. To create a colormap, the UMSMoviePlayer obtains entries 0-127 from the DefaultColormap and entries 128-255 from the UMSVideoDecoder. The contents of entries 128-255 changes across file loads if the movie's video format type changes (for example, Ultimotion to JPEG).

Method Descriptions

ReturnCode open_audio(in string device)

Description

This method uses an alias to specify which audio device should be used by the movie player. The configuration object is accessed to relate the alias and device name. If an open is issued when a device has already been opened, the existing device is closed and the new device is opened.

Arguments
in string device The audio device alias specifying the desired audio device. Device aliases are mapped in the configuration file to real devices. This allows you to map applications to devices and establish device characteristics independently for each application if desired. Applications should use a device alias of the form:
Audio.<application_class>.<application_name>.<usage_of_device> 

In the alias search, this name is successively truncated until a match in the configuration file is found. If you have not specially identified any of the intermediate aliases the search resolves to the base Audio alias.

Return Values

Success

NoConfigObj The configuration file does not exist.
NoAlias Configuration file.
NoDevice The device specified in the configuration file does not exist.
DeviceNotReady The device is not available.
InvalidClass The access class is not Audio_Device.

ReturnCode load(in string path, in SourceType type, in string file_alias)

Description

This method specifies the pathname of the file to be opened in the path parameter. The UMSMoviePlayer uses an instance of the UMSMovieFileReader base class to access movie files. The specific implementation of the UMSMovieFileReader used is transparent to the UMSMoviePlayer. The methods of the UMSMovieFileReaderMClass object are used to instantiate the specific object. If the string parameter file_alias is NULL, the make_by_pathname method of UMSMovieFileReaderMClass is used to construct the specific object based on detection of the appropriate file type. If the string parameter path is not NULL, the make_by_alias method of UMSMovieFileReaderMClass is used to construct the specific object. This allows the application to override file type detection and request instantiation of a specific object via a UMSMovieFileReader file_type_alias. A successful load clears the existing cuepoints and displaces a previously opened file.

Arguments
in string path Specifies the pathname of the file to open
in SourceType type This parameter specifies the file type. For this release, only local file system is supported.
in string file_alias If not NULL, specifies a file type alias for construction of the UMSMovieFileReader object used by the player.
Return Values

Success

Failure

NoFile The file could not be accessed.
NoFileObj The object specified by file_alias cannot be created.
WrongFormat The file or data format is not recognized or not supported.
FileError File could not be accessed.

ReturnCode close_audio()

Description

This method closes the previously specified audio device. This method does not affect the state or location of the media file specified with the load method. If a window was set by way of set_window, the video continues playing; if not, the state becomes NotReady.

Return Values

Success

NoDevice

Failure

ReturnCode play()

Description

This method is used to start playback from the current position to the end of the file. When the end of file is reached, a PlayComplete event is issued. If repeat is not set on, the Pause state is entered at completion.

If repeat is set on, play continues with successive playing of the file (from beginning to end) with a PlayComplete event each time the end of the file is reached until play is explicitly stopped by a command (such as pause or stop).

Return Values

Success

Failure

InvalidState Invalid state to accept play.

DeviceNotReady

ReturnCode playto (in unsigned long to)

Description

This method plays from the current position and continues until the to position is reached, at which time a PlayComplete event is returned. If repeat is not set on, the Pause state is entered at completion.

If repeat is set on, play continues with successive playing of the segment (from the location at which playto was issued to the to location) generating a PlayComplete event each time the to location is reached until play is explicitly stopped by a command (such as pause or stop).

If the to position is beyond the end of the file, the command is rejected with an OutOfRange return code.

If the to location is before the current position, the player immediately issues the PlayComplete event, seeks to the to position, and pauses, regardless of whether repeat had been turned on or off.

Arguments
in unsigned long to Specifies the file location in the current time format to play to.
Return Values

Success

Failure

InvalidState The player state does not permit this command.
OutOfRange The to position specified is out of range.

DeviceNotReady

ReturnCode pause()

Description

This method suspends playback or scanning. The device and file remain in an open state at the current location and cued for playing or scanning. Playing or scanning can resume by calling the play, scan, or resume methods.

Return Values

Success

Failure

InvalidState The player cannot be paused from this state.

ReturnCode resume()

Description

This method resumes playing/scanning from a paused state. If already playing or scanning, Success is returned and the command is ignored. If the video was frozen with the freeze method, the video resumes at the position appropriate to the continuing audio track.

Return Values

Success

Failure

InvalidState The player is not in a Pause, Play, or Freeze state.

ReturnCode set_cuepoint(in SetClear flag, in unsigned long cue)

Description

This method sets a cuepoint for playback. This is specified as a time offset from the beginning of the file. When the cuepoint is reached, a Cuepoint event is generated. The maximum number of cuepoints allowed is 20.

Arguments
in SetClear flag This field indicates whether a cuepoint is being set or removed. The Set value sets a cuepoint; Clear removes a cuepoint.
in unsigned long cue The cuepoint location in units of the current time format.
Return Values

Success

Failure

InvalidCuepoint Tried to remove a cuepoint that was not set.
OutOfRange The position is out of range.
Duplicate The cuepoint has been set before.
InvalidState The device is in the wrong state.
CueLimit The maximum number of cuepoints is exceeded.

ReturnCode set_position_advise(in unsigned long interval)

Description

This method sets the position-change notification frequency. Only one frequency can be set. If the value of interval is zero it turns position advise off. The player uses the most current definition of interval. Position advise events are sent at the given interval if that event type is enabled.

Arguments
in unsigned long interval Specifies the position-change notification interval in units of the current time format.
Return Values

Success

Failure

ReturnCode stop()

Description

This method exits the play, or pause state and returns to the ready state.

Return Values

Success

Failure

InvalidState The player is in an invalid state to accept stop.

ReturnCode seek(in unsigned long location)

Description

Seeks to the specified file location. The file location is specified in the current time format units. For more information, see set_time_format method.

Arguments
in unsigned long location Specifies the target seek location in current time units.
Return Values

Success

Failure

OutOfRange

InvalidState

ReturnCode cue(in CueType type)

Description

This method prerolls the media for play. The player enters a pause state.

Arguments
in CueType type Specifies PlayCue or RecordCue. Only PlayCue is valid
Return Values

Success

InvalidState Player cannot accept cue from current state.

InvalidCommand

InvalidParm

ReturnCode info(inout string fname, inout string device)

Description

This method returns the currently loaded file name and opened device alias name as null terminated strings. The pointers are passed by the caller and must have space to hold the name strings. If the device or filename has not been defined, a null is returned at the pointer location.

These returned string parameters break the general convention of Ultimedia Services objects of returning strings declared as out rather than inout. In this particular case, the pathname and the initial audio device alias has been supplied; the returned size does not exceed the initialized size.

Arguments
inout string fname The pathname of the currently loaded file is returned as a string.
inout string device The resultant audio device alias is returned as a string. This is the resultant alias which achieved a match in the configuration file at device creation time.
Return Values

Success

Failure

NoFile

ReturnCode set_volume(in long level, in unsigned long time)

Description

This method changes the level of audio as a percentage of the maximum audio. If the integer in level field is greater than 100, then 100 is used as the volume. The time argument is provided to permit fade in and fade out capability but is not implemented in this release.

Arguments
in long level Specifies the requested volume level as a value from 0 to 100.
in unsigned long time Specifies the time delay over which the volume adjustment is made.
Return Values

Success

Failure

OutOfRange A parameter was out of range.

ReturnCode set_balance(in long level, in unsigned long time)

Description

This method changes the balance of the audio. The time argument permits the balance to be modified over a time period but is not implemented in this release.

Arguments
in long level The requested balance from -100 to 100. A value of 0 represents the balance center point.
in unsigned long time Specifies the time delay over which the balance adjustment is made.
Return Values

Success

Failure

OutOfRange A parameter was out of range.

unsigned long get_volume()

Description

This method returns the current volume level.

Return Values

The volume as an integer from 0 to 100.

long get_balance()

Description

This method returns the current balance level.

Return Values

The balance as an integer from -100 to 100.

ReturnCode get_audio_number_of_channels(inout long channels)

Description

The number of channels in the next frame of audio data for the selected audio track in the loaded movie file. A value of one indicates mono data, while a value of two indicates stereo. If no file has been opened, the ReturnCode value is NoFile.

Arguments
inout long channels The number of channels for the selected audio data is returned.
Return Values

Success

Failure

NoFile

NoAudio

State get_state()

Description

This method gets the current state of the player.

Return Values

A value from the State enumeration list indicating the current state.

ReturnCode set_event_mask( in unsigned long event_mask)

Description

Specifies the setting of a mask to enable or disable reporting of maskable events. The default is for these bits to be 1 and not masked. Note that PLAY_COMPLETE and PLAYER_ERROR are not maskable.

Arguments
in unsigned long event_mask An OR'ed set of bit flags enabling the corresponding events. CUEPOINT and POSITION_ADVISE are maskable events.
Return Values

Success

Failure

unsigned long get_event_mask()

Description

Returns the current event_mask indicating which events are enabled.

Return Values

The current event mask. This is the bit OR set of:

PLAY_COMPLETE 
CUEPOINT 
POSITION_ADVISE 
PLAYER_ERROR

EventType get_event(out EventData event_data)

Description

Returns the next event in the space provided by event_data. It blocks if no event is available. The event type is available in the event data structure and is also returned.

If an event is not available and a play, freeze, or scan is not in progress, an EventType error is returned. This prevents the possibility of indefinitely blocking.

Error event types return a ReturnCode in the specific EventData field indicating what the error is. Possible values include:

Failure A nonrecoverable error occurred.
DecompressFail A video frame failed to decompress properly. It was skipped and play continues.
FileError An error occurred relating to the file system. The files are closed and the player enters the NotReady state.
NoEventPending Returned as response to get_event when no events exist in the event queue and future events are not expected.
Arguments
out EventData event_data An EventData structure is returned indicating the event and associated data.
Return Values

A value from the EventType enumeration list indicating the event type.

boolean event_pending()

Description

This method checks the event queue to determine if any events are ready for processing. If an event is ready, True is returned; otherwise, False is returned.

Return Values

TRUE if an event is available.

long get_event_handle()

Description

This method returns an event handle. The application can use this handle as a file descriptor on which to select and thereby query or block on events. If the file descriptor is readable, an event is queued.

Return Values

The return value is a nonzero handle number for success and 0 for failure. The handle is a file descriptor upon which selects can be issued to query or block on events.

ReturnCode set_repeat(in OnOff flag)

Description

This method turns the repeat flag on and off. If the flag is on, then the play method causes it to repeat from the beginning of the file when encountering the end of file. The playto method repeats from the current position when playto is called to the end position passed into the playto method. Repeat can take effect on the next or current play.

If repeat is set during play, a PlayComplete event is generated as each repetition is completed.

Arguments
in OnOff flag Specifies that repeat should be turned ON or OFF.
Return Values

Success

Failure

InvalidParm

OnOff get_repeat()

Description

This method returns the current setting for the repeat flag.

Return Values

Returns the current setting of repeat.

unsigned long get_samples_second()

Description

This method returns the samples per second currently set. If a file is not loaded, a value of 0 is returned.

Return Values

The number of samples per second in the audio track.

ReturnCode set_time_format(in TimeFormat format)

Description

This method sets the time format, which specifies the units of time the object interface uses. Time parameters are specified as longs and assume the units of the current time format. Valid values are Msecs or Frames.

Arguments
in TimeFormat format A value from the TimeFormat enumeration list specifying current time units. Valid values are Msecs or Frames.
Return Values

Success

Failure

InvalidTimeFmt

TimeFormat get_time_format()

Description

This method returns the current setting for the time format, which defines the interpretation of Time arguments.

Return Values

Msecs

Frames

ReturnCode set_speed_factor(in unsigned long percent)

Description

This method sets the speed factor for displaying video. The play and playto use the speed factor and the normal play speed to calculate the play speed. The default speed factor is 100. Speed factors are honored on a best can do basis.

This does not take affect for currently playing segments. It only applies to the next play or playto.

Arguments
in unsigned long percent Specifies a percentage by which the playback speed should be adjusted. A value of 100 specifies normal speed.
Return Values

Success

Failure

InvalidFactor

unsigned long get_speed_factor()

Description

Returns the current speed factor.

Return Values

The current speed factor setting is returned as a percentage of the normal play speed.

unsigned long get_normal_speed()

Description

This method returns the normal play speed, in frames per second. This normal speed is determined from the loaded file. If a file is not loaded, a value of 0 is returned.

Return Values

The nominal frames per second for normal speed is returned as a long.

unsigned long get_current_speed()

Description

This method returns the current play speed, in frames per second. This speed is the normal speed scaled by the speed factor. If a file is not loaded, a value of 0 is returned.

Return Values

The speed in frames per second is returned as a long.

ReturnCode step(in long count)

Description

This method steps count frames forward or backward. If the count value is negative it steps backward; otherwise, it steps forward. A value of zero does not modify the position in the file. A step count of 0 displays the current frame.

Arguments
in long count Specifies the number of frames to advance. A positive value steps forward, a negative value steps backward.
Return Values

Success

Failure

FileError

OutOfRange

DecompressFail

ReturnCode freeze()

Description

This method freezes the current frame image on the display, but continues to play the audio if the file has an audio track. Cuepoint and position advise events continues as when playing.

Return Values

Success

Failure

InvalidState Freeze is not a valid command for the current state.

ReturnCode scan()

Description

This method displays the movie at the maximum possible frame rate (without throwing away any frames). No audio is played. The repeat and speed factor do not apply during scan. A PlayComplete event is generated when the end of file is reached and the state transitions to pause. Since no frames are discarded apparent speed is not easily predictable and can be faster or slower than normal.

Return Values

Success

Failure

InvalidState Scan is not a valid command for the current state.

ReturnCode scanto(in unsigned long to)

Description

This method displays the movie at the maximum possible frame rate (without throwing away any frames). No audio is played. The speed factor does not apply during scan. A PlayComplete event is generated when the to location is reached and the state transitions to pause.

Usage of the to parameter, and of the state of repeat, is like that defined for playto.

Arguments
in unsigned long to Specifies the offset to scan to in units of current time format.
Return Values

Success

Failure

OutOfRange The to parameter is out of range.
InvalidState Scan is not a valid command for the current state.

unsigned long get_current_position()

Description

This method queries the current position of the media, and it returns the current position units of the current time format setting.

Return Values

The current position in the TIME format is returned. If there is no current position (a file is not loaded) a 0 TIME is returned.

ReturnCode set_window(in string dp, in unsigned long wid)

Description

This method passes the display and window identification to the player. This window is used to display the movie. If a window has already been defined, or the player cannot connect to the specified window, an error is returned.

Arguments
in string dp A string specifying the Display window to be opened (for example, unix:0).
in unsigned long wid Specifies a window ID to be used for the display.
Return Values

Success

Failure

InvalidWindow Unable to connect to the specified display and window.
WindowDefined A window had already been defined.
ColorMap Cannot get color map.

ReturnCode get_window(inout string dp, inout unsigned long wid)

Description

This method queries the display and window id for displaying the video image. If the player has no window specified, NoWindow is returned.

Arguments
inout string dp The currently set display is returned.
inout unsigned long wid Returns the current window id or Null if not initialized.
Return Values

Success

Failure

NoWindow

ReturnCode release_window()

Description

This method releases a previously specified window. If the player has a window defined the player is responsible for exposure events. If the application wants to regain the window it must request its release. A release must be done before defining a new window.

Return Values

Success

Failure

NoWindow

ReturnCode get_native_window_size(inout unsigned long width, inout unsigned long height)

Description

This method queries the normal width and height for playback of the loaded file. NoFile is returned if the width and height are unknown (no loaded file).

Arguments
inout unsigned long width The native width of the image data is returned
inout unsigned long height The native height of the image data is returned
Return Values

Success

Failure

NoFile

unsigned long get_length()

Description

This method queries the length of the currently loaded file. The returned value is in time format which is set by set_time_format or system default time format.

Return Values

The length of the movie file in the current time units.

ReturnCode set_current_track(in unsigned long track_no)

Description

This method selects the audio track to play by number. A file can or cannot have multiple audio tracks. The first audio track in a movie file is 0, the second audio track is 1, etc. The default audio track is set to 0 and reset to 0 with each load. The UMSMoviePlayer supports playback of the first audio track only.

Arguments
in unsigned long track_no Specifies which audio track is selected.
Return Values

Success

Failure

InvalidParam

unsigned long get_current_track()

Description

This method returns the currently selected audio track. The UMSMoviePlayer supports only the playing of the first audio track in a file, referred to as audio track 0.

Return Values

The currently selected audio track number is returned.

boolean get_iframe_locations(in long ref_frame_num, out long prev_iframe_num, out long next_iframe_num)

Description

This method returns the locations (frame number) of the I frames bounding the reference frame. It also indicates whether the reference frame itself is an I frame.

Arguments
in long ref_frame_num This is the input frame number used as a reference to find the previous and next I frame.
out long prev_iframe_num This is a returned value. The frame number of the I frame preceding the reference frame.
out long next_iframe_num This is a returned value. The frame number of the I frame following the reference frame.
Return Values

Returns TRUE if the reference frame is an I frame.

long get_color_map()

Description

This method returns the current X color map id being used by the player. This allows the using application to install the color map as well so that the input focus on the application can result in use of the desired color map. Returns 0 if no colormap exists at this time.

Return Values

The color map ID being used by the UMSMoviePlayer.

ReturnCode get_file_format_alias(out string file_format_alias)

Description

This method returns the current file format alias. A null is returned if a file is not active or the format alias cannot be determined. This is method is preferred over the get_file_format method.

Arguments
out string file_format_alias The current file format alias is returned as a string.
Return Values

Success

Failure

NoFile

MemoryError

ReturnCode get_video_format_type(out string video_format_type)

Description

The video format type string is returned. This string is the format type used by the UMSMovieFile object.

Arguments
out string video_format_type The current video format type is returned as a string.
Return Values

Success

Failure

NoFile

MemoryError

ReturnCode get_audio_bits_per_sample(inout long bits_per_sample)

Description

The audio bits per sample value is returned as a long. This is the preferred method for querying bits per sample.

Arguments
inout long bits_per_sample The number of bits per sample of audio data is returned.

By convention 8-bit stereo data is reported as 8 bits per sample even though 2 bytes of data are required to complete a stereo sample.

Return Values

Success

Failure

NoFile

NoAudio

ReturnCode get_audio_format_type(out string audio_format_type)

Description

The audio format type string is returned. This string is the format type used by the UMSMovieFile object.

Arguments
out string audio_format_type The current audio format type is returned as a string.
Return Values

Success

Failure

NoFile

MemoryError

NoAudio

ReturnCode enable_audio_master_settings()

Description

This method is used in the presentation of device specific capabilities that are shared for all invocations of the device. An example of this is the configuration of passing through CD-ROM audio data at the device level which is mixed at the device independent of other device usage. If you enable master setting mode, you share in this configuration of the device. If you choose not to participate in the master settings, you must try to disable master_settings mode. Each device can enforce rules based on current state and as to when the master_settings mode can be entered or exited. Some devices cannot support master setting at all in which case a value of InvalidCommand is returned.

Return Values

Success

Failure

InvalidCommand

ReturnCode disable_audio_master_settings()

Description

This method is used to disable the master_settings mode on the audio device in use. If the method is not supported by the audio device in use, an InvalidCommand value is returned. If the device cannot be acquired with master setting disabled, a value of Failure is returned.

Return Values

Success

Failure

InvalidCommand

ReturnCode get_audio_master_settings(inout boolean enabled)

Description

This UMSMovie Player presents this method for the specific UMSAudioDevice object in use.

Arguments
inout boolean enabled A Boolean is returned indicating whether master settings are enabled or disabled for the audio device.
Return Values

Success

Failure

InvalidCommand

ReturnCode get_audio_device_class(out string device_class)

Description

The specific audio device class is returned as a string.

Arguments
out string device_class The specific audio device class in use is returned as a string.
Return Values

Success

Failure

NoDevice

ReturnCode get_audio_device_pathname(out string device_pathname)

Description

The specific audio device in use is returned as a string, such as /dev/acpa0.

Arguments
out string device_pathname The specific audio device in use is returned as a string.
Return Values

Success

Failure

NoDevice

ReturnCode get_audio_device_master_exec(out string exec_pathname)

Description

This UMSMovie Player presents this method for the specific UMSAudioDevice object in use.

Arguments
out string exec_pathname The pathname of the requested executable is returned as a string.
Return Values

Success

Failure

InvalidCommand

NoDevice

ReturnCode get_audio_device_inout_aliases(out string inputs_alias, out string outputs_alias)

Description

The audio device inputs alias and outputs alias are returned. These aliases are used in the configuration file to define the input and output connections on specific audio devices.

Arguments
out string inputs_alias The audio device inputs alias is returned as a string.
out string outputs_alias The audio device outputs alias is returned as a string.
Return Values

Success

Failure

NoDevice

ReturnCode get_display_size(out long actual_width, out long actual_height)

Description

The actual width and height of the image as displayed are returned as longs.

Arguments
out long actual_width The width in pixels of the displayed image.
out long actual_height The height in pixels of the displayed image.
Return Codes

Success

Failure

NoFile

ReturnCode set_display_size2(in long width, in long height, out long actual_width, out long actual_height)

Description

The desired width and height of the output image are set. If this is different from the native size of the image, it implies that an additional resizing step is being requested. In this case the UMSMoviePlayer first passes the request to the UMSImageWindow. If the UMSImageWindow returns Success (that is, if hardware support for resizing is available), or if the UMSImageWindow returns ValueChanged and the actual width and height are different from the original image size (that is, if the hardware is doing any form of resizing) then no further action is taken. Otherwise the requested width and height are limited to a maximum of 2 times the original width and height of the image and to a minimum of 8 pixels in each dimension, and then passed to the UMSVideoDecoder for software resizing. ValueChanged is returned if the resulting width and height are not the same as the requested width and height.

Arguments
in long width The desired width in pixels of the displayed image.
in long height The desired height in pixels of the displayed image.
out long actual_width The width in pixels of the image that is displayed.
out long actual_height The height in pixels of the image that is displayed.
Return Codes

Success

Failure

NoFile

ValueChanged

For introductory information, see Media Handler Objects.


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