private void LoadFrame(long frameMilliseconds) { activeRequestsCount++; string path = playOptions.Path; if (path.StartsWith(PATH_PREFIX)) { path = path.Substring(PATH_PREFIX.Length, path.Length - PATH_PREFIX.Length); } // When the key exists but the value is null we are in the process of fetching this frame MediaHelpers.GetVideoFrame(path, frameMilliseconds, FRAME_HEIGHT, OnFrameLoaded); }
private void LoadFrameAndAnalyze(BaseVideoPlayer videoPlayer) { string path = videoPlayer.FilePath; if (path.StartsWith(PATH_PREFIX)) { path = path.Substring(PATH_PREFIX.Length, path.Length - PATH_PREFIX.Length); } // Seek to an arbitrary frame in hopes that it has good image data to analyze. // and isn't just a black fade transition or something like that. long framePositionMilliseconds = videoPlayer.DurationMilliseconds / 4; MediaHelpers.GetVideoFrame(path, framePositionMilliseconds, -1, OnFrameLoaded); }