FFmpegKit Linux API 5.1
FFmpegSession.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Taner Sener
3 *
4 * This file is part of FFmpegKit.
5 *
6 * FFmpegKit is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * FFmpegKit is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General License
17 * along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef FFMPEG_KIT_FFMPEG_SESSION_H
21#define FFMPEG_KIT_FFMPEG_SESSION_H
22
23#include "AbstractSession.h"
24#include "StatisticsCallback.h"
26
27namespace ffmpegkit {
28
33 public:
34
40 static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments);
41
48 static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback);
49
58 static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback);
59
69 static std::shared_ptr<ffmpegkit::FFmpegSession> create(const std::list<std::string>& arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy);
70
77
84
92 std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Statistics>>> getAllStatisticsWithTimeout(const int waitTimeout);
93
101 std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Statistics>>> getAllStatistics();
102
110 std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Statistics>>> getStatistics();
111
118 std::shared_ptr<ffmpegkit::Statistics> getLastReceivedStatistics();
119
126 void addStatistics(const std::shared_ptr<ffmpegkit::Statistics> statistics);
127
133 bool isFFmpeg() const override;
134
140 bool isFFprobe() const override;
141
147 bool isMediaInformation() const override;
148
149 private:
150
151 struct PublicFFmpegSession;
152
163
166 std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Statistics>>> _statistics;
167 };
168
169}
170
171#endif // FFMPEG_KIT_FFMPEG_SESSION_H
static ffmpegkit::LogCallback logCallback
static ffmpegkit::StatisticsCallback statisticsCallback
FFmpegSession(const std::list< std::string > &arguments, ffmpegkit::FFmpegSessionCompleteCallback completeCallback, ffmpegkit::LogCallback logCallback, ffmpegkit::StatisticsCallback statisticsCallback, ffmpegkit::LogRedirectionStrategy logRedirectionStrategy)
ffmpegkit::StatisticsCallback getStatisticsCallback()
bool isFFprobe() const override
void addStatistics(const std::shared_ptr< ffmpegkit::Statistics > statistics)
FFmpegSessionCompleteCallback _completeCallback
ffmpegkit::StatisticsCallback _statisticsCallback
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > _statistics
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > getAllStatistics()
ffmpegkit::FFmpegSessionCompleteCallback getCompleteCallback()
bool isFFmpeg() const override
std::shared_ptr< ffmpegkit::Statistics > getLastReceivedStatistics()
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > getAllStatisticsWithTimeout(const int waitTimeout)
bool isMediaInformation() const override
std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Statistics > > > getStatistics()
static std::shared_ptr< ffmpegkit::FFmpegSession > create(const std::list< std::string > &arguments)
std::function< void(const std::shared_ptr< ffmpegkit::Statistics > statistics)> StatisticsCallback
std::function< void(const std::shared_ptr< ffmpegkit::Log > log)> LogCallback
Definition: LogCallback.h:35
std::function< void(const std::shared_ptr< ffmpegkit::FFmpegSession > session)> FFmpegSessionCompleteCallback