File indexing completed on 2024-04-21 04:51:53
0001 /* 0002 SPDX-FileCopyrightText: 2017 Nicolas Carion 0003 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 */ 0005 0006 #pragma once 0007 0008 #include <QString> 0009 #include <memory> 0010 0011 namespace Mlt { 0012 class Profile; 0013 } 0014 0015 /** @brief This is a virtual class that represents any profile that we can get info from 0016 */ 0017 class ProfileInfo 0018 { 0019 public: 0020 ProfileInfo() = default; 0021 virtual ~ProfileInfo() = default; 0022 0023 virtual bool is_valid() const = 0; 0024 virtual QString description() const = 0; 0025 virtual int frame_rate_num() const = 0; 0026 virtual int frame_rate_den() const = 0; 0027 virtual double fps() const = 0; 0028 virtual int width() const = 0; 0029 virtual int height() const = 0; 0030 virtual bool progressive() const = 0; 0031 virtual bool bottom_field_first() const = 0; 0032 virtual int sample_aspect_num() const = 0; 0033 virtual int sample_aspect_den() const = 0; 0034 virtual double sar() const = 0; 0035 virtual int display_aspect_num() const = 0; 0036 virtual int display_aspect_den() const = 0; 0037 virtual double dar() const = 0; 0038 virtual int colorspace() const = 0; 0039 QString colorspaceDescription() const; 0040 virtual QString path() const = 0; 0041 0042 /** @brief overload of comparison operators */ 0043 bool operator==(const ProfileInfo &other) const; 0044 bool operator!=(const ProfileInfo &other) const; 0045 0046 /** @brief Returns true if both profiles have same fps, and can be mixed with the xml producer */ 0047 bool isCompatible(std::unique_ptr<ProfileInfo> &other) const; 0048 bool isCompatible(Mlt::Profile *other) const; 0049 0050 virtual void adjustDimensions() = 0; 0051 0052 const QString descriptiveString() const; 0053 const QString dialogDescriptiveString() const; 0054 };