FFmpeg
,
* FFprobe
and MediaInformation
sessions.
*/
class AbstractSession : public Session, std::enable_shared_from_this
* The stack trace is only set for sessions that end with SessionStateFailed state. For sessions that has
* SessionStateCompleted state this method returns nil.
*
* @return stack trace of the exception received while executing this session, nil if session
* is not started, still running or completed
*/
std::string getFailStackTrace() const override;
/**
* Returns session specific log redirection strategy.
*
* @return session specific log redirection strategy
*/
ffmpegkit::LogRedirectionStrategy getLogRedirectionStrategy() const override;
/**
* Returns whether there are still asynchronous messages being transmitted for this
* session or not.
*
* @return true if there are still asynchronous messages being transmitted, false
* otherwise
*/
bool thereAreAsynchronousMessagesInTransmit() const override;
/**
* Adds a new log entry for this session.
*
* It is invoked internally by FFmpegKit
library methods. Must not be used by user
* applications.
*
* @param log log entry
*/
void addLog(const std::shared_ptrFFmpeg
session or not.
*
* @return true if it is an FFmpeg
session, false otherwise
*/
virtual bool isFFmpeg() const override;
/**
* Returns whether it is an FFprobe
session or not.
*
* @return true if it is an FFprobe
session, false otherwise
*/
virtual bool isFFprobe() const override;
/**
* Returns whether it is a MediaInformation
session or not.
*
* @return true if it is a MediaInformation
session, false otherwise
*/
virtual bool isMediaInformation() const override;
/**
* Cancels running the session.
*/
void cancel() override;
private:
const long _sessionId;
ffmpegkit::LogCallback _logCallback;
std::chrono::time_point