OpenShot Library | libopenshot  0.3.2
Public Member Functions | Public Attributes | Friends | List of all members
openshot::Profile Class Reference

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

#include <Profiles.h>

Collaboration diagram for openshot::Profile:
[legend]

Public Member Functions

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

Public Attributes

ProfileInfo info
 Profile data stored here. More...
 

Friends

bool operator< (const Profile &l, const Profile &r)
 
bool operator== (const Profile &l, const Profile &r)
 Equality operator (compare profile objects) More...
 
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.

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
pathThe 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 Function 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(), SetJsonValue(), and ShortName().


The documentation for this class was generated from the following files:
openshot::Profile::Profile
Profile()
Default Constructor for Profile.
Definition: Profiles.cpp:20