private ProjectKeyframeOverviewRow CreateAndAddKeyframeRow(IInputFile inputFile) { ProjectKeyframeOverviewRow row = new ProjectKeyframeOverviewRow(resultsTree); row.InputFile = inputFile; _resultRows.Add(row); resultsTree.UpdateRows(); return(row); }
private void fullFileScanner_ResultDetected(object sender, FullFileScanner.FileScanResult scanresult) { IResultNode result = scanresult.Result; if (scanresult.Result == null) { return; } // First make sure the result is valid. List <IResultNode> allKeyframes = ThumbUtil.GetAllKeyFrames(scanresult.Result.Children.ToArray()); if (allKeyframes.Count > 0) { ProjectKeyframeOverviewRow row = CreateAndAddKeyframeRow(_projectFiles[_activeScanFileIndex]); row.KeyframesSourceFragment = scanresult.SourceFragment; if (_fullFileScanner.ScanNumCodecStreams > 0) { int codecCountNotScanned = scanresult.AvailableCodecStreams - _fullFileScanner.ScanNumCodecStreams; if (scanresult.AvailableCodecStreams > 1) { // Warn that only 1 codecstream in the container is scanned for this row row.WarnMoreCodecStreams(codecCountNotScanned); } } List <IResultNode> keyFrames = ThumbUtil.CheckMaxThumbCount(allKeyframes, NumThumbs); foreach (IResultNode frame in keyFrames) { _ffmpegManager.AddToConvertQueue(frame, row); } } else { // Invalidate the result, the scanner will scan the next codecstream (when available). scanresult.IsValid = false; } }
private void resultsTree_CellClick(object sender, EventArgs e) { ThumbCellWidget cell = sender as ThumbCellWidget; if (cell != null) { ProjectKeyframeOverviewRow row = cell.Row.Item as ProjectKeyframeOverviewRow; if (row != null) { FFmpegResult result = cell.CellFFmpegResult; if (result != null) { if (result.Bitmap != null) { SelectPacketInTree(row.KeyframesSourceFragment, result.SourcePacket); } else { AskChangeDefaultCodecHeader(result); } } } } }