# FFmpegKit Linux API: ffmpegkit::StreamInformation Class Reference

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

`#include <StreamInformation.h>`

## Public Member Functions

| StreamInformation (std::shared_ptr< rapidjson::Value > streamInformationValue)
std::shared_ptr< int64_t > | getIndex ()
std::shared_ptr< std::string > | getType ()
std::shared_ptr< std::string > | getCodec ()
std::shared_ptr< std::string > | getCodecLong ()
std::shared_ptr< std::string > | getFormat ()
std::shared_ptr< int64_t > | getWidth ()
std::shared_ptr< int64_t > | getHeight ()
std::shared_ptr< std::string > | getBitrate ()
std::shared_ptr< std::string > | getSampleRate ()
std::shared_ptr< std::string > | getSampleFormat ()
std::shared_ptr< std::string > | getChannelLayout ()
std::shared_ptr< std::string > | getSampleAspectRatio ()
std::shared_ptr< std::string > | getDisplayAspectRatio ()
std::shared_ptr< std::string > | getAverageFrameRate ()
std::shared_ptr< std::string > | getRealFrameRate ()
std::shared_ptr< std::string > | getTimeBase ()
std::shared_ptr< std::string > | getCodecTimeBase ()
std::shared_ptr< rapidjson::Value > | getTags ()
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< rapidjson::Value > | getAllProperties ()

## Static Public Attributes

static constexpr const char * | KeyIndex = "index"
static constexpr const char * | KeyType = "codec_type"
static constexpr const char * | KeyCodec = "codec_name"
static constexpr const char * | KeyCodecLong = "codec_long_name"
static constexpr const char * | KeyFormat = "pix_fmt"
static constexpr const char * | KeyWidth = "width"
static constexpr const char * | KeyHeight = "height"
static constexpr const char * | KeyBitRate = "bit_rate"
static constexpr const char * | KeySampleRate = "sample_rate"
static constexpr const char * | KeySampleFormat = "sample_fmt"
static constexpr const char * | KeyChannelLayout = "channel_layout"
static constexpr const char * | KeySampleAspectRatio = "sample_aspect_ratio"
static constexpr const char * | KeyDisplayAspectRatio = "display_aspect_ratio"
static constexpr const char * | KeyAverageFrameRate = "avg_frame_rate"
static constexpr const char * | KeyRealFrameRate = "r_frame_rate"
static constexpr const char * | KeyTimeBase = "time_base"
static constexpr const char * | KeyCodecTimeBase = "codec_time_base"
static constexpr const char * | KeyTags = "tags"

## Private Attributes

std::shared_ptr< rapidjson::Value > | _streamInformationValue

## Detailed Description

Stream information class.

Definition at line 34 of file StreamInformation.h.

## Constructor & Destructor Documentation

## StreamInformation()

ffmpegkit::StreamInformation::StreamInformation | ( | std::shared_ptr< rapidjson::Value > | streamInformationValue | ) |

Definition at line 22 of file StreamInformation.cpp.

## Member Function Documentation

## getAllProperties()

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

Returns all stream properties defined.

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

Definition at line 123 of file StreamInformation.cpp.

## getAverageFrameRate()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getAverageFrameRate | ( |  | ) |

Returns average frame rate.

Returns
  average frame rate in fps

Definition at line 77 of file StreamInformation.cpp.

## getBitrate()

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

Returns bitrate.

Returns
  bitrate in kb/s

Definition at line 53 of file StreamInformation.cpp.

## getChannelLayout()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getChannelLayout | ( |  | ) |

Returns channel layout.

Returns
  channel layout

Definition at line 65 of file StreamInformation.cpp.

## getCodec()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getCodec | ( |  | ) |

Returns stream codec.

Returns
  stream codec

Definition at line 33 of file StreamInformation.cpp.

## getCodecLong()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getCodecLong | ( |  | ) |

Returns stream codec in long format.

Returns
  stream codec with additional profile and mode information

Definition at line 37 of file StreamInformation.cpp.

## getCodecTimeBase()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getCodecTimeBase | ( |  | ) |

Returns codec time base.

Returns
  codec time base in tbc

Definition at line 89 of file StreamInformation.cpp.

## getDisplayAspectRatio()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getDisplayAspectRatio | ( |  | ) |

Returns display aspect ratio.

Returns
  display aspect ratio

Definition at line 73 of file StreamInformation.cpp.

## getFormat()

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

Returns stream format.

Returns
  stream format

Definition at line 41 of file StreamInformation.cpp.

## getHeight()

std::shared_ptr< int64_t > ffmpegkit::StreamInformation::getHeight | ( |  | ) |

Returns height.

Returns
  height in pixels

Definition at line 49 of file StreamInformation.cpp.

## getIndex()

std::shared_ptr< int64_t > ffmpegkit::StreamInformation::getIndex | ( |  | ) |

Returns stream index.

Returns
  stream index, starting from zero

Definition at line 25 of file StreamInformation.cpp.

## getNumberProperty()

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

Returns the stream property associated with the key.

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

Definition at line 105 of file StreamInformation.cpp.

## getProperty()

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

Returns the stream property associated with the key.

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

Definition at line 113 of file StreamInformation.cpp.

