Check if we are supposed to watch the file for changes. If no, remove the file watcher. If yes, install one.
| 386 | // Check if we are supposed to watch the file for changes. If no, remove the file watcher. If yes, |
| 387 | // install one. |
| 388 | void FileSourceFFmpegFile::updateFileWatchSetting() |
| 389 | { |
| 390 | // Install a file watcher if file watching is active in the settings. |
| 391 | // The addPath/removePath functions will do nothing if called twice for the same file. |
| 392 | QSettings settings; |
| 393 | if (settings.value("WatchFiles", true).toBool()) |
| 394 | this->fileWatcher.addPath(this->fullFilePath); |
| 395 | else |
| 396 | this->fileWatcher.removePath(this->fullFilePath); |
| 397 | } |
| 398 | |
| 399 | std::pair<int64_t, size_t> FileSourceFFmpegFile::getClosestSeekableFrameBefore(int frameIdx) const |
| 400 | { |