Пример #1
0
        internal void RequestThumbsAndWave(string filename)
        {
            taskThread.QueueThisUpPlease(() =>
            {
                var filenameThumb   = fileMapping.AddGetThumbnailFilename(filename);
                var filenameWave    = fileMapping.AddGetWaveFilenameDat(filename);
                var filenameWaveJpg = fileMapping.AddGetWaveFilenameJpg(filename);
                fileMapping.MakeSureDataFolderExists(filenameThumb);

                if (!File.Exists(filenameThumb))
                {
                    // generates the thumbnails
                    UiConsolePush(VidkaConsoleLogLevel.Info, "generating thumbs " + Path.GetFileName(filenameThumb));
                    var op2 = new ThumbnailTest(filename, filenameThumb);
                    UiPushResult(op2);
                }
                if (ThumbnailsReady != null)
                {
                    ThumbnailsReady(filename, filenameThumb);
                }

                if (!File.Exists(filenameWaveJpg))
                {
                    // generates the waveform
                    UiConsolePush(VidkaConsoleLogLevel.Info, "generating wave " + Path.GetFileName(filenameWaveJpg));
                    var op3 = new WaveformExtraction(filename, filenameWave, filenameWaveJpg, true);
                    UiPushResult(op3);
                }
                if (WaveformReady != null)
                {
                    WaveformReady(filename, filenameWave, filenameWaveJpg);
                }
            });
        }
        internal void RequestThumbsAndWave(string filename)
        {
            taskThread.QueueThisUpPlease(() =>
            {
                var filenameThumb = fileMapping.AddGetThumbnailFilename(filename);
                var filenameWave = fileMapping.AddGetWaveFilenameDat(filename);
                var filenameWaveJpg = fileMapping.AddGetWaveFilenameJpg(filename);
                fileMapping.MakeSureDataFolderExists(filenameThumb);

                if (!File.Exists(filenameThumb)) {
                    // generates the thumbnails
                    UiConsolePush(VidkaConsoleLogLevel.Info, "generating thumbs " + Path.GetFileName(filenameThumb));
                    var op2 = new ThumbnailTest(filename, filenameThumb);
                    UiPushResult(op2);
                }
                if (ThumbnailsReady != null)
                    ThumbnailsReady(filename, filenameThumb);

                if (!File.Exists(filenameWaveJpg)) {
                    // generates the waveform
                    UiConsolePush(VidkaConsoleLogLevel.Info, "generating wave " + Path.GetFileName(filenameWaveJpg));
                    var op3 = new WaveformExtraction(filename, filenameWave, filenameWaveJpg, true);
                    UiPushResult(op3);
                }
                if (WaveformReady != null)
                    WaveformReady(filename, filenameWave, filenameWaveJpg);
            });
        }