# FFmpegKit Linux API: ffmpegkit::MediaInformation Class Reference

Loading...
Searching...
No Matches
ffmpegkit::MediaInformation Class Reference

`#include <MediaInformation.h>`

## Public Member Functions

| MediaInformation (std::shared_ptr< rapidjson::Value > mediaInformationValue, std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > streams, std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > chapters)
std::shared_ptr< std::string > | getFilename ()
std::shared_ptr< std::string > | getFormat ()
std::shared_ptr< std::string > | getLongFormat ()
std::shared_ptr< std::string > | getDuration ()
std::shared_ptr< std::string > | getStartTime ()
std::shared_ptr< std::string > | getSize ()
std::shared_ptr< std::string > | getBitrate ()
std::shared_ptr< rapidjson::Value > | getTags ()
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > | getStreams ()
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > | getChapters ()
std::shared_ptr< std::string > | getStringProperty (const char *key)
std::shared_ptr< int64_t > | getNumberProperty (const char *key)
std::shared_ptr< rapidjson::Value > | getProperty (const char *key)
std::shared_ptr< std::string > | getStringFormatProperty (const char *key)
std::shared_ptr< int64_t > | getNumberFormatProperty (const char *key)
std::shared_ptr< rapidjson::Value > | getFormatProperty (const char *key)
std::shared_ptr< rapidjson::Value > | getFormatProperties ()
std::shared_ptr< rapidjson::Value > | getAllProperties ()

## Static Public Attributes

static constexpr const char * | KeyFormatProperties = "format"
static constexpr const char * | KeyFilename = "filename"
static constexpr const char * | KeyFormat = "format_name"
static constexpr const char * | KeyFormatLong = "format_long_name"
static constexpr const char * | KeyStartTime = "start_time"
static constexpr const char * | KeyDuration = "duration"
static constexpr const char * | KeySize = "size"
static constexpr const char * | KeyBitRate = "bit_rate"
static constexpr const char * | KeyTags = "tags"

## Private Attributes

std::shared_ptr< rapidjson::Value > | _mediaInformationValue
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > | _streams
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > | _chapters

## Detailed Description

Media information class.

Definition at line 33 of file MediaInformation.h.

## Constructor & Destructor Documentation

## MediaInformation()

ffmpegkit::MediaInformation::MediaInformation | ( | std::shared_ptr< rapidjson::Value > | mediaInformationValue,
|  | std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > | streams,
|  | std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > | chapters
| ) |  |

Definition at line 22 of file MediaInformation.cpp.

## Member Function Documentation

## getAllProperties()

std::shared_ptr< rapidjson::Value > ffmpegkit::MediaInformation::getAllProperties | ( |  | ) |

Returns all properties defined.

Returns
  all properties in a Value or nullptr if no properties are defined

Definition at line 141 of file MediaInformation.cpp.

## getBitrate()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getBitrate | ( |  | ) |

Returns bitrate.

Returns
  media bitrate in kb/s

Definition at line 50 of file MediaInformation.cpp.

## getChapters()

std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > ffmpegkit::MediaInformation::getChapters | ( |  | ) |

Returns all chapters.

Returns
  chapters vector

Definition at line 69 of file MediaInformation.cpp.

## getDuration()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getDuration | ( |  | ) |

Returns duration.

Returns
  media duration in milliseconds

Definition at line 42 of file MediaInformation.cpp.

## getFilename()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getFilename | ( |  | ) |

Returns file name.

Returns
  media file name

Definition at line 26 of file MediaInformation.cpp.

## getFormat()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getFormat | ( |  | ) |

Returns format.

Returns
  media format

Definition at line 30 of file MediaInformation.cpp.

## getFormatProperties()

std::shared_ptr< rapidjson::Value > ffmpegkit::MediaInformation::getFormatProperties | ( |  | ) |

Returns all format properties defined.

Returns
  all format properties in a Value or nullptr if no format properties are defined

Definition at line 131 of file MediaInformation.cpp.

## getFormatProperty()

std::shared_ptr< rapidjson::Value > ffmpegkit::MediaInformation::getFormatProperty | ( | const char * | key | ) |

Returns the format property associated with the key.

Returns
  format property in a Value or nullptr if the key is not found

Definition at line 120 of file MediaInformation.cpp.

## getLongFormat()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getLongFormat | ( |  | ) |

Returns long format.

Returns
  media long format

Definition at line 34 of file MediaInformation.cpp.

