# FFmpegKit Linux API: ffmpegkit::MediaInformationJsonParser Class Reference

ffmpegkit::MediaInformationJsonParser Class Reference

`#include <MediaInformationJsonParser.h>`

## Static Public Member Functions

static std::shared_ptr< ffmpegkit::MediaInformation > | from (const std::string &ffprobeJsonOutput)
static std::shared_ptr< ffmpegkit::MediaInformation > | fromWithError (const std::string &ffprobeJsonOutput)

## Detailed Description

A parser that constructs MediaInformation from FFprobe's json output.

Definition at line 31 of file MediaInformationJsonParser.h.

## Member Function Documentation

## from()

std::shared_ptr< ffmpegkit::MediaInformation > ffmpegkit::MediaInformationJsonParser::from | ( | const std::string & | ffprobeJsonOutput | ) |

static

Extracts `MediaInformation` from the given FFprobe json output.

Parameters

  ffprobeJsonOutput | FFprobe json output

Returns
  created MediaInformation instance of nullptr if a parsing error occurs

Definition at line 31 of file MediaInformationJsonParser.cpp.

## fromWithError()

std::shared_ptr< ffmpegkit::MediaInformation > ffmpegkit::MediaInformationJsonParser::fromWithError | ( | const std::string & | ffprobeJsonOutput | ) |

static

Extracts `MediaInformation` from the given FFprobe json output. If a parsing error occurs an std::exception is thrown.

Parameters

  ffprobeJsonOutput | FFprobe json output

Returns
  created MediaInformation instance

Definition at line 40 of file MediaInformationJsonParser.cpp.

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

- MediaInformationJsonParser.h
- MediaInformationJsonParser.cpp