# FFmpegKit Linux API: Chapter.h Source File

Chapter.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_CHAPTER_H
#define FFMPEG_KIT_CHAPTER_H
// OVERRIDING THE MACRO TO PREVENT APPLICATION TERMINATION
#define RAPIDJSON_ASSERT(x)
#include "rapidjson/document.h"
#include <string>
#include <iostream>
#include <memory>
namespace ffmpegkit {
class Chapter {
public:
static constexpr const char* KeyId = "id";
static constexpr const char* KeyTimeBase = "time_base";
static constexpr const char* KeyStart = "start";
static constexpr const char* KeyStartTime = "start_time";
static constexpr const char* KeyEnd = "end";
static constexpr const char* KeyEndTime = "end_time";
static constexpr const char* KeyTags = "tags";
Chapter(std::shared_ptr<rapidjson::Value> chapterValue);
std::shared_ptr<int64_t> getId();
std::shared_ptr<std::string> getTimeBase();
std::shared_ptr<int64_t> getStart();
std::shared_ptr<std::string> getStartTime();
std::shared_ptr<int64_t> getEnd();
std::shared_ptr<std::string> getEndTime();
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();
private:
std::shared_ptr<rapidjson::Value> _chapterValue;
};
}
#endif // FFMPEG_KIT_CHAPTER_H
ffmpegkit::Chapter
Definition: Chapter.h:35
ffmpegkit::Chapter::KeyEnd
static constexpr const char * KeyEnd
Definition: Chapter.h:41
ffmpegkit::Chapter::getProperty
std::shared_ptr< rapidjson::Value > getProperty(const char *key)
Definition: Chapter.cpp:69
ffmpegkit::Chapter::getStartTime
std::shared_ptr< std::string > getStartTime()
Definition: Chapter.cpp:37
ffmpegkit::Chapter::getNumberProperty
std::shared_ptr< int64_t > getNumberProperty(const char *key)
Definition: Chapter.cpp:61
ffmpegkit::Chapter::KeyStartTime
static constexpr const char * KeyStartTime
Definition: Chapter.h:40
ffmpegkit::Chapter::getAllProperties
std::shared_ptr< rapidjson::Value > getAllProperties()
Definition: Chapter.cpp:79
ffmpegkit::Chapter::KeyId
static constexpr const char * KeyId
Definition: Chapter.h:37
ffmpegkit::Chapter::Chapter
Chapter(std::shared_ptr< rapidjson::Value > chapterValue)
Definition: Chapter.cpp:22
ffmpegkit::Chapter::getStart
std::shared_ptr< int64_t > getStart()
Definition: Chapter.cpp:33
ffmpegkit::Chapter::KeyTags
static constexpr const char * KeyTags
Definition: Chapter.h:43
ffmpegkit::Chapter::KeyStart
static constexpr const char * KeyStart
Definition: Chapter.h:39
ffmpegkit::Chapter::getEnd
std::shared_ptr< int64_t > getEnd()
Definition: Chapter.cpp:41
ffmpegkit::Chapter::_chapterValue
std::shared_ptr< rapidjson::Value > _chapterValue
Definition: Chapter.h:90
ffmpegkit::Chapter::getEndTime
std::shared_ptr< std::string > getEndTime()
Definition: Chapter.cpp:45
ffmpegkit::Chapter::KeyEndTime
static constexpr const char * KeyEndTime
Definition: Chapter.h:42
ffmpegkit::Chapter::KeyTimeBase
static constexpr const char * KeyTimeBase
Definition: Chapter.h:38
ffmpegkit::Chapter::getId
std::shared_ptr< int64_t > getId()
Definition: Chapter.cpp:25
ffmpegkit::Chapter::getStringProperty
std::shared_ptr< std::string > getStringProperty(const char *key)
Definition: Chapter.cpp:53
ffmpegkit::Chapter::getTimeBase
std::shared_ptr< std::string > getTimeBase()
Definition: Chapter.cpp:29
ffmpegkit::Chapter::getTags
std::shared_ptr< rapidjson::Value > getTags()
Definition: Chapter.cpp:49
ffmpegkit
Definition: AbstractSession.h:25