## getNumberFormatProperty()

std::shared_ptr< int64_t > ffmpegkit::MediaInformation::getNumberFormatProperty | ( | const char * | key | ) |

Returns the format property associated with the key.

Returns
  format property as number or nullptr if the key is not found

Definition at line 111 of file MediaInformation.cpp.

## getNumberProperty()

std::shared_ptr< int64_t > ffmpegkit::MediaInformation::getNumberProperty | ( | const char * | key | ) |

Returns the property associated with the key.

Returns
  property as number or nullptr if the key is not found

Definition at line 82 of file MediaInformation.cpp.

## getProperty()

std::shared_ptr< rapidjson::Value > ffmpegkit::MediaInformation::getProperty | ( | const char * | key | ) |

Returns the property associated with the key.

Returns
  property in a Value or nullptr if the key is not found

Definition at line 91 of file MediaInformation.cpp.

## getSize()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getSize | ( |  | ) |

Returns size.

Returns
  media size in bytes

Definition at line 46 of file MediaInformation.cpp.

## getStartTime()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getStartTime | ( |  | ) |

Returns start time.

Returns
  media start time in milliseconds

Definition at line 38 of file MediaInformation.cpp.

## getStreams()

std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > ffmpegkit::MediaInformation::getStreams | ( |  | ) |

Returns all streams.

Returns
  streams vector

Definition at line 65 of file MediaInformation.cpp.

## getStringFormatProperty()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getStringFormatProperty | ( | const char * | key | ) |

Returns the format property associated with the key.

Returns
  format property as string or nullptr if the key is not found

Definition at line 102 of file MediaInformation.cpp.

## getStringProperty()

std::shared_ptr< std::string > ffmpegkit::MediaInformation::getStringProperty | ( | const char * | key | ) |

Returns the property associated with the key.

Returns
  property as string or nullptr if the key is not found

Definition at line 73 of file MediaInformation.cpp.

## getTags()

std::shared_ptr< rapidjson::Value > ffmpegkit::MediaInformation::getTags | ( |  | ) |

Returns all tags.

Returns
  tags Value

Definition at line 54 of file MediaInformation.cpp.

## Field Documentation

## _chapters

std::shared_ptr<std::vector<std::shared_ptr<ffmpegkit::Chapter> > > ffmpegkit::MediaInformation::_chapters

private

Definition at line 176 of file MediaInformation.h.

## _mediaInformationValue

std::shared_ptr<rapidjson::Value> ffmpegkit::MediaInformation::_mediaInformationValue

private

Definition at line 174 of file MediaInformation.h.

## _streams

std::shared_ptr<std::vector<std::shared_ptr<ffmpegkit::StreamInformation> > > ffmpegkit::MediaInformation::_streams

private

Definition at line 175 of file MediaInformation.h.

## KeyBitRate

constexpr const char* ffmpegkit::MediaInformation::KeyBitRate = "bit_rate"

staticconstexpr

Definition at line 42 of file MediaInformation.h.

## KeyDuration

constexpr const char* ffmpegkit::MediaInformation::KeyDuration = "duration"

staticconstexpr

Definition at line 40 of file MediaInformation.h.

## KeyFilename

constexpr const char* ffmpegkit::MediaInformation::KeyFilename = "filename"

staticconstexpr

Definition at line 36 of file MediaInformation.h.

## KeyFormat

constexpr const char* ffmpegkit::MediaInformation::KeyFormat = "format_name"

staticconstexpr

Definition at line 37 of file MediaInformation.h.

## KeyFormatLong

constexpr const char* ffmpegkit::MediaInformation::KeyFormatLong = "format_long_name"

staticconstexpr

Definition at line 38 of file MediaInformation.h.

## KeyFormatProperties

constexpr const char* ffmpegkit::MediaInformation::KeyFormatProperties = "format"

staticconstexpr

Definition at line 35 of file MediaInformation.h.

## KeySize

constexpr const char* ffmpegkit::MediaInformation::KeySize = "size"

staticconstexpr

Definition at line 41 of file MediaInformation.h.

## KeyStartTime

constexpr const char* ffmpegkit::MediaInformation::KeyStartTime = "start_time"

staticconstexpr

Definition at line 39 of file MediaInformation.h.

## KeyTags

constexpr const char* ffmpegkit::MediaInformation::KeyTags = "tags"

staticconstexpr

Definition at line 43 of file MediaInformation.h.

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

- MediaInformation.h
- MediaInformation.cpp