Esempio n. 1
0
        public static void RebuildAuxillaryFile_SimpleText(VidkaClipTextSimple vclip, VidkaProj Proj, MetaGeneratorInOtherThread metaGenerator)
        {
            var filename = vclip.FileName;

            VidkaIO.MakeSureFolderExistsForFile(filename);
            VidkaImaging.RenderSimpleTextVideoClipToFile(vclip, Proj, filename);
            metaGenerator.RequestThumbsOnly(filename, true);
        }
Esempio n. 2
0
        public void NewFilesDragged(string[] filenames, long nFakeFrames)
        {
            draggedRelevantFiles = GetRelevantFilenames(filenames);
            var sampleFirst = draggedRelevantFiles.FirstOrDefault();

            OriginalFiles = draggedRelevantFiles;
            OriginalFile  = sampleFirst;
            if (IsFilenameVideo(sampleFirst))
            {
                Mode       = DragAndDropManagerMode.Video;
                DraggyText = GetDraggyTextAnalyzing(draggedRelevantFiles);
                foreach (var filename in draggedRelevantFiles)
                {
                    _draggies.Add(new DragAndDropMediaFile(Proj)
                    {
                        Filename    = filename,
                        NFakeFrames = nFakeFrames,
                    });
                    metaGenerator.RequestMeta(filename);
                    metaGenerator.RequestThumbsAndWave(filename);
                }
            }
            else if (IsFilenameAudio(sampleFirst))
            {
                Mode       = DragAndDropManagerMode.Audio;
                DraggyText = GetDraggyTextAnalyzing(draggedRelevantFiles);
                foreach (var filename in draggedRelevantFiles)
                {
                    _draggies.Add(new DragAndDropMediaFile(Proj)
                    {
                        Filename    = filename,
                        NFakeFrames = (long)(Proj.FrameRate * Settings.Default.ImageClipLengthSeconds),
                        HasAudio    = true,
                    });
                    metaGenerator.RequestMeta(filename);
                    metaGenerator.RequestWaveOnly(filename);
                }
            }
            else if (IsFilenameImage(sampleFirst))
            {
                Mode       = DragAndDropManagerMode.Image;
                DraggyText = GetDraggyTextAnalyzing(draggedRelevantFiles);
                foreach (var filename in draggedRelevantFiles)
                {
                    _draggies.Add(new DragAndDropMediaFile(Proj)
                    {
                        Filename    = filename,
                        NFakeFrames = (long)(Proj.FrameRate * Settings.Default.ImageClipLengthSeconds),
                        HasAudio    = false,
                    });
                    //metaGenerator.RequestMeta(filename);
                    metaGenerator.RequestThumbsOnly(filename);
                }
            }
            else if (Directory.Exists(sampleFirst))
            {
                Mode       = DragAndDropManagerMode.Folder;
                DraggyText = Path.GetFileName(sampleFirst);
                _draggies.Add(new DragAndDropMediaFile(Proj)
                {
                    Filename = sampleFirst,
                });
            }
            else if (IsFilenameVidkaProject(sampleFirst))
            {
                Mode       = DragAndDropManagerMode.VidkaProject;
                DraggyText = Path.GetFileName(sampleFirst);
                _draggies.Add(new DragAndDropMediaFile(Proj)
                {
                    Filename = sampleFirst,
                });
            }
            foreach (var ddd in _draggies)
            {
                ddd.Mode = Mode;
            }
        }