# FFmpegKit Linux API: MediaInformation.h Source File

Loading...
Searching...
No Matches
MediaInformation.h
Go to the documentation of this file.
/*
* Copyright (c) 2022 Taner Sener
*
* This file is part of FFmpegKit.
*
* FFmpegKit is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FFmpegKit is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FFMPEG_KIT_MEDIA_INFORMATION_H
#define FFMPEG_KIT_MEDIA_INFORMATION_H
#include "Chapter.h"
#include "StreamInformation.h"
#include <memory>
#include <vector>
namespace ffmpegkit {
class MediaInformation {
public:
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";
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();
private:
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;
};
}
#endif // FFMPEG_KIT_MEDIA_INFORMATION_H
Chapter.h
StreamInformation.h
ffmpegkit::MediaInformation
Definition MediaInformation.h:33
ffmpegkit::MediaInformation::getProperty
std::shared_ptr< rapidjson::Value > getProperty(const char *key)
Definition MediaInformation.cpp:91
ffmpegkit::MediaInformation::getDuration
std::shared_ptr< std::string > getDuration()
Definition MediaInformation.cpp:42
ffmpegkit::MediaInformation::getBitrate
std::shared_ptr< std::string > getBitrate()
Definition MediaInformation.cpp:50
ffmpegkit::MediaInformation::KeySize
static constexpr const char * KeySize
Definition MediaInformation.h:41
ffmpegkit::MediaInformation::getFormatProperties
std::shared_ptr< rapidjson::Value > getFormatProperties()
Definition MediaInformation.cpp:131
ffmpegkit::MediaInformation::getStartTime
std::shared_ptr< std::string > getStartTime()
Definition MediaInformation.cpp:38
ffmpegkit::MediaInformation::getStreams
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > getStreams()
Definition MediaInformation.cpp:65
ffmpegkit::MediaInformation::getFormatProperty
std::shared_ptr< rapidjson::Value > getFormatProperty(const char *key)
Definition MediaInformation.cpp:120
ffmpegkit::MediaInformation::getNumberFormatProperty
std::shared_ptr< int64_t > getNumberFormatProperty(const char *key)
Definition MediaInformation.cpp:111
ffmpegkit::MediaInformation::getLongFormat
std::shared_ptr< std::string > getLongFormat()
Definition MediaInformation.cpp:34
ffmpegkit::MediaInformation::KeyDuration
static constexpr const char * KeyDuration
Definition MediaInformation.h:40
ffmpegkit::MediaInformation::KeyBitRate
static constexpr const char * KeyBitRate
Definition MediaInformation.h:42
ffmpegkit::MediaInformation::getSize
std::shared_ptr< std::string > getSize()
Definition MediaInformation.cpp:46
ffmpegkit::MediaInformation::KeyFilename
static constexpr const char * KeyFilename
Definition MediaInformation.h:36
ffmpegkit::MediaInformation::getChapters
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > getChapters()
Definition MediaInformation.cpp:69
ffmpegkit::MediaInformation::getStringProperty
std::shared_ptr< std::string > getStringProperty(const char *key)
Definition MediaInformation.cpp:73
ffmpegkit::MediaInformation::KeyFormatLong
static constexpr const char * KeyFormatLong
Definition MediaInformation.h:38
ffmpegkit::MediaInformation::getAllProperties
std::shared_ptr< rapidjson::Value > getAllProperties()
Definition MediaInformation.cpp:141
ffmpegkit::MediaInformation::KeyFormat
static constexpr const char * KeyFormat
Definition MediaInformation.h:37
ffmpegkit::MediaInformation::getStringFormatProperty
std::shared_ptr< std::string > getStringFormatProperty(const char *key)
Definition MediaInformation.cpp:102
ffmpegkit::MediaInformation::getFormat
std::shared_ptr< std::string > getFormat()
Definition MediaInformation.cpp:30
ffmpegkit::MediaInformation::getNumberProperty
std::shared_ptr< int64_t > getNumberProperty(const char *key)
Definition MediaInformation.cpp:82
ffmpegkit::MediaInformation::getFilename
std::shared_ptr< std::string > getFilename()
Definition MediaInformation.cpp:26
ffmpegkit::MediaInformation::KeyFormatProperties
static constexpr const char * KeyFormatProperties
Definition MediaInformation.h:35
ffmpegkit::MediaInformation::KeyStartTime
static constexpr const char * KeyStartTime
Definition MediaInformation.h:39
ffmpegkit::MediaInformation::getTags
std::shared_ptr< rapidjson::Value > getTags()
Definition MediaInformation.cpp:54
ffmpegkit::MediaInformation::KeyTags
static constexpr const char * KeyTags
Definition MediaInformation.h:43
ffmpegkit::MediaInformation::_streams
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::StreamInformation > > > _streams
Definition MediaInformation.h:175
ffmpegkit::MediaInformation::_mediaInformationValue
std::shared_ptr< rapidjson::Value > _mediaInformationValue
Definition MediaInformation.h:174
ffmpegkit::MediaInformation::_chapters
std::shared_ptr< std::vector< std::shared_ptr< ffmpegkit::Chapter > > > _chapters
Definition MediaInformation.h:176
ffmpegkit
Definition AbstractSession.h:25