# FFmpegKit Linux API: Session.h Source File

Loading...
Searching...
No Matches
Session.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 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 License for more details.
*
* You should have received a copy of the GNU Lesser General License
* along with FFmpegKit. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FFMPEG_KIT_SESSION_H
#define FFMPEG_KIT_SESSION_H
#include "Log.h"
#include "LogCallback.h"
#include "LogRedirectionStrategy.h"
#include "ReturnCode.h"
#include "SessionState.h"
#include <string>
#include <chrono>
#include <list>
namespace ffmpegkit {
class Session {
public:
virtual ffmpegkit::LogCallback getLogCallback() const = 0;
virtual long getSessionId() const = 0;
virtual std::chrono::time_point<std::chrono::system_clock> getCreateTime() const = 0;
virtual std::chrono::time_point<std::chrono::system_clock> getStartTime() const = 0;
virtual std::chrono::time_point<std::chrono::system_clock> getEndTime() const = 0;
virtual long getDuration() const = 0;
virtual std::shared_ptr<std::list<std::string>> getArguments() const = 0;
virtual std::string getCommand() const = 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::shared_ptr<ffmpegkit::Log>>> getAllLogs() const = 0;
virtual std::shared_ptr<std::list<std::shared_ptr<ffmpegkit::Log>>> getLogs() const = 0;
virtual std::string getAllLogsAsStringWithTimeout(const int waitTimeout) const = 0;
virtual std::string getAllLogsAsString() const = 0;
virtual std::string getLogsAsString() const = 0;
virtual std::string getOutput() const = 0;
virtual ffmpegkit::SessionState getState() const = 0;
virtual std::shared_ptr<ffmpegkit::ReturnCode> getReturnCode() const = 0;
virtual std::string getFailStackTrace() const = 0;
virtual LogRedirectionStrategy getLogRedirectionStrategy() const = 0;
virtual bool thereAreAsynchronousMessagesInTransmit() const = 0;
virtual void addLog(const std::shared_ptr<ffmpegkit::Log> log) = 0;
virtual void startRunning() = 0;
virtual void complete(const std::shared_ptr<ffmpegkit::ReturnCode> returnCode) = 0;
virtual void fail(const char* error) = 0;
virtual bool isFFmpeg() const = 0;
virtual bool isFFprobe() const = 0;
virtual bool isMediaInformation() const = 0;
virtual void cancel() = 0;
};
}
#endif // FFMPEG_KIT_SESSION_H
Log.h
LogCallback.h
LogRedirectionStrategy.h
ReturnCode.h
SessionState.h
ffmpegkit::Session
Definition Session.h:37
ffmpegkit::Session::fail
virtual void fail(const char *error)=0
ffmpegkit::Session::getAllLogsAsString
virtual std::string getAllLogsAsString() const =0
ffmpegkit::Session::getAllLogs
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getAllLogs() const =0
ffmpegkit::Session::getAllLogsAsStringWithTimeout
virtual std::string getAllLogsAsStringWithTimeout(const int waitTimeout) const =0
ffmpegkit::Session::isFFprobe
virtual bool isFFprobe() const =0
ffmpegkit::Session::getLogRedirectionStrategy
virtual LogRedirectionStrategy getLogRedirectionStrategy() const =0
ffmpegkit::Session::getDuration
virtual long getDuration() const =0
ffmpegkit::Session::getOutput
virtual std::string getOutput() const =0
ffmpegkit::Session::thereAreAsynchronousMessagesInTransmit
virtual bool thereAreAsynchronousMessagesInTransmit() const =0
ffmpegkit::Session::addLog
virtual void addLog(const std::shared_ptr< ffmpegkit::Log > log)=0
ffmpegkit::Session::complete
virtual void complete(const std::shared_ptr< ffmpegkit::ReturnCode > returnCode)=0
ffmpegkit::Session::getAllLogsWithTimeout
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getAllLogsWithTimeout(const int waitTimeout) const =0
ffmpegkit::Session::getArguments
virtual std::shared_ptr< std::list< std::string > > getArguments() const =0
ffmpegkit::Session::getEndTime
virtual std::chrono::time_point< std::chrono::system_clock > getEndTime() const =0
ffmpegkit::Session::getLogs
virtual std::shared_ptr< std::list< std::shared_ptr< ffmpegkit::Log > > > getLogs() const =0
ffmpegkit::Session::getFailStackTrace
virtual std::string getFailStackTrace() const =0
ffmpegkit::Session::getSessionId
virtual long getSessionId() const =0
ffmpegkit::Session::getLogCallback
virtual ffmpegkit::LogCallback getLogCallback() const =0
ffmpegkit::Session::startRunning
virtual void startRunning()=0
ffmpegkit::Session::cancel
virtual void cancel()=0
ffmpegkit::Session::isMediaInformation
virtual bool isMediaInformation() const =0
ffmpegkit::Session::getReturnCode
virtual std::shared_ptr< ffmpegkit::ReturnCode > getReturnCode() const =0
ffmpegkit::Session::getLogsAsString
virtual std::string getLogsAsString() const =0
ffmpegkit::Session::getStartTime
virtual std::chrono::time_point< std::chrono::system_clock > getStartTime() const =0
ffmpegkit::Session::getCommand
virtual std::string getCommand() const =0
ffmpegkit::Session::getState
virtual ffmpegkit::SessionState getState() const =0
ffmpegkit::Session::isFFmpeg
virtual bool isFFmpeg() const =0
ffmpegkit::Session::getCreateTime
virtual std::chrono::time_point< std::chrono::system_clock > getCreateTime() const =0
ffmpegkit
Definition AbstractSession.h:25
ffmpegkit::LogRedirectionStrategy
LogRedirectionStrategy
Definition LogRedirectionStrategy.h:25
ffmpegkit::SessionState
SessionState
Definition SessionState.h:25
ffmpegkit::LogCallback
std::function< void(const std::shared_ptr< ffmpegkit::Log > log)> LogCallback
Definition LogCallback.h:35