[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference
Programming with the Movie Capture Object
To learn more about programming with the Movie Capture object, see:
For introductory information, see Programming with Movie Capture and VideoIO Objects.
UMSCapture Methods
UMSCapture includes capture controls, media record controls, video device controls, audio device controls, media attribute controls for video, media attribute controls for audio, and media monitoring controls.
Capture Controls
Capture controls include:
open_video |
Opens the video device. |
open_audio |
Opens the audio device. |
close_video |
Closes the video device. |
close_audio |
Closes the audio device. |
save |
Saves a file. |
reset_tempfile |
Reuses the fast format file (temporary file). |
cancel_save |
Stops a save. |
get_state |
Returns current state. |
Media Record Controls
Media record controls include:
record |
Records video/audio data into a temporary file defined in UMS_config configuration file. |
pause |
Pauses record. |
resume |
Resumes record. |
stop |
Stops record. |
Video Device Controls
Video device controls include:
set_video_input_connector |
Enables video input for recording. |
set_analog_video_format |
Sets NTSC or PAL as the input video format. |
set_analog_video_monitor |
Enables or disables monitoring video on video monitor. |
Audio Device Controls
Audio device controls include:
enable_audio_connector |
Enables audio input and output for recording and monitoring. |
set_volume |
Sets volume. |
set_balance |
Sets balance. |
set_audio_monitor |
Enables or disables monitoring of audio. |
Media Attribute Controls for Video
Media attribute controls for video include:
set_input_image_size |
Sets input video size. |
set_capture_rate |
Sets capture speed (frames per second). |
set_quality_factor |
Sets captured image quality. |
set_q_table |
Sets quantization tables. |
set_Huffman_table |
Sets Huffman tables. |
set_subimage_size |
Sets to capture part of input image. |
Media Attribute Controls for Audio
Media attribute controls for audio include:
set_audio_capture |
Sets to capture audio data during the record. |
set_audio_format_type |
Sets audio data format. |
set_audio_sample_rate |
Sets the sample rate (samples per second). |
set_audio_bits_per_sample |
Sets number of bits per sample. |
set_number_channels |
Sets mono or stereo. |
set_audio_byte_order |
Sets byte order to either most significant byte first or least significant byte first. |
set_audio_number_format |
Sets byte format to unsigned, signed, or twos complement. |
Media Monitoring Controls
Media monitoring controls include:
set_window |
Sets an AIXwindows window display ID and window ID for monitoring. |
set_window_monitor |
Enables monitoring on an AIXwindows window. |
set_monitor_image_format |
Sets image format for window monitoring (RGB8 or RGB24). |
get_colormap_id |
Gets color map ID for monitoring the window. |
set_colormap |
Sets color map. |
set_colormap_index |
Sets the start entry of the color map. |
set_colormap_size |
Sets the size of the color map. |
release_window |
Releases the window back to the application. |
get_event |
Gets the next event. |
event_pending |
Determines if the event is available. |
get_event_handle |
Returns the file descriptor for event communication. |
get_number_of_missing_frames |
Returns how many frames missed and how many frames captured in the most current record. |
Recording a Movie File
The capture object uses the record method to capture video/audio data to a temporary file and the save method to convert it to an AVI file. Recording is paused by the pause method and resumed by the resume method. Note that during recording, audio or video media attributes must not be alternated.
To record a movie, do the following:
- Initialize the SOM environment.
- Create an instance of a UMSCapture object.
- Using an alias, open (using open_video) a video device (defined in the configuration file).
- Using an alias, use open_audio to open an audio device (defined in the configuration file).
- Specify the source of the recorded data using set_video_input_connector and enable_audio_connector.
- Issue the record method.
- To stop recording, use the stop method.
- Save the file using the save method.
Connectors
The movie capture object uses different types of connectors to indicate the input video/audio source for recorded data. The set_video_input_connector method allows choices of either INPUT_COMPOSITE or INPUT_SVIDEO. The enable_audio_connector method input connector allows choices of LINE_IN, HIGH_GAIN_MIC, or LOW_GAIN_MIC. The INPUT_COMPOSITE connector is used to provide a composite video baseband signal for recording. INPUT_SVIDEO connector is used for S-Video devices. The LINE IN connector typically is used to provide line level input. LOW_GAIN_MIC is used for microphones not providing their own amplification, while HIGH_GAIN_MIC is used for microphones that provide amplification.
For introductory information, see Programming with Movie Capture and VideoIO Objects.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]