Microsoft DirectX 8.0 |
Specifies a media source.
Example
<CLIP src="sample.avi" START="1:05" STOP="1:42.5" MSTART="30" />
Attributes
Name Description Type C/C++ Equivalent CLSID CLSID of a source filter to use as the source. Do not specify this attribute if the SRC attribute is specified. CLSID IAMTimelineObj::SetSubObjectGUID FRAMERATE Default frame rate, in frames per second. Applies to still images and DIB sequences. For a still image, set the value to zero. For a DIB sequence, use a nonzero value. The default value is zero. Do not use a value with more than seven decimal digits. Float IAMTimelineSrc::SetDefaultFPS LOCK Specifies whether the clip is locked (should not be edited).
- TRUE: The clip is locked.
- FALSE: The clip is not locked. (Default)
Boolean IAMTimelineObj::SetLocked MLENGTH Duration of the original file. This value must be the actual duration, or rendering errors may occur. Time IAMTimelineSrc::SetMediaLength MSTART Start time of the clip, relative to the original media file. Time IAMTimelineSrc::SetMediaTimes MSTOP Stop time of the clip, relative to the original media file. Time IAMTimelineSrc::SetMediaTimes MUTE Specifies the source's mute state.
- TRUE: The source is not rendered.
- FALSE: The source is rendered. (Default)
Boolean IAMTimelineObj::SetMuted SRC Path name of the media file. The file can be any type supported by DirectShow or a still image. The supported formats for still images are bitmap, device-independent bitmap, GIF, and JPEG. For more details, see Remarks. Do not specify this attribute if the CLSID attribute is specified. String IAMTimelineSrc::SetMediaName START Start time of the clip, relative to the timeline. Time IAMTimelineObj::SetStartStop STOP Stop time of the clip, relative to the timeline. Time IAMTimelineObj::SetStartStop STREAM Specifies which stream to use in a multistream file, such as an AVI file. Integer IAMTimelineSrc::SetStreamNumber STRETCHMODE Specifies how an image that does not match the output dimensions is stretched. Can have one of the following values.
- Stretch: The image is stretched to fit the output frame size without preserving aspect ratio. (Default)
- Crop: The image is cropped to fit the output frame size.
- PreserveAspectRatio: The original aspect ratio is preserved, with a black letterbox along the shorter dimension.
- PreserveAspectRatioNoLetterBox: The image is resized to fill the entire target frame while preserving the aspect ratio.
String IAMTimelineSrc::SetStretchMode USERDATA Application-defined persistent data. Must be an even number of digits. The values AF must be capitalized. Do not use a prefix such as 0x. Example: 123ABC. Hexadecimal IAMTimelineObj::SetUserData USERID Application-defined identifier for the object. Integer IAMTimelineObj::SetUserID USERNAME Application-defined name for the object. String IAMTimelineObj::SetUserName
Parent/Child Information
Parent TRACK Children EFFECT
Remarks
Specify at least one start-time attribute (START or MSTART) and one stop-time attribute (STOP or MSTOP). If one of the start-time attributes is unspecified, it defaults to 0 (the beginning of the timeline for START, or the beginning of the clip for MSTART). If one of the stop-time attributes is unspecified, DES assumes a normal playback rate and calculates the unspecified stop time accordingly. If both stop times are specified, playback is faster or slower than normal, if necessary.
In the following example, the timeline duration is seven seconds (STOP minus START). Normal playback rate is assumed, so the media stop time defaults to 10 seconds (the duration plus MSTART).
<CLIP START="2" STOP="9" MSTART="3" />In the second example, the media start time defaults to 0, forcing the media duration to be 10 seconds. The timeline duration is five seconds, so the clip plays back at twice the normal rate.
<CLIP START="5" STOP="10" MSTOP="10" />If a still image is specified for the SRC attribute, DES attempts to load a series of still images to create an animation. For example, if the SRC attribute is IMAGE001.BMP, DES looks for IMAGE002.BMP, IMAGE003.BMP, IMAGE004.BMP, and so on. Assuming that they exist, they are displayed in sequential numerical order at the rate specified by the FRAMERATE attribute.