FFmpegKit Linux API 6.0
Loading...
Searching...
No Matches
Session.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_SESSION_H
21#define FFMPEG_KIT_SESSION_H
22
23#include "Log.h"
24#include "LogCallback.h"
26#include "ReturnCode.h"
27#include "SessionState.h"
28#include <string>
29#include <chrono>
30#include <list>
31
32namespace ffmpegkit {
33
37 class Session {
38 public:
39
46
52 virtual long getSessionId() const = 0;
53
59 virtual std::chrono::time_point<std::chrono::system_clock> getCreateTime() const = 0;
60
66 virtual std::chrono::time_point<std::chrono::system_clock> getStartTime() const = 0;
67
73 virtual std::chrono::time_point<std::chrono::system_clock> getEndTime() const = 0;
74
81 virtual long getDuration() const = 0;
82
88 virtual std::shared_ptr<std::list<std::string>> getArguments() const = 0;
89
95 virtual std::string getCommand() const = 0;
96
104 virtual std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Log>>> getAllLogsWithTimeout(const int waitTimeout) const = 0;
105
112 virtual std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Log>>> getAllLogs() const = 0;
113
121 virtual std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Log>>> getLogs() const = 0;
122
131 virtual std::string getAllLogsAsStringWithTimeout(const int waitTimeout) const = 0;
132
139 virtual std::string getAllLogsAsString() const = 0;
140
148 virtual std::string getLogsAsString() const = 0;
149
155 virtual std::string getOutput() const = 0;
156
163
172 virtual std::shared_ptr<ffmpegkit::ReturnCode> getReturnCode() const = 0;
173
183 virtual std::string getFailStackTrace() const = 0;
184
191
200
209 virtual void addLog(const std::shared_ptr<ffmpegkit::Log> log) = 0;
210
214 virtual void startRunning() = 0;
215
221 virtual void complete(const std::shared_ptr<ffmpegkit::ReturnCode> returnCode) = 0;
222
228 virtual void fail(const char* error) = 0;
229
235 virtual bool isFFmpeg() const = 0;
236
242 virtual bool isFFprobe() const = 0;
243
249 virtual bool isMediaInformation() const = 0;
250
254 virtual void cancel() = 0;
255
256 };
257
258}
259
260#endif // FFMPEG_KIT_SESSION_H
virtual void fail(const char *error)=0
virtual std::string getAllLogsAsString() const =0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getAllLogs() const =0
virtual std::string getAllLogsAsStringWithTimeout(const int waitTimeout) const =0
virtual bool isFFprobe() const =0
virtual LogRedirectionStrategy getLogRedirectionStrategy() const =0
virtual long getDuration() const =0
virtual std::string getOutput() const =0
virtual bool thereAreAsynchronousMessagesInTransmit() const =0
virtual void addLog(const std::shared_ptr< ffmpegkit::Log > log)=0
virtual void complete(const std::shared_ptr< ffmpegkit::ReturnCode > returnCode)=0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getAllLogsWithTimeout(const int waitTimeout) const =0
virtual std::shared_ptr< std::list< std::string > > getArguments() const =0
virtual std::chrono::time_point< std::chrono::system_clock > getEndTime() const =0
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getLogs() const =0
virtual std::string getFailStackTrace() const =0
virtual long getSessionId() const =0
virtual ffmpegkit::LogCallback getLogCallback() const =0
virtual void startRunning()=0
virtual void cancel()=0
virtual bool isMediaInformation() const =0
virtual std::shared_ptr< ffmpegkit::ReturnCode > getReturnCode() const =0
virtual std::string getLogsAsString() const =0
virtual std::chrono::time_point< std::chrono::system_clock > getStartTime() const =0
virtual std::string getCommand() const =0
virtual ffmpegkit::SessionState getState() const =0
virtual bool isFFmpeg() const =0
virtual std::chrono::time_point< std::chrono::system_clock > getCreateTime() const =0
std::function< void(const std::shared_ptr< ffmpegkit::Log > log)> LogCallback
Definition LogCallback.h:35