## getRealFrameRate()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getRealFrameRate | ( |  | ) |

Returns real frame rate.

Returns
  real frame rate in tbr

Definition at line 81 of file StreamInformation.cpp.

## getSampleAspectRatio()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getSampleAspectRatio | ( |  | ) |

Returns sample aspect ratio.

Returns
  sample aspect ratio

Definition at line 69 of file StreamInformation.cpp.

## getSampleFormat()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getSampleFormat | ( |  | ) |

Returns sample format.

Returns
  sample format

Definition at line 61 of file StreamInformation.cpp.

## getSampleRate()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getSampleRate | ( |  | ) |

Returns sample rate.

Returns
  sample rate in hz

Definition at line 57 of file StreamInformation.cpp.

## getStringProperty()

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

Returns the stream property associated with the key.

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

Definition at line 97 of file StreamInformation.cpp.

## getTags()

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

Returns all tags.

Returns
  tags Value

Definition at line 93 of file StreamInformation.cpp.

## getTimeBase()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getTimeBase | ( |  | ) |

Returns time base.

Returns
  time base in tbn

Definition at line 85 of file StreamInformation.cpp.

## getType()

std::shared_ptr< std::string > ffmpegkit::StreamInformation::getType | ( |  | ) |

Returns stream type.

Returns
  stream type; audio or video

Definition at line 29 of file StreamInformation.cpp.

## getWidth()

std::shared_ptr< int64_t > ffmpegkit::StreamInformation::getWidth | ( |  | ) |

Returns width.

Returns
  width in pixels

Definition at line 45 of file StreamInformation.cpp.

## Field Documentation

## _streamInformationValue

std::shared_ptr<rapidjson::Value> ffmpegkit::StreamInformation::_streamInformationValue

private

Definition at line 212 of file StreamInformation.h.

## KeyAverageFrameRate

constexpr const char* ffmpegkit::StreamInformation::KeyAverageFrameRate = "avg_frame_rate"

staticconstexpr

Definition at line 49 of file StreamInformation.h.

## KeyBitRate

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

staticconstexpr

Definition at line 43 of file StreamInformation.h.

## KeyChannelLayout

constexpr const char* ffmpegkit::StreamInformation::KeyChannelLayout = "channel_layout"

staticconstexpr

Definition at line 46 of file StreamInformation.h.

## KeyCodec

constexpr const char* ffmpegkit::StreamInformation::KeyCodec = "codec_name"

staticconstexpr

Definition at line 38 of file StreamInformation.h.

## KeyCodecLong

constexpr const char* ffmpegkit::StreamInformation::KeyCodecLong = "codec_long_name"

staticconstexpr

Definition at line 39 of file StreamInformation.h.

## KeyCodecTimeBase

constexpr const char* ffmpegkit::StreamInformation::KeyCodecTimeBase = "codec_time_base"

staticconstexpr

Definition at line 52 of file StreamInformation.h.

## KeyDisplayAspectRatio

constexpr const char* ffmpegkit::StreamInformation::KeyDisplayAspectRatio = "display_aspect_ratio"

staticconstexpr

Definition at line 48 of file StreamInformation.h.

## KeyFormat

constexpr const char* ffmpegkit::StreamInformation::KeyFormat = "pix_fmt"

staticconstexpr

Definition at line 40 of file StreamInformation.h.

## KeyHeight

constexpr const char* ffmpegkit::StreamInformation::KeyHeight = "height"

staticconstexpr

Definition at line 42 of file StreamInformation.h.

## KeyIndex

constexpr const char* ffmpegkit::StreamInformation::KeyIndex = "index"

staticconstexpr

Definition at line 36 of file StreamInformation.h.

## KeyRealFrameRate

constexpr const char* ffmpegkit::StreamInformation::KeyRealFrameRate = "r_frame_rate"

staticconstexpr

Definition at line 50 of file StreamInformation.h.

## KeySampleAspectRatio

constexpr const char* ffmpegkit::StreamInformation::KeySampleAspectRatio = "sample_aspect_ratio"

staticconstexpr

Definition at line 47 of file StreamInformation.h.

## KeySampleFormat

constexpr const char* ffmpegkit::StreamInformation::KeySampleFormat = "sample_fmt"

staticconstexpr

Definition at line 45 of file StreamInformation.h.

## KeySampleRate

constexpr const char* ffmpegkit::StreamInformation::KeySampleRate = "sample_rate"

staticconstexpr

Definition at line 44 of file StreamInformation.h.

## KeyTags

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

staticconstexpr

Definition at line 53 of file StreamInformation.h.

## KeyTimeBase

constexpr const char* ffmpegkit::StreamInformation::KeyTimeBase = "time_base"

staticconstexpr

Definition at line 51 of file StreamInformation.h.

## KeyType

constexpr const char* ffmpegkit::StreamInformation::KeyType = "codec_type"

staticconstexpr

Definition at line 37 of file StreamInformation.h.

## KeyWidth

constexpr const char* ffmpegkit::StreamInformation::KeyWidth = "width"

staticconstexpr

Definition at line 41 of file StreamInformation.h.

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

- StreamInformation.h
- StreamInformation.cpp