AGI STK Graphics 11 Send comments on this topic.
IAgStkGraphicsVideoStream Interface





Description

A raster stream that streams from a video. The video can be read from a file, or streamed from an HTTP, RTP, UDP, or TCP source. See the Video Streams Overview for a list of supported video formats and Uri usage.

Public Methods

Public Method Close Closes the video stream and any associated resources.
Public Method Pause Pauses the video when the Playback property is set to RealTime.
Public Method Play Begins playing the video when the Playback property is set to RealTime.
Public Method ReinitializeWithStringUri Reinitializes the video stream from a Uri, which can be a file, HTTP, RTP, UDP, or TCP source. See the Video Streams Overview for a list of supported video formats and Uri usage.
Public Method Reset Seeks the video to its first frame and begins playing the video when the Playback property is set to RealTime.
Public Method Stop Stops the video when the Playback property is set to RealTime. Stopping the video will seek to the first frame and pause playback. Use the Play method to begin playing the video again.

Public Properties

Public Property AllowFrameDrop Gets or sets a value indicating if frames should be dropped if video processing can not keep up with a video stream. If this is set to false, the video quality may degrade when the processing load is too high. Alternatively, when set to true, frames will be dropped, but each frame that is processed should have an improved visual quality.
Public Property AudioUri Gets the Uri of the audio.
Public Property EnableAudio Gets or sets a value indicating if the encoded audio stream should be synchronized to video playback If this is set to false, the audio stream will be disabled. If true, the audio stream will be sampled from the video source and synchronized with the video stream.
Public Property EndFrame Gets or sets the end frame of the video. Changing the End Frame property also changes the End Time property to the time in the video that corresponds to the specified frame.
Public Property EndTime Gets or sets the end time of the video in seconds. Changing the End Time property also changes the End Frame property to the frame in the video that corresponds to the specified time.
Public Property FrameRate Gets or sets the frame rate of the video when the Playback property is set to RealTime. If this property is not set, the internal framerate of the video is used.
Public Property IntervalEndTime Gets or sets the Scene Manager time at which the video will stop playing when the Playback property is set to Time Interval.
Public Property IntervalStartTime Gets or sets the Scene Manager time at which the video will begin playing when the Playback property is set to Time Interval.
Public Property IsPlaying Gets whether or not the video is playing. Use the Play, Pause, Stop, and Reset methods to control the playback of the video when the Playback property is set to RealTime.
Public Property Loop Gets or sets whether the video will loop when it reaches its last frame when the Playback property is set to RealTime.
Public Property PacketAcquirementYieldTime Gets or sets the thread processing yield time for asynchronous streaming of video over common protocols like udp. Setting a high value may increase performance, but may cause frames or packets to drop, effecting visual quality. A lower value will ensure high priority processing of the stream, and thus less visual degradation, but may affect performance.
Public Property PacketBufferLimit Gets or sets a value indicating the buffering limit for packets when processing a video stream. Increasing this value will provide more buffering of the video stream when frame processing cannot keep up, but has memory implications and may result in the video falling behind, or eventual visual degradation, if the frame processing load is not lessened.
Public Property Playback Gets or sets the Video Playback mode of the video.
Public Property StartFrame Gets or sets the start frame of the video. Changing the Start Frame property also changes the Start Time property to the time in the video that corresponds to the specified frame.
Public Property StartTime Gets or sets the start time of the video in seconds. Changing the Start Time property also changes the Start Frame property to the frame in the video that corresponds to the specified time.
Public Property Uri Gets the Uri of the video.

Example

Draw a new Video Stream primitive
[MATLAB] Copy Code
% IAgScenario scenario: Scenario object 
manager = scenario.SceneManager; 
video = manager.Initializers.VideoStream.InitializeWithStringUri('C:\Program Files\AGI\STK 11\CodeSamples\CustomApplications\Data\HowTo\Videos\ShenzhouVII_BX1.wmv'); 
% Playback options are 'eStkGraphicsVideoPlaybackTimeInterval' 
% 'eStkGraphicsVideoPlaybackRealTime' 
video.Playback = 'eStkGraphicsVideoPlaybackRealTime'; 
video.Loop = true; 
overlay = manager.Initializers.TextureScreenOverlay.InitializeWithXYWidthHeight(0,0,video.Width / 3, video.Height / 3); 
overlay.MaintainAspectRatio = true; 
overlay.Translucency = 0; 
overlay.BorderSize = 1; 
overlay.BorderTranslucency = .25; 
overlay.Origin = 'eStkGraphicsScreenOverlayOriginTopRight'; 
overlay.Texture = scenario.SceneManager.Textures.FromRaster(video); 
manager.ScreenOverlays.Overlays.Add(overlay); 
%Render the Scene 
manager.Render; 
 
 

See Also

CoClasses that Implement IAgStkGraphicsVideoStream

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1