13#ifndef OPENSHOT_PROFILE_H
14#define OPENSHOT_PROFILE_H
21#include <QtCore/QString>
22#include <QtCore/QStringList>
23#include <QtCore/QFile>
67 std::string formattedFPS(
bool include_decimal);
80 if (left_pixels < right_pixels) {
84 if (left_fps < right_fps) {
88 if (left_dar < right_dar) {
109 if (left_pixels > right_pixels) {
113 if (left_fps > right_fps) {
117 if (left_dar > right_dar) {
151 std::string
Json()
const;
153 void SetJson(
const std::string value);
Header file for Fraction class.
Header file for JSON class.
This class represents a fraction.
int num
Numerator for the fraction.
double ToDouble() const
Return this fraction as a double (i.e. 1/2 = 0.5)
int den
Denominator for the fraction.
This class loads a special text-based file called a Profile.
std::string LongName()
Return a longer format name (1920x1080p @ 29.97 fps (16:9))
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
std::string ShortName()
Return the name of this profile (1920x1080p29.97)
friend bool operator==(const Profile &l, const Profile &r)
Equality operator (compare profile objects)
Profile()
Default Constructor for Profile.
friend bool operator>(const Profile &l, const Profile &r)
std::string LongNameWithDesc()
Return a longer format name with description (1920x1080p @ 29.97 fps (16:9) HD 1080i 29....
std::string Json() const
Generate JSON string of this object.
ProfileInfo info
Profile data stored here.
void SetJson(const std::string value)
Load JSON string into this object.
std::string Key()
Return a unique key of this profile with padding (01920x1080i2997_16:09)
Json::Value JsonValue() const
Generate Json::Value for this object.
friend bool operator<(const Profile &l, const Profile &r)
This namespace is the default namespace for all code in the openshot library.
This struct holds profile data, typically loaded from a file.
std::string description
The description of this profile.
int width
The width of the video (in pixels)
Fraction pixel_ratio
The pixel ratio of the video stream as a fraction (i.e. some pixels are not square)
Fraction display_ratio
The ratio of width to height of the video stream (i.e. 640x480 has a ratio of 4/3)
Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)
int height
The height of the video (in pixels)
int pixel_format
The pixel format (i.e. YUV420P, RGB24, etc...)