OpenShot Library | libopenshot
0.4.0
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_PROFILE_H
14 #define OPENSHOT_PROFILE_H
21 #include <QtCore/QString>
22 #include <QtCore/QStringList>
23 #include <QtCore/QFile>
24 #include <QTextStream>
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) {
147 void Save(
const std::string& file_path)
const;
155 std::string
Json()
const;
157 void SetJson(
const std::string value);
std::string LongNameWithDesc()
Return a longer format name with description (1920x1080p @ 29.97 fps (16:9) HD 1080i 29....
Header file for Fraction class.
Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)
This namespace is the default namespace for all code in the openshot library.
int width
The width of the video (in pixels)
int height
The height 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)
This class represents a fraction.
friend bool operator==(const Profile &l, const Profile &r)
Equality operator (compare profile objects)
int pixel_format
The pixel format (i.e. YUV420P, RGB24, etc...)
std::string LongName()
Return a longer format name (1920x1080p @ 29.97 fps (16:9))
friend bool operator<(const Profile &l, const Profile &r)
This class loads a special text-based file called a Profile.
double ToDouble() const
Return this fraction as a double (i.e. 1/2 = 0.5)
int num
Numerator for the fraction.
This struct holds profile data, typically loaded from a file.
int den
Denominator for the fraction.
Fraction display_ratio
The ratio of width to height of the video stream (i.e. 640x480 has a ratio of 4/3)
std::string Json() const
Generate JSON string of this object.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
std::string description
The description of this profile.
ProfileInfo info
Profile data stored here.
Json::Value JsonValue() const
Generate Json::Value for this object.
friend bool operator>(const Profile &l, const Profile &r)
void Save(const std::string &file_path) const
Save profile to a text file (label=value, one per line format)
std::string ShortName()
Return the name of this profile (1920x1080p29.97)
void SetJson(const std::string value)
Load JSON string into this object.
Header file for JSON class.
std::string Key()
Return a unique key of this profile with padding (01920x1080i2997_16:09)
Profile()
Default Constructor for Profile.