VideoPlayer.LoadSync method |
|
Remarks
Loads a video from the specified file. In order to avoid a temporary freeze of the container application user interface, the loading is performed inside a secondary thread so, when this call will return, the video will not be still available and it's recommended waiting for the CallbackForPlayersEvents delegate being invoked with the nEvent parameter set to EV_SOUND_SYNC_LOADED before making further calls for starting playback or for obtaining information about the loaded video.
Video loading and rendering is performed through DirectShow so, in order to load a certain video format (like MPEG, MP4, AVI, etc.) the specific codec must be available on the target system or calls to this method would fail. One of the best packages containing most audio and video codecs for DirectShow is K-Lite Codec Pack and can be downloaded for free from the following link.
In order to be able to apply special effects like equalizers or DMO effects, the audio stream must be in Stereo or Mono so, for this reason, 5.1 and 7.1 video files are automatically resampled to Stereo. If you should need keeping 5.1 or 7.1 channels configuration, you would have to set the EnableMixingFeatures property to False.
For further details about the use of the embedded video player see the VideoPlayer class section. For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
Return value
|