Loading...
Searching...
No Matches
openshot::Profile Class Reference

This class loads a special text-based file called a Profile. More...

`#include <Profiles.h>`

## Public Member Functions

std::string | Json () const
| Generate JSON string of this object.
Json::Value | JsonValue () const
| Generate Json::Value for this object.
std::string | Key ()
| Return a unique key of this profile with padding (01920x1080i2997_16:09)
std::string | LongName ()
| Return a longer format name (1920x1080p @ 29.97 fps (16:9))
std::string | LongNameWithDesc ()
| Return a longer format name with description (1920x1080p @ 29.97 fps (16:9) HD 1080i 29.97 fps)
| Profile ()
| Default Constructor for Profile.
| Profile (std::string path)
| Constructor for Profile.
void | SetJson (const std::string value)
| Load JSON string into this object.
void | SetJsonValue (const Json::Value root)
| Load Json::Value into this object.
std::string | ShortName ()
| Return the name of this profile (1920x1080p29.97)

## Public Attributes

ProfileInfo | info
| Profile data stored here.

## Friends

bool | operator< (const Profile &l, const Profile &r)
bool | operator== (const Profile &l, const Profile &r)
| Equality operator (compare profile objects)
bool | operator> (const Profile &l, const Profile &r)

## Detailed Description

This class loads a special text-based file called a Profile.

Profile data contains common video settings, such as framerate, height, width, aspect ratio, etc... All derived classes from openshot::WriterBase can load profile data using this class.

// This example demonstrates how to load a profile with this class.
Profile p("/home/jonathan/dv_ntsc_wide"); // Load the DV NTSC Widt profile data.
openshot::Profile
This class loads a special text-based file called a Profile.
Definition Profiles.h:65

Definition at line 64 of file Profiles.h.

## Constructor & Destructor Documentation

## Profile() [1/2]

Profile::Profile | ( |  | ) |

Default Constructor for Profile.

Definition at line 20 of file Profiles.cpp.

Referenced by Profile().

## Profile() [2/2]

Profile::Profile | ( | std::string | path | ) |

Constructor for Profile.

Parameters

  path | The folder path / location of a profile file

Definition at line 37 of file Profiles.cpp.

## Member Function Documentation

## Json()

std::string Profile::Json | ( |  | ) | const

Generate JSON string of this object.

Definition at line 201 of file Profiles.cpp.

## JsonValue()

Json::Value Profile::JsonValue | ( |  | ) | const

Generate Json::Value for this object.

Definition at line 208 of file Profiles.cpp.

Referenced by Json().

## Key()

std::string Profile::Key | ( |  | ) |

Return a unique key of this profile with padding (01920x1080i2997_16:09)

Definition at line 147 of file Profiles.cpp.

## LongName()

std::string Profile::LongName | ( |  | ) |

Return a longer format name (1920x1080p @ 29.97 fps (16:9))

Definition at line 175 of file Profiles.cpp.

## LongNameWithDesc()

std::string Profile::LongNameWithDesc | ( |  | ) |

Return a longer format name with description (1920x1080p @ 29.97 fps (16:9) HD 1080i 29.97 fps)

Definition at line 188 of file Profiles.cpp.

## SetJson()

void Profile::SetJson | ( | const std::string | value | ) |

Load JSON string into this object.

Definition at line 231 of file Profiles.cpp.

## SetJsonValue()

void Profile::SetJsonValue | ( | const Json::Value | root | ) |

Load Json::Value into this object.

Definition at line 248 of file Profiles.cpp.

Referenced by SetJson().

## ShortName()

std::string Profile::ShortName | ( |  | ) |

Return the name of this profile (1920x1080p29.97)

Definition at line 163 of file Profiles.cpp.

## Friends And Related Symbol Documentation

## operator<

bool operator< | ( | const Profile & | l,
|  | const Profile & | r
| ) |  |

friend

Less than operator (compare profile objects) Compare # of pixels, then FPS, then DAR

Definition at line 71 of file Profiles.h.

## operator==

bool operator== | ( | const Profile & | l,
|  | const Profile & | r
| ) |  |

friend

Equality operator (compare profile objects)

Definition at line 128 of file Profiles.h.

## operator>

bool operator> | ( | const Profile & | l,
|  | const Profile & | r
| ) |  |

friend

Greater than operator (compare profile objects) Compare # of pixels, then FPS, then DAR

Definition at line 100 of file Profiles.h.

## Member Data Documentation

## info

ProfileInfo openshot::Profile::info

Profile data stored here.

Definition at line 136 of file Profiles.h.

Referenced by JsonValue(), Key(), LongName(), LongNameWithDesc(), Profile(), Profile(), SetJsonValue(), and ShortName().

The documentation for this class was generated from the following files:

- Profiles.h
- Profiles.cpp