diff options
Diffstat (limited to 'include/FileAnalyzer.hpp')
-rw-r--r-- | include/FileAnalyzer.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/FileAnalyzer.hpp b/include/FileAnalyzer.hpp index b06ef91..acc62d7 100644 --- a/include/FileAnalyzer.hpp +++ b/include/FileAnalyzer.hpp @@ -5,6 +5,8 @@ #include <string> namespace QuickMedia { + class FileAnalyzer; + struct Dimensions { int width; int height; @@ -17,6 +19,7 @@ namespace QuickMedia { VIDEO_MPEG, VIDEO_WEBM, VIDEO_FLV, + VIDEO_WMV, AUDIO_BASIC, AUDIO_AIFF, AUDIO_MPEG, @@ -40,13 +43,15 @@ namespace QuickMedia { bool is_video_ext(const char *ext); // Set |width| or |height| to 0 to disable scaling. - // This function is async. - bool video_get_first_frame(const char *filepath, const char *destination_path, int width = 0, int height = 0); + // TODO: Make this async + bool video_get_first_frame(const FileAnalyzer &file, const char *destination_path, int width = 0, int height = 0); class FileAnalyzer { public: FileAnalyzer(); bool load_file(const char *filepath, bool load_file_metadata = true); + + const std::string& get_filepath() const; ContentType get_content_type() const; size_t get_file_size() const; std::optional<Dimensions> get_dimensions() const; @@ -55,6 +60,7 @@ namespace QuickMedia { FileAnalyzer(FileAnalyzer&) = delete; FileAnalyzer& operator=(FileAnalyzer&) = delete; private: + std::string filepath; ContentType content_type; size_t file_size; std::optional<Dimensions> dimensions